Demography · Largest city population
Spain's largest city, Madrid, had 3.4 M persons inhabitants in 2026, ranking 45 out of 197. The capital has historically attracted migrants from all regions and abroad, offering jobs in services, finance, and technology. The Madrid Metro is one of the longest in Europe, highlighting the scale of the urban agglomeration.
Data for 2026 · unit: persons
Position
#45 / 197
Spain world ranking
Country position on the scale from last to first place for this indicator.
ES
#45
#197#1
Trend
Change over time
Change in indicator over the available period.
540 K
1900
1.6 M
1950
3.1 M
1990
3.1 M
2000
3.3 M
2010
3.3 M
2020
3.4 M
2026
Values — persons
Comparison
Top countries by Largest city population
Where Spain stands in the world ranking.
1
CNChina
26 M
2
MXMexico
22 M
2
BDBangladesh
22 M
2
EGEgypt
22 M
5
INIndia
20 M
6
PKPakistan
18 M
7
TRTurkey
16 M
8
NGNigeria
16 M
Full world rankingarrow_forward
People also search for
Other pages of the reference by this indicator.
Frequently asked questions
Largest city population in Spain — how much?
Based on 2026 data — 3.4 M persons. This is rank #45 out of 197 countries.
What is Spain's rank by Largest city population?
Spain ranks #45 out of 197 countries in the world ranking by «Largest city population».
How has Largest city population changed in Spain?
Over the available period the indicator changed from 540 K to 3.4 M persons.