World Population Prospects: population, births, deaths, fertility, life expectancy and migration by country, 1950-2100 (UN WPP 2024)
Population and its demographic components for 237 countries and areas, the world and 60 UN regional and income aggregates, every year from 1950 to 2100: total population (1 July), births, deaths, net migration, total fertility rate, life expectancy at birth and median age. Estimates 1950-2023 and the medium-variant projection 2024-2100, from the United Nations World Population Prospects 2024 (UN DESA, Population Division), with the UN's January 2026 interim correction for Togo applied.
Population, births, deaths, net migration, fertility, life expectancy and median age by location and year, 1950-2100
Field
Type
Description
loc_id
integer
UN location code (LocID), generally matching the ISO 3166-1 numeric code for countries and areas. Kosovo uses UN code 412, which is not an ISO-assigned numeric country code. World is 900. See locations.csv.
iso3
string
Country/area alpha-3 code as supplied by the UN, generally ISO 3166-1; Kosovo uses the non-ISO code XKX. Empty for World and aggregates.
location
string
Location name as the UN writes it (for example "Republic of Korea", "Türkiye").
loc_type
string
UN location type: World, Geographic region, Subregion, SDG region, Development group, Income group, Special other (LLDC and SIDS subgroups) or Country/Area. Country/Area identifies countries and areas. Their population totals do not exactly reproduce the published World and regional aggregates because Togo's figures were updated while aggregates were not; source rounding also causes small differences.
year
year
Calendar year. Population and median age are on 1 July; births, deaths and net migration are totals for the year.
period
string
estimate (1950-2023) or projection (2024-2100, UN medium variant). Projections are scenarios, not observations.
population
integer
Total population on 1 July, persons (UN TPopulation1July, published in thousands, multiplied by 1,000 and rounded).
births
integer
Live births in the year, persons (UN Births, thousands x 1,000).
deaths
integer
Deaths in the year, persons (UN Deaths, thousands x 1,000).
net_migration
integer
Net number of migrants in the year (immigrants minus emigrants), persons; negative means more people left than arrived (UN NetMigrations, thousands x 1,000). Zero for the world by definition.
fertility_rate
number
Total fertility rate: live births per woman (UN TFR). About 2.1 is the approximate replacement level.
life_expectancy
number
Life expectancy at birth, both sexes, years (UN LEx).
median_age
number
Median age of the population on 1 July, years (UN MedianAgePop).
Locations: countries, areas and UN aggregates, with codes and types
Field
Type
Description
loc_id
integer
UN location code (LocID).
location
string
Location name as the UN writes it.
loc_type
string
UN location type (as in population-indicators.csv).
is_aggregate
boolean
true for the world and every regional, development, income or special grouping; false for countries and areas.
iso3
string
Country/area alpha-3 code as supplied by the UN, generally ISO 3166-1; Kosovo uses the non-ISO code XKX. Empty for World and aggregates.
iso2
string
Country/area alpha-2 code as supplied by the UN, generally ISO 3166-1; Kosovo uses the non-ISO code XK. Namibia is NA. Empty for World and aggregates.
sdmx_code
string
UN SDMX / M49 code as published (empty where the UN gives none).
parent_id
integer
loc_id of the location's parent in the UN hierarchy as published (for countries, their subregion; empty for the world). Some parents are UN groupings not included here.
How many people live in each country, how many are born and die each year, how many children women have, how long people live, how old the population is and the balance of immigration and emigration: every year from 1950 to 2100, for 237 countries and areas, the world and 60 UN regional and income groupings. The source is the United Nations World Population Prospects 2024 (WPP 2024), the UN's official population estimates and projections, which is the latest revision (the next is due in July 2027). Values to 2023 are UN estimates; values from 2024 are the UN's medium-variant projection, and a period column says which is which.
What stands out
In the UN WPP 2024 medium-variant projection, world population rises from about 8.2 billion in 2024 to a peak of about 10.3 billion in 2084, then declines to about 10.2 billion in 2100. This is the maximum within the dataset's 1950-2100 coverage. These are projections, not observed totals; the UN's low- and high-fertility scenarios, which are not included here, give different paths.
Most people already live in countries where fertility is below the replacement level of about 2.1 children per woman. In 2023, 130 of the 237 countries and areas had a total fertility rate under 2.1, and they held 67% of the world's population. The UN estimates world fertility at 2.25 children per woman in 2023; in its WPP 2024 medium-variant projection, 2050 is the first year in the 1950-2100 series below 2.1.
Data
data/population-indicators.csv: one row per location and year, 1950 to 2100 (44,998 rows: 298 locations x 151 years).
loc_id: UN location code (LocID), generally matching the ISO 3166-1 numeric code for countries and areas. Kosovo uses UN code 412, which is not an ISO-assigned numeric country code. World is 900.
iso3: ISO 3166-1 alpha-3 code for countries and areas as the UN gives it (Kosovo has XKX, a code in common use but not assigned by ISO); empty for the world and aggregates.
location: the UN's name, for example "Republic of Korea", "Türkiye", "China, Hong Kong SAR".
loc_type: Country/Area, World, Geographic region, Subregion, SDG region, Development group, Income group or Special other (subgroups of landlocked developing countries and small island developing states).
year: calendar year.
period: estimate (1950-2023) or projection (2024-2100, medium variant).
population: total population on 1 July, persons.
births, deaths: live births and deaths during the year, persons.
net_migration: immigrants minus emigrants during the year, persons; negative means net emigration. Zero for the world.
fertility_rate: total fertility rate, live births per woman.
life_expectancy: life expectancy at birth, both sexes, years.
median_age: median age on 1 July, years.
data/locations.csv: the 298 locations (237 countries and areas, 61 aggregates) with loc_id, location, loc_type, is_aggregate, iso3, iso2, the UN's sdmx_code and parent_id (the location above it in the UN hierarchy, for example a country's subregion).
To get countries only, filter loc_type = Country/Area. To join with other data, use iso3.
How this differs from other population datasets here
population is the World Bank's total population series (SP.POP.TOTL): one number per country, area or aggregate and year, past years only, no components and no projections.
population-growth-estimates-and-projections provides total population only, with estimates and projection variants in separate files. Its source repository now also uses UN WPP 2024.
This dataset is the current UN revision (WPP 2024) with the demographic components side by side: births, deaths, migration, fertility, life expectancy and median age as well as population, estimates and projection in one table to 2100.
Caveats
Projections are scenarios. The medium variant is the UN's central projection, built on assumptions that fertility, mortality and migration follow recent trends. It is not a measurement, and the further out the year the wider the uncertainty.
Estimates are modelled too. For many countries the UN combines censuses, surveys and registration data into a consistent series; recent years and countries with weak statistics can be revised substantially in the next revision.
Togo correction. The UN's 19 January 2026 interim update corrects a double adjustment for census undercount that inflated Togo's population estimates. This dataset copies all selected fields from the updated Togo file, including revised migration, life expectancy and median age values. The UN did not revise aggregates, which still incorporate the original Togo figures. The population correction is about 1.0 million in 2022, roughly 0.01% of the published world total. Country population sums therefore do not exactly match the published aggregates.
Aggregates overlap. Overlap occurs both within and across location types. For example, Americas overlaps Latin America and the Caribbean and Northern America; combined income groups overlap their component groups. Sum only mutually exclusive locations.
Counts are published by the UN in thousands with three decimals; here they are multiplied by 1,000 and rounded to whole persons. Rates and ages are as published.
Left out to keep the dataset small: the low, high and other projection scenarios, figures by age and sex, and the UN's other indicators (density, crude rates, infant mortality and more). They are in the UN's bulk files linked below.
Source and licence
United Nations, Department of Economic and Social Affairs, Population Division (2024). World Population Prospects 2024, Online Edition. Retrieved 2026-11-29 from the UN's keyless bulk CSV downloads (https://population.un.org/wpp/downloads):
This is a frozen snapshot taken on 2026-11-29 of WPP 2024. The UN revises WPP every two years or so; the next revision is due on 11 July 2027. scripts/fetch.mjs downloads the UN files into archive/ and scripts/build.mjs rebuilds the CSVs from them.
API access
Access dataset files directly from scripts, code, or AI agents.
Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.