World population by country
Updated 3 November 2026. Real data: World Bank, World Development Indicators, SP.POP.TOTL (Population, total).
What is in it
Total population by country and year from the World Bank's World Development Indicators, in tidy long format: one row per country per year, with region and income group.
Countries and economies only: regional and income aggregates are removed. Blank = no value published for that year.
First rows
point at a column to light it up
| countrytext | iso3text | regiontext | income_grouptext | yearnumber | populationnumber |
|---|---|---|---|---|---|
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2000 | 20130327 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2001 | 20284307 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2002 | 21378117 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2003 | 22733049 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2004 | 23560654 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2005 | 24404567 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2006 | 25424094 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2007 | 25909852 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2008 | 26482622 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 2009 | 27466101 |
Ten most populous countries, 2023
people
Show as a table
| iso3 | value |
|---|---|
| India | 1,438,069,596 |
| China | 1,410,710,000 |
| United States | 336,755,052 |
| Indonesia | 281,190,067 |
| Pakistan | 247,504,495 |
| Nigeria | 227,882,945 |
| Brazil | 211,140,729 |
| Bangladesh | 171,466,990 |
| Russian Federation | 143,826,130 |
| Mexico | 129,739,759 |
Data dictionary
| Column | Type | Meaning |
|---|---|---|
| country | text | Country or economy (World Bank name) |
| iso3 | text | ISO 3166-1 alpha-3 code |
| region | text | World Bank region |
| income_group | text | World Bank income group |
| year | integer | Year |
| population | integer | Total population (mid-year estimate) |
Practice questions
answers checked in SQL and in Python
The five most populous countries in 2023?
India 1,438,069,596; China 1,410,710,000; United States 336,755,052; Indonesia 281,190,067; Pakistan 247,504,495
SQL
SELECT country, population FROM world_population WHERE year=2023 AND population IS NOT NULL ORDER BY population DESC LIMIT 5File: world-population
Sum of all countries' population, 2000 vs 2023?
2000: 6,139,355,967; 2023: 8,039,550,134
SQL
SELECT year, SUM(population) FROM world_population WHERE year IN (2000,2023) GROUP BY year ORDER BY yearThis is the sum of the countries in the file, which can differ slightly from the World Bank's own 'World' aggregate.
File: world-population