A lot depends on what kind of architecture you have and how prosperous people are. Also, how practical artificial lighting is. Most of us have a lot of stuff compared to any but the wealthiest of historical personages, and we spend much more time active indoors thanks to electrification and all of its spin-off effects. Thus we have an increased need for residential space. OTOH, our great cities can build very high, so can be much more compact even given our need for larger spaces.

Typical medieval town/city building is probably the two-story with business on the ground floor and residence above. Rome had apartment buildings up to four stories high. If magic lets your people build higher (or if they can dig underlevels and make them habitable), they can squeeze in even more people.

Basically, first you need to figure out how the people live. That's going to determine how concentrated or spread out the population is.