I'm working on a small story, and in it I'm wanting to include a city surrounded by multiple layers of walls. The walls themselves are colossal, but were created/held up by sorcery. I would go into more detail, but this question was about the city itself and not the walls.

I'm looking at a size of roughly 2,000 square miles in total and a population density of 5,000 people per square miles with a late medieval/early renaissance level of technology (15th/16th century). Is this even possbible? Sorcery can't just summon resources in this setting, so that option isn't present. Humans make up most of the population, but the small other groups use roughly the same amount of resources.

Theres also a magic system, of which I'll describe here.

-Magic is a natural force, while sorcery is interacting with that force.

-In order to cast any kind of spell, one must have the 'fuel' (the death of a sentient living thing), a mage to 'guide' the magic (or you get wild magic) and a target. Spells can take several days to do anything. Sorcery doesn't have a set range, but the further away the target it the better the chance of things going wrong.

-Sorcery isn't something someone is born with. It's a skill, just like being a blacksmith.

-Sorcery cannot create new matter, nor can it destroy matter. You can turn lead into gold, but you can't create coins from the air.

-Wild magic is 'charged' magic without any target. It usually manifests as natural disasters, horrific disease, or simply a giant ball of invisible force that levels entire cities.

  • 1
    $\begingroup$ Comments are not for extended discussion; this conversation has been moved to chat. $\endgroup$
    – Monty Wild
    Jan 21 at 22:48

10 Answers 10


It is not realistic.

Before the end of the medieval period, every city in history that exceeded 1 million people was at the center of an empire with a total population of at least 100 million people. Rome (200 AD), Kaifeng (1100 AD), Hangzhou (1300 AD), and Jinling (1400 AD) all belonged to nations with populations commonly estimated at 100 millionish people... and not all historians agree that these cities actually exceeded 1 million people.

While it only takes 10 rural people to feed an urban person before modern farming was invented, the largest city of a nation with upwards of 100 million people almost never exceeds 10% of the nation's total urban population. But since we are trying to push the envelope here, if you cherry pick largest city size to smallest national population estimates instead of using averages or most accepted estimates, you could take the top estimate of the city of Rome at 1.2 million and the bottom estimate of the empire's total population of 59 million and arrive at Rome being 20% of the nation's urban population.

Since your city would have about 10 million people, and your agriculture restricts you to a 10% urban population, this city logically must be the capitol of an empire with a population somewhere in the 500 million to 1 billion range... since the total human population of Earth did not reach 500 million until the Renaissance or 1 billion until 1803, it is inconceivable for a Late Medieval or Early Renaissance city to grow to 10 million people unless your really fudge for a highly idealized population distribution and it literally conquered the entire world.

... and this is before you even try to tackle the issues of sanitation and distribution.

But what if you use magic?

So sorcery can not just summon up resources out of thin air, but that does not mean it cant enable resource availability where it would not otherwise be... so maybe I am looking at this wrong.

...they can't get that without offering something living in return. Life is life...

Since it sounds like the OP is going for some manner of equivalent exchange magic system, perhaps you can trade something not alive for something else not alive that HELPS you create more life.

You are looking at a population density of ~7.8 people per acre which means you can not grow enough food inside the city unless you drop the density down to about 1 person per 2 acres... but what if you could do vertical farming? Perhaps the city is actually several stories tall with 16 stories being in-door farmlands lit by magical lighting, and only the top 1-3 stories being actual homes, shops, etc.

The trick to making this city work is a massive aqueduct system, something much grander than that of Rome, but since we've already established thier ability to make megastructures like the walls, this should be fine. The aqueducts could collect the water from an entire range of mountains, and this water would solve all of your problems. It gives you water to drink and irrigate your crops with. It gives you plumbing for solving your sanitation issues. Since water is a life sustaining inanimate substance, it should be like enough to light to make a fair equivalent exchange: water for light, to grow your underground crops. And lastly, in means you do not need massive amounts of people coming and going to supply the city; so, the walls will not chock off logistics preventing you from getting enough food where it is needed.

The real trick here is not that you have a 10 million person urban population, but a 1 million person urban population supported by the 9 million rural workers who toil in the under-city farmlands. Place this city at the heart of an empire with a total population in the 100 million range and it all adds up.

  • 1
    $\begingroup$ agreed 10 million people would make it ten times the size of the largest cities at any time prior to the 1900's $\endgroup$
    – John
    Jan 20 at 23:35
  • $\begingroup$ Sanitation is 75% of the reason behind projects like this. The most compelling reason to not build a US southern border wall, IMO (that I read about on Imgur), is the infrastructure required under it for the runoff of an entire continent. $\endgroup$
    – Mazura
    Jan 21 at 3:33
  • 1
    $\begingroup$ @Mazura That is actually a really poor excuse not to build a border wall. Most of the border is desert, and the run-off that crosses the border mostly travels through ground water and rivers, what little water does run off near surface levels is easily addressed with simple storm drains. The main reason not to build a wall is that it is an utter waist of money. Most illegal immigrants cross by plane, boat, or automobile anyway which would not be stopped by a wall, and anyone determined enough to take the open desert route in is not going to be stopped by a simple wall. $\endgroup$
    – Nosajimiki
    Jan 21 at 6:08
  • $\begingroup$ Those deserts experience monsoon seasons about three months out of the year. So for nine months that thousand miles of arbitrarily high capacity extremely expensive simple storm drain, that has far reaching ecological concerns, does nothing other than sever the upper and lower western hemisphere from all terrestrial migratory life. I can't even get into the humanitarian concerns until we stop intentionally altering the planet for the worse for our own supposed benefit. You're right about the main reason not to; this is why it's bad if we did - because that's all it would to do. $\endgroup$
    – Mazura
    Jan 21 at 6:25
  • $\begingroup$ Your and other answers are based on Earth and historical yields. It might be possible to support larger cities if yields are higher. $\endgroup$
    – Otkin
    Jan 21 at 20:19

Pre-modern cities in general needed massive amount of farmers working elsewhere. The safe calculation is that urban population can be only as big as 10% of total population, which mean that your 10mln man city would need 90mln people producing food. Now to put it into perspective, ancient Rome had around 1mln people and even though essentially entire Mediterranean sent food to Rome, famine and disease was common among the poor city dwellers. It was also plagued by crime as there was no proper crime fighting force established.

Assuming that a medieval farming needed about 2 acres of land per person you would need 800 000 km2 of relatively good farmland assuming that there were no local urban centers consuming part of the food supply (which is not probable, those centres are necessary for administration). How much is that? Spain and Portugal combined is around 600 000 km2 and only a part is possible as farmland.

Currently in EU farmland is about 39% of all land surface. Assuming in medieval system it will be less, say 25%, you would need some 3 200 000 km2 to feed your city, a combined land surface of Spain, Portugal, France, Italy, Germany, Sweden, Norway, UK and Poland. And you would need all those areas around an inland sea (or massive navigable river system) as transporting grain by sea is 40 times or more (depending on ships size) cheaper than transporting it on land, plus it would be difficult to govern over such large and populous area if there was no way to travel relatively quickly by water.

  • 1
    $\begingroup$ Great job number crunching! There's one additional aspect: one modern farm can feed more people than one medieval farm $\endgroup$
    – Blueriver
    Jan 21 at 14:51
  • $\begingroup$ More specifically, a modern farm feeds more people per acre. Modern farming feeds about 2 people per acre instead of 1 person per 2 acres. $\endgroup$
    – Nosajimiki
    Jan 21 at 20:40

5000 people per square mile on a surface of 2000 square miles makes 10 million people.

With medieval level of technology those would be 10 million corpses: transporting enough food and water to feed them and taking rid of their wastes is something beyond medieval level.

Famine or some lethal plague are granted.

For a reference, London in the middle of 1500 had just 120000 people living there, and wasn't famous for being a clean city. Today London has a density of 7000 people per square mile.

  • $\begingroup$ So I'll need to lower the population, increase the size, or figure out some other way to keep them alive? $\endgroup$
    – Atriol
    Jan 20 at 8:46
  • 9
    $\begingroup$ @Atriol increasing size won't really help you much, unless you reach the point where the city can produce its own food - which means: large agricultural areas. which means: it's not a city anymore. $\endgroup$ Jan 20 at 11:24
  • 2
    $\begingroup$ @Atriol Or handwave the logistics. While the logistics of how Rome fed itself is fascinating to historians, most people reading works of fiction (even historians who study Roman grain logistics) don't want to pull out a spreadsheet and run calculations while reading fantasy recreationally. $\endgroup$
    – sphennings
    Jan 20 at 15:29
  • 1
    $\begingroup$ @FranzGleichmann 2000 square miles is a pretty large area. More than half the size of Corsica for reference. Plenty of area for farming. Maybe the sorcerers can create skyscrapers with elevators to free up room. Also the area on top of the walls would be significant. $\endgroup$
    – JimmyJames
    Jan 20 at 21:53
  • 2
    $\begingroup$ @dan04 the idea of the skyscrapers was to make space for farms, not for "reasonably-sized houses". $\endgroup$ Jan 21 at 2:08

As per the above. Food is the problem. Assuming you have a system of aqueducts, sewers and/or rivers feeding fresh water into the city and removing waste from the city you can probably 'solve' the water problem.

But even then you have to assume waste disposal is solved by the application of rigorous public hygiene laws that weren't in place anywhere during the middle ages. And note: those laws only came into place during the 19th century in response to the discovery of disease theory. So you need your society to have far more advanced notions of medicine and public hygiene than were actually present during the middle ages.

You will also have a humongous problem with horse shit! This remained a dire problem in large metropolitan centers until the invention of the internal combustion engine! In fact the first international conference on urban planning in 1868 was held to discuss methods of disposing of it!

But that aside, the people will still starve. There is simply no way to grow enough food inside the city boundaries to feed everyone assuming your relying on medieval levels of technology.

  • $\begingroup$ So .... you need a fantasy animal that consumes horseshit & other waste and is usable as a food supply - or better yet supplies food without dying (eggs, milk etc). $\endgroup$
    – Dragonel
    Jan 21 at 16:23
  • $\begingroup$ That or some kind of industrial era bio-digester that converts animal waste into methane for a Victorian era style street lighting etc (and fertilizer). But that still leaves the food problem. For comparison a 21st century city could probably grow all its good using industrial scale vertical greenhouse agriculture, aqua-culture and bio-culture etc. But of course that means mid to late 20th century (at best) or even early 21st century levels of technology. $\endgroup$
    – Mon
    Jan 22 at 2:08


You've solved the one problem that matters - you don't need to care about the resources, man-power, or time needed to build the wall. With that convenience, the only issue is encompassing enough area and resources to have the number of people you want and the ability to supply their needs.

The question really is, how much of those needs must also be protected? As the old adage goes, a civilized society is but one meal away from anarchy. If you're looking to support a 10-million population city, you need to think about logistics.

And logistics are the basic reason walls are no longer used by anyone. Walling a 10-million population city today would be expensive, but it could be done. But what's the point? Said city needs water, food, sewer control, and quite literally a bazillion tons of stuff every day. (Even your medieval city will have this problem... just less dependency on plastic, if you know what I mean!) Want to bring it to its knees? Roll up to the city's gates and stop all that stuff from entering the city.

And a proverbial day later, the city would erupt into anarchy.

But you've solved that problem

Because you've made it economically practical to build as much wall as wanting. You can encompass the forests, mountains, grasslands, lakes, and rivers you need to supply your people with their needs while your enemies sit outside twiddling their thumbs.

So, can it be viable? Yup.

However... (And this is really important)

It's viable... unless you don't want to enclose that much space. Unless your wall is tremendously tall and frictionless, you'll need to dedicate a massive percentage of your population to manning the wall. My point is, walls also don't exist because they don't really solve the problem. For a city the size you're talking about, you're really building a death trap for your people. As General George Patton once said, "fixed fortifications are monuments to man's stupidity." His point was that a mobile army can always outwit someone who's cowering behind a wall, and usually need only time to starve them out.

So, in conclusion, take the time to think through your story. Does it matter if anyone thinks the wall is viable? There are reasons why most storytellers don't explain/rationalize/justify everything they do in their stories. If it's necessary to explain the wall (or feel comfortable that it's somehow "realistic") then you need to think through the consequences of having a fixed fortification of that size.

Even in the medieval era, walls were beginning to become obsolete. Walls are great protection against raids. Not so much organized armies.


It's not going to be possible without hand-waving. The numbers you give puts each person having a plot of land 75' on a side. With that land, there must be shelter, livestock, a share of roads, markets, administrative buildings, etc. So on average, each person would have a tiny amount of arable land.

The wall is possible, however - the Great Wall of China is far longer than what is needed to ring your city.


If this is a phantasy world, you have options, besides saying "Its just magic look no further!".
OP doesn't specify. but in D&D there are methods, resources and opportunities to expand living conditions for city dwellers. The natural world offers many resources to combat some of the obstacles that get in the way of city growth.
Sewer and garbage. Many organisms in nature are dangerous but have benefits to their eco system, these can be adapted to the city health. Green slime and Gelatinous Cubes cultivated to exist within the sewers and kept contained and at bay with magically heated sewer grates break down refuse that normally chokes even the best planned sewers. Very wealthy residents can even have metallic or glass enchanted canisters that contain the green slimes to devour waist within the home easily and efficiently. IE* Garbage Disposal
Food Preservation is a major issue with transporting large quantities of perishable commodities. Salting and drying can only do so much. Refrigeration is accomplished by farming Brown Mold. and endothermic mold that absorbs heat within the general area. Metallic cubes of differing shapes and uses with the mold sealed inside is sold by specialized and experienced brown mold farmers. cold boxes are this way "powered" and perishable food is preserved.

Many flora and fauna of the phantasy world possess effects that can mimic what today we lean on for tech. Cooling, heating, lighting, even transportation options would not be ignored by those that existed within such a society and have the means to benefit from their use.

  • 1
    $\begingroup$ If it helps, the magic system this uses is less of "I cast fireball" and closer to a long, difficult ritual with multiple different elements. Even with sorcery, the walls took decades to construct, and keeping them structurally sound is a daily challenge. As for creatures, they're mostly earth-like, but I'm not against adding something a little more unique to help out with keeping the city alive. And thank you for the reply! $\endgroup$
    – Atriol
    Jan 21 at 2:04

As has been pointed out, food is the main problem with such a large population concentration. Here is my suggestion for getting around it: use magic rituals to increase the crop yield of the fields. If this is at all possible, it's going to be something that a lot of people will attempt because the benefits will be huge. You said that constructing the walls took a long time and magic. If you need less magic power to maintain them, you now have an excess of trained magicians to help out in the fields.

They could go about it in multiple ways too: you could make plants hardier and more more fruitful, kill or drive off weeds and pests, or maybe something time-related to accelerate growth and allow more harvests per year. Mix and match and you get a lot more food out of the land, especially near the city where it is most needed.


According to this site Ancient Rome did pass 1 000 000 inhabitants, just as Baghdad or Beijing (or other Chinese cities) had reached 1 000 000 inhabitants and beyond during Medieval era.

Dutch mentioned that your city would have about 10 000 000 inhabitants. It may be doable if the focus of an entire empire is to provide for that city (and if we stretch imagination a bit). I would also take a look at historical methods of implementing sewage systems (both Roman and Medieval [sic!]) and ways of transporting water to the city.

In regards to the food and waste:

It may be doable, but it will not be pretty (and it will be smelly). If magic may be used as medicine then it would be of great help.

But the communication would be chaotic. Traveling from one point in the city to another could take a whole day if not longer.


You might want to see answers to previous simlar quesitons.

How Many Soldiers are Needed to Patrol/Defend a Medieval Wall?

How much space would a city need within a ringwall to survive for an indefinite period of time?

Build an impregnable fortress in the middle ages with modern technology

How many people can you feed per square-kilometer of farmland?

Those answers might indicate whether a city with an area of 2,000 square miles could feed a population of 10 million people.

One way for a fictional city to feed more people with technology would be to build many 100 story buildings which were very wide, with artificial light for farming in imported soil, or with hydroponics, or aeroponics. And in a fantasy magic might provide the artificial light instead of technology.

And in a high tech society food might be artificially synthisized with chemicals. And in a fantasy story food for a city might be synthisized by magical spells instead of by technology.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .