As of 1 July 2026, Spain had a total population of 49,801,559. Spain's population surpassed 49 million inhabitants for the first time in 2025. Its population density, at , is much lower than other Western European countries, yet, with the exception of microstates, it has the highest real density population in Europe, based on density of inhabited areas. With the notable exception of Madrid, Spain's capital city, the most densely populated areas lie around the coast, though recent immigration has contributed to a modest population growth in the inland.

The population of Spain doubled during the twentieth century, but the pattern of growth was extremely uneven due to large-scale internal migration from the rural interior to the industrial cities. Eleven of Spain's fifty provinces saw an absolute decline in population over the century. In the first 25 years of the 21st century, population of Spain grew from 40 million in 2000 to more than 49 million in 2025 mostly due to immigration.

In 2024, the average total fertility rate (TFR) across Spain was 1.10 children born per woman, one of the lowest in the world.

History Spain has an interesting demographic evolution in the last two centuries, reflecting the tumultuous history of Spain during the 19th and 20th centuries. In 1808–1814 the Peninsular War happened in Spain, causing 1 million deaths. Spain maintained a steady population growth after this war, though the economic stagnation of Spain resulted in a mass emigration to the Americas, mostly to the Spanish-speaking countries of the Americas, as approximately 3,5 million Spaniards moved to Latin America from 1850 to 1950. The Flu pandemic in 1918-19 left more than 200,000 dead in Spain.

The Spanish Civil War (1936–1939), which resulted in the establishment of a far-right dictatorship, resulted in the emigration of hundreds of thousands of Spaniards. Some 25,000 moved to Mexico The deepening of economic depression after 1939 resulted in mass emigration to European and American countries due to economic and political motives, with approximately 1 million people settling in Latin America. In 1941, the government approved benefits for large families with at least four children, and in 1945 approved a law allowing tax deductions for parents. The Spanish democratisation after 1975, resulted in return of some Civil War exiles, and after 1980 the birthrates declined as contraception and abortion were legalised. By 1988, after centuries of net negative migration, the first events of illegal immigration from Africa occurred, and in 1991 Spain became a net receiver of migrants after decades of mass emigration. In 1994 the government lowered threshold of requirements to become a large family: only three children needed.

The 2000s were characterised from a huge economic boom caused mainly by lower interest rates after adopting the Euro, resulting in the number of migrants skyrocketing from 924,000 in 2000 to 5,6 million in 2010, mostly from Africa, South America and Europe. Thus, Spain saw large-scale migration from its former colonies for the first time. Then, the economic crisis of Spain in 2008–2014 resulted in an emigration of hundreds of thousands of migrants. During the early 2000s, the mean year-on-year demographic growth set a new record with its 2003 peak variation of 2.1%, doubling the previous record reached back in the 1960s when a mean year-on-year growth of 1% was experienced. In 2005 alone, the immigrant population of Spain increased by 700,000 people. The arrival of migrating young adults was the main reason for the slight increase in Spain's fertility rate. From 2002 through 2008 the Spanish population grew by 8%, of whom 75% were foreign.

After 2018, the population began to grow again, thanks to the growth of immigration from abroad, despite negative fertility. Despite growing population, Spain is struggling with a declining population in rural areas (Empty Spain).

In 2020s, due to the Democratic Memory Law, which allowed hundreds of thousands of descendants of Civil War exiles to regain Spanish citizenship, many Latin Americans of Spanish descent obtained Spanish citizenship and some of them have moved to Spain. The 2020s have been characterised by a large growth of immigration in Spain, especially in provincial capitals and large cities. Since 2022, more than 1,6 million people have moved to Spain.

Spain has a low fertility rate of only 1,11 as of 2025. The number of births in Spain declined from 420,000 in 2015 to 321,000 in 2025. Though immigration has contributed to a small increase in the birthrates in 2025, the number of births to mothers under 25 years old in Spain is decreasing. Conversely, the share of births to mothers above the age of 40 has increased.

Also, due to the high immigration rates of Spain, many people are being naturalised every year. In 2025, 299,732 residents of Spain acquired the Spanish nationality, including 142,000 residents from South American countries.

Population

Note: Crude migration change (per 1,000) is a trend analysis, an extrapolation based on average population change (current year minus previous) minus natural change of the current year (see table vital statistics). Average population is an estimate of the population in the middle of the year and not at the end of the year.

Population growth

Population growth rate 2022 est. 0.13% Country comparison to the world 143rd 2017 est. 0.78%

Life expectancy

+1882–1950Year Life expectancy in years1882 29.51892 32.11900 34.81908 41.31909 41.01910 40.81911 39.71912 43.41913 42.51914 42.81915 43.01916 42.91917 42.51918 30.31919 41.11920 39.21921 42.01922 44.11923 44.71924 46.21925 46.91926 47.71927 48.41928 48.61929 49.319301931 49.21932 51.11933 51.51934 52.31935 52.61936 51.01937 47.31938 47.61939 47.21940 48.41941 47.21942 52.51943 54.81944 56.21945 57.81946 57.51947 59.31948 61.21949 61.01950 61.8 Sources: Our World In Data and the United Nations.

+1950-2015PeriodLife expectancy in years1950–195564.61955–196067.81960–196569.91965–197071.41970–197572.71975–198074.41980–198576.11985–199076.91990–199577.62000–200579.92005–201081.22010–201582.5 Source: UN World Population Prospects

Life expectancy at birth

Total population 84.01 years (2024) Male 81.38 years (2024) Female 86.53 years (2024)

Infant mortality rate 3.14 deaths/1,000 live births (2021 est.) Country comparison to the world 216th Crude death rate9.78 deaths/1,000 population (2021 est.) Country comparison to the world 55th

Fertility

The total fertility rate is the number of children born per woman. It is based on fairly good data for the entire period. Sources: Our World In Data and Gapminder Foundation. +1850-1899Year Fertility rate1850 5.131851 5.071852 5.011853 4.951854 4.891855 4.831856 4.781857 4.721858 4.661859 4.751860 4.861861 5.161862 5.091863 51864 5.191865 5.111866 5.071867 5.091868 4.721869 4.91870 4.841871 4.8318721873 4.821874 4.811875 4.81876 4.791877 4.7818781879 4.741880 4.71881 4.911882 4.791883 4.711884 4.861885 4.81886 4.861887 4.781888 4.8218891890 4.551891 4.671892 4.7118931894 4.61895 4.631896 4.751897 4.511898 4.411899 4.53 Crude birth rate 8.05 births/1,000 population (2021 est.) Country comparison to the world 212th Total fertility rate 1.16 children born/woman (2022) Country comparison to the world: 207th Mother's mean age at first birth 30.9 years (2017 est.)

Age structure 0–14 years 15.02% (male 3,861,522/female 3,650,085) 15–24 years 9.9% (male 2,557,504/female 2,392,498) 25–54 years 43.61% (male 11,134,006/female 10,675,873) 55–64 years 12.99% (male 3,177,080/female 3,319,823) 65 years and over 18.49% (male 3,970,417/female 5,276,984) (2020 est.)

Structure of the population

+Population Estimates by Sex and Age Group (01.I.2021) (Data refer to registered resident population.)Age groupMaleFemaleTotal% 0–4 989 957 936 296 1 926 253 4.06 5–9 1 182 657 1 111 874 2 294 531 4.84 10–14 1 310 725 1 227 805 2 538 530 5.36 15–19 1 259 328 1 178 983 2 438 311 5.14 20–24 1 228 307 1 164 436 2 392 743 5.05 25–29 1 283 969 1 247 891 2 531 860 5.34 30–34 1 373 686 1 371 909 2 745 595 5.79 35–39 1 588 932 1 607 493 3 196 425 6.74 40–44 1 949 687 1 935 067 3 884 754 8.20 45–49 1 982 307 1 949 746 3 932 053 8.30 50–54 1 847 825 1 852 726 3 700 551 7.81 55–59 1 688 389 1 740 775 3 429 164 7.23 60–64 1 464 713 1 552 291 3 017 004 6.37 65–69 1 187 562 1 303 094 2 490 656 5.25 70–74 1 024 938 1 190 297 2 215 235 4.67 75–79 791 421 990 173 1 781 594 3.76 80–84 533 545 773 766 1 307 311 2.76 85–89 366 344 630 406 996 750 2.10 90–94 140 288 309 931 450 219 0.95 95–99 30 128 86 008 116 136 0.25 100+ 2 574 10 446 13 020 0.03Total 23 227 282 24 171 413 47 398 695 100Age groupMaleFemaleTotalPercent 0–14 3 483 339 3 275 975 6 759 314 14.26 15–64 15 667 143 15 601 317 31 268 460 65.97 65+ 4 076 800 5 294 121 9 370 921 19.77

Median age

Total 43.9 years Male 42.7 years Female 45.1 years (2020 est.) Country comparison to the world 21st

Vital statistics Statistics since 1858 Source: Instituto Nacional de Estadística (INE)

Notable events in Spanish demographics:

1865, 1885 – Major cholera outbreaks 1872–1876 – Third Carlist War 1873 – Cantonal Rebellion 1918–1920 – Spanish Flu 1936–1939 – Spanish Civil War 1940–1947 – White Terror 2020–2022 – COVID-19 Pandemic