Population, total

Source: worldbank.org, 01.09.2025

Year: 2024

Flag Country Value Value change, % Rank
Aruba Aruba 107,624 +0.247% 190
Afghanistan Afghanistan 42,647,492 +2.88% 36
Angola Angola 37,885,849 +3.09% 40
Albania Albania 2,714,617 -1.14% 142
Andorra Andorra 81,938 +1.34% 196
United Arab Emirates United Arab Emirates 10,876,981 +3.75% 87
Argentina Argentina 45,696,159 +0.346% 35
Armenia Armenia 3,033,500 +2.33% 136
American Samoa American Samoa 46,765 -1.59% 203
Antigua & Barbuda Antigua & Barbuda 93,772 +0.489% 194
Australia Australia 27,204,809 +2.07% 54
Austria Austria 9,178,482 +0.512% 98
Azerbaijan Azerbaijan 10,202,850 +0.482% 94
Burundi Burundi 14,047,786 +2.62% 77
Belgium Belgium 11,876,844 +0.759% 81
Benin Benin 14,462,724 +2.49% 75
Burkina Faso Burkina Faso 23,548,781 +2.27% 59
Bangladesh Bangladesh 173,562,364 +1.22% 8
Bulgaria Bulgaria 6,444,366 -0.0346% 110
Bahrain Bahrain 1,588,670 +0.736% 152
Bahamas Bahamas 401,283 +0.461% 176
Bosnia & Herzegovina Bosnia & Herzegovina 3,164,253 -0.654% 135
Belarus Belarus 9,133,712 -0.486% 99
Belize Belize 417,072 +1.45% 174
Bermuda Bermuda 64,636 -0.0958% 199
Bolivia Bolivia 12,413,315 +1.38% 78
Brazil Brazil 211,998,573 +0.406% 7
Barbados Barbados 282,467 +0.0464% 179
Brunei Brunei 462,721 +0.822% 173
Bhutan Bhutan 791,524 +0.653% 165
Botswana Botswana 2,521,139 +1.65% 144
Central African Republic Central African Republic 5,330,690 +3.46% 122
Canada Canada 41,288,599 +3.01% 37
Switzerland Switzerland 9,034,102 +1.64% 100
Chile Chile 19,764,771 +0.539% 65
China China 1,408,975,000 -0.123% 2
Côte d’Ivoire Côte d’Ivoire 31,934,230 +2.47% 50
Cameroon Cameroon 29,123,744 +2.65% 52
Congo - Kinshasa Congo - Kinshasa 109,276,265 +3.3% 15
Congo - Brazzaville Congo - Brazzaville 6,332,961 +2.43% 112
Colombia Colombia 52,886,363 +1.08% 28
Comoros Comoros 866,628 +1.91% 162
Cape Verde Cape Verde 524,877 +0.487% 172
Costa Rica Costa Rica 5,129,910 +0.478% 126
Cuba Cuba 10,979,783 -0.364% 85
Curaçao Curaçao 155,900 +0.0642% 185
Cayman Islands Cayman Islands 74,457 +1.94% 197
Cyprus Cyprus 1,358,282 +0.989% 157
Czechia Czechia 10,882,164 +0.167% 86
Germany Germany 83,510,950 -0.466% 19
Djibouti Djibouti 1,168,722 +1.37% 160
Dominica Dominica 66,205 -0.459% 198
Denmark Denmark 5,976,992 +0.505% 114
Dominican Republic Dominican Republic 11,427,557 +0.85% 84
Algeria Algeria 46,814,308 +1.41% 33
Ecuador Ecuador 18,135,478 +0.864% 70
Egypt Egypt 116,538,258 +1.75% 13
Eritrea Eritrea 3,535,603 +1.88% 131
Spain Spain 48,807,137 +0.95% 32
Estonia Estonia 1,371,986 +0.124% 155
Ethiopia Ethiopia 132,059,767 +2.62% 10
Finland Finland 5,637,214 +0.955% 116
Fiji Fiji 928,784 +0.502% 161
France France 68,516,699 +0.336% 23
Faroe Islands Faroe Islands 54,719 +0.514% 201
Micronesia (Federated States of) Micronesia (Federated States of) 113,160 +0.471% 189
Gabon Gabon 2,538,952 +2.18% 143
United Kingdom United Kingdom 69,226,000 +1.07% 21
Georgia Georgia 3,673,850 -1.12% 130
Ghana Ghana 34,427,414 +1.89% 47
Gibraltar Gibraltar 39,329 +2.23% 209
Guinea Guinea 14,754,785 +2.42% 74
Gambia Gambia 2,759,988 +2.3% 141
Guinea-Bissau Guinea-Bissau 2,201,352 +2.23% 147
Equatorial Guinea Equatorial Guinea 1,892,516 +2.43% 149
Greece Greece 10,388,805 -0.161% 93
Grenada Grenada 117,207 +0.108% 188
Greenland Greenland 56,836 -0.051% 200
Guatemala Guatemala 18,406,359 +1.55% 69
Guam Guam 167,777 +0.763% 184
Guyana Guyana 831,087 +0.573% 163
Hong Kong SAR China Hong Kong SAR China 7,524,100 -0.159% 103
Honduras Honduras 10,825,703 +1.7% 88
Croatia Croatia 3,866,300 +0.171% 129
Haiti Haiti 11,772,557 +1.16% 82
Hungary Hungary 9,562,314 -0.311% 96
Indonesia Indonesia 283,487,931 +0.817% 4
Isle of Man Isle of Man 84,160 -0.00594% 195
India India 1,450,935,791 +0.895% 1
Ireland Ireland 5,380,257 +1.37% 120
Iran Iran 91,567,738 +1.06% 17
Iraq Iraq 46,042,015 +2.15% 34
Iceland Iceland 404,610 +2.86% 175
Israel Israel 9,974,400 +1.27% 95
Italy Italy 58,986,023 -0.0126% 25
Jamaica Jamaica 2,839,175 -0.0215% 140
Jordan Jordan 11,552,876 +0.994% 83
Japan Japan 123,975,371 -0.435% 12
Kazakhstan Kazakhstan 20,592,571 +1.29% 63
Kenya Kenya 56,432,944 +1.98% 26
Kyrgyzstan Kyrgyzstan 7,224,614 +1.76% 106
Cambodia Cambodia 17,638,801 +1.23% 72
Kiribati Kiribati 134,518 +1.5% 186
St. Kitts & Nevis St. Kitts & Nevis 46,843 +0.182% 202
South Korea South Korea 51,751,065 +0.0743% 29
Kuwait Kuwait 4,973,861 +2.48% 127
Laos Laos 7,769,819 +1.37% 102
Lebanon Lebanon 5,805,962 +0.562% 115
Liberia Liberia 5,612,817 +2.18% 117
Libya Libya 7,381,023 +1.03% 105
St. Lucia St. Lucia 179,744 +0.256% 183
Liechtenstein Liechtenstein 40,197 +0.871% 207
Sri Lanka Sri Lanka 21,916,000 -0.549% 60
Lesotho Lesotho 2,337,423 +1.12% 146
Lithuania Lithuania 2,888,055 +0.574% 138
Luxembourg Luxembourg 677,717 +1.69% 167
Latvia Latvia 1,862,441 -0.799% 150
Macao SAR China Macao SAR China 687,000 +1.21% 166
Saint Martin (French part) Saint Martin (French part) 26,129 -5.04% 213
Morocco Morocco 38,081,173 +0.978% 39
Monaco Monaco 38,631 -0.834% 210
Moldova Moldova 2,389,275 -2.79% 145
Madagascar Madagascar 31,964,956 +2.47% 49
Maldives Maldives 527,799 +0.343% 171
Mexico Mexico 130,861,007 +0.864% 11
Marshall Islands Marshall Islands 37,548 -3.29% 211
North Macedonia North Macedonia 1,792,179 -1.95% 151
Mali Mali 24,478,595 +2.98% 58
Malta Malta 574,346 +3.91% 170
Myanmar (Burma) Myanmar (Burma) 54,500,091 +0.677% 27
Montenegro Montenegro 623,831 +0.0484% 169
Mongolia Mongolia 3,524,788 +1.25% 132
Northern Mariana Islands Northern Mariana Islands 44,278 -1.92% 205
Mozambique Mozambique 34,631,766 +2.96% 46
Mauritania Mauritania 5,169,395 +2.93% 125
Mauritius Mauritius 1,259,509 -0.121% 158
Malawi Malawi 21,655,286 +2.61% 61
Malaysia Malaysia 35,557,673 +1.23% 44
Namibia Namibia 3,030,131 +2.26% 137
New Caledonia New Caledonia 292,639 +0.955% 178
Niger Niger 27,032,412 +3.34% 55
Nigeria Nigeria 232,679,478 +2.1% 6
Nicaragua Nicaragua 6,916,140 +1.36% 108
Netherlands Netherlands 17,994,237 +0.655% 71
Norway Norway 5,572,272 +0.954% 118
Nepal Nepal 29,651,054 -0.147% 51
Nauru Nauru 11,947 +0.606% 215
New Zealand New Zealand 5,338,500 +1.78% 121
Oman Oman 5,281,538 +4.6% 124
Pakistan Pakistan 251,269,164 +1.52% 5
Panama Panama 4,515,577 +1.27% 128
Peru Peru 34,217,848 +1.1% 48
Philippines Philippines 115,843,670 +0.829% 14
Palau Palau 17,695 -0.181% 214
Papua New Guinea Papua New Guinea 10,576,502 +1.8% 91
Poland Poland 36,554,707 -0.362% 42
Puerto Rico Puerto Rico 3,203,295 -0.0155% 134
North Korea North Korea 26,498,823 +0.305% 56
Portugal Portugal 10,701,636 +1.17% 89
Paraguay Paraguay 6,929,153 +1.24% 107
Palestinian Territories Palestinian Territories 5,289,152 +2.39% 123
French Polynesia French Polynesia 281,807 +0.245% 180
Qatar Qatar 2,857,822 +7.6% 139
Romania Romania 19,069,340 +0.0517% 66
Russia Russia 143,533,851 -0.203% 9
Rwanda Rwanda 14,256,567 +2.16% 76
Saudi Arabia Saudi Arabia 35,300,280 +4.74% 45
Sudan Sudan 50,448,963 +0.812% 30
Senegal Senegal 18,501,984 +2.35% 68
Singapore Singapore 6,036,860 +2.01% 113
Solomon Islands Solomon Islands 819,198 +2.4% 164
Sierra Leone Sierra Leone 8,642,022 +2.15% 101
El Salvador El Salvador 6,338,193 +0.453% 111
San Marino San Marino 33,977 +0.346% 212
Somalia Somalia 19,009,151 +3.54% 67
Serbia Serbia 6,587,202 -0.543% 109
South Sudan South Sudan 11,943,408 +4.01% 80
São Tomé & Príncipe São Tomé & Príncipe 235,536 +2.02% 181
Suriname Suriname 634,431 +0.882% 168
Slovakia Slovakia 5,422,069 -0.0861% 119
Slovenia Slovenia 2,126,324 +0.276% 148
Sweden Sweden 10,569,709 +0.314% 92
Eswatini Eswatini 1,242,822 +1% 159
Sint Maarten Sint Maarten 43,350 +1.41% 206
Seychelles Seychelles 121,354 +1.32% 187
Syria Syria 24,672,760 +4.57% 57
Turks & Caicos Islands Turks & Caicos Islands 46,535 +0.729% 204
Chad Chad 20,299,123 +5.07% 64
Togo Togo 9,515,236 +2.27% 97
Thailand Thailand 71,668,011 -0.048% 20
Tajikistan Tajikistan 10,590,927 +1.94% 90
Turkmenistan Turkmenistan 7,494,498 +1.77% 104
Timor-Leste Timor-Leste 1,400,638 +1.18% 154
Tonga Tonga 104,175 -0.403% 192
Trinidad & Tobago Trinidad & Tobago 1,368,333 +0.0602% 156
Tunisia Tunisia 12,277,109 +0.628% 79
Turkey Turkey 85,518,661 +0.226% 18
Tuvalu Tuvalu 9,646 -1.73% 216
Tanzania Tanzania 68,560,157 +2.92% 22
Uganda Uganda 50,015,092 +2.79% 31
Ukraine Ukraine 37,860,221 +0.338% 41
Uruguay Uruguay 3,386,588 -0.0441% 133
United States United States 340,110,988 +0.981% 3
Uzbekistan Uzbekistan 36,361,859 +1.99% 43
St. Vincent & Grenadines St. Vincent & Grenadines 100,616 -0.698% 193
Venezuela Venezuela 28,405,543 +0.37% 53
British Virgin Islands British Virgin Islands 39,471 +1.25% 208
U.S. Virgin Islands U.S. Virgin Islands 104,377 -0.515% 191
Vietnam Vietnam 100,987,686 +0.633% 16
Vanuatu Vanuatu 327,777 +2.3% 177
Samoa Samoa 218,019 +0.626% 182
Kosovo Kosovo 1,527,324 -9.23% 153
Yemen Yemen 40,583,164 +3.03% 38
South Africa South Africa 64,007,187 +1.26% 24
Zambia Zambia 21,314,956 +2.85% 62
Zimbabwe Zimbabwe 16,634,373 +1.8% 73

The 'Population, total' indicator is a key statistic that represents the total number of inhabitants residing in a particular area at a specified time. It is a fundamental demographic measure that signifies the human capital in a given region, influencing socio-economic planning, resource allocation, and policy formulation. As of 2019, the world population reached approximately 7.67 billion, reflecting a significant increase from previous decades. Understanding this growth is paramount as it has far-reaching implications across multiple domains, including economic development, environmental sustainability, and social welfare.

The importance of total population figures transcends mere numbers; they serve as a basis for various strategic interventions in health, education, infrastructure, and public services. A rapidly growing population may necessitate increased investments in these areas, while a declining population may indicate shifts in economic productivity, labor market challenges, and potential implications on social services. In 2019, the median population value was recorded at 6,955,000, demonstrating the substantial demographic variance across different regions worldwide.

In analyzing the data further, it is essential to consider the top five countries with the largest populations: China (1,397,295,000), India (1,366,418,000), the United States (329,534,000), Indonesia (270,626,000), and Pakistan (216,565,000). These nations not only contribute significantly to the global population but also face unique challenges and opportunities regarding economic growth, urbanization, and resource management. For instance, both China and India are experiencing pressure on their infrastructure and environmental resources, calling for innovative solutions to manage their burgeoning populations efficiently. The socio-economic dynamics in the United States and Indonesia reflect advanced industrialization and varying levels of development, influencing their population management strategies.

Conversely, the bottom five areas with the smallest populations—Tuvalu (12,000), Palau (18,000), Gibraltar (34,000), San Marino (34,000), and Liechtenstein (38,000)—represent a different picture. These regions, often characterized by their geographical isolation and specific socio-economic conditions, face challenges related to economic sustainability, labor shortages, and the management of natural resources. Their small populations might foster a tightly-knit community dynamic, but they could also limit economic growth and diversification.

The world population data illustrates a consistent increase over the decades, with significant milestones such as reaching 6 billion in 1999 and pushing past 7 billion by 2011. Notably, in 2019, the global population rose to approximately 7.67 billion, emphasizing a steady upward trajectory that demands ongoing analysis and policy response. This growth can be attributed to various factors, including advancements in healthcare leading to lower mortality rates, increased fertility rates in some regions, and migration trends that influence demographic shifts.

Relationships between total population and other indicators such as GDP, literacy rates, and health care access highlight the interconnected nature of demographic statistics. For instance, higher population growth can lead to greater economic output but may also strain public services and infrastructure. Alternatively, a population with higher literacy rates may drive innovation and economic development, thereby impacting population structure and dynamics. Understanding these relationships is crucial for formulating effective strategies for managing population growth and its associated challenges.

Factors affecting population growth include birth rates, death rates, and migration patterns. Fertility rates tend to be higher in developing regions, where cultural norms and socioeconomic conditions often favor larger families. As nations industrialize and access to education improves, particularly for women, birth rates typically decline. Migration both positively and negatively affects local populations; immigration can bolster a country's workforce while emigration may lead to brain drain in the country of origin. Recent patterns demonstrate that urbanization is another factor influencing population dynamics, as people move towards cities in search of better opportunities, thereby altering rural population distributions.

Strategies for managing total population challenges involve holistic and sustainable approaches. Governments and organizations must prioritize education, particularly for women and girls, as this has been shown to correlate with lower fertility rates. Additionally, investments in health care, sanitation, and public infrastructure can alleviate some pressures posed by population growth. Policies aimed at enhancing the economic opportunities of smaller communities, particularly in low-population areas, can prevent youth migration and promote localized economic development.

Despite the importance of tracking total population figures, there are flaws in data collection that need addressing. Discrepancies in census accuracy, underreporting in certain regions, and varying definitions of population metrics can lead to misleading statistics. Thus, improving methods of demographic data collection and analysis is critical for informing policy decisions and fostering a clearer understanding of population dynamics.

In conclusion, the total population indicator serves as a vital measurement with extensive implications for economic, social, and environmental strategies globally. By understanding the complexities surrounding population numbers and their relationships to other indicators, policymakers can better equip themselves to manage growth sustainably and equitably, ensuring that the needs of both large and small population areas are met in an increasingly interconnected world.

                    
# Install missing packages
import sys
import subprocess

def install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", package])

# Required packages
for package in ['wbdata', 'country_converter']:
try:
__import__(package)
except ImportError:
install(package)

# Import libraries
import wbdata
import country_converter as coco
from datetime import datetime

# Define World Bank indicator code
dataset_code = 'SP.POP.TOTL'

# Download data from World Bank API
data = wbdata.get_dataframe({dataset_code: 'value'},
date=(datetime(1960, 1, 1), datetime.today()),
parse_dates=True,
keep_levels=True).reset_index()

# Extract year
data['year'] = data['date'].dt.year

# Convert country names to ISO codes using country_converter
cc = coco.CountryConverter()
data['iso2c'] = cc.convert(names=data['country'], to='ISO2', not_found=None)
data['iso3c'] = cc.convert(names=data['country'], to='ISO3', not_found=None)

# Filter out rows where ISO codes could not be matched — likely not real countries
data = data[data['iso2c'].notna() & data['iso3c'].notna()]

# Sort for calculation
data = data.sort_values(['iso3c', 'year'])

# Calculate YoY absolute and percent change
data['value_change'] = data.groupby('iso3c')['value'].diff()
data['value_change_percent'] = data.groupby('iso3c')['value'].pct_change() * 100

# Calculate ranks (higher GDP per capita = better rank)
data['rank'] = data.groupby('year')['value'].rank(ascending=False, method='dense')

# Calculate rank change from previous year
data['rank_change'] = data.groupby('iso3c')['rank'].diff()

# Select desired columns
final_df = data[['country', 'iso2c', 'iso3c', 'year', 'value',
'value_change', 'value_change_percent', 'rank', 'rank_change']].copy()

# Optional: Add labels as metadata (could be useful for export or UI)
column_labels = {
'country': 'Country name',
'iso2c': 'ISO 2-letter country code',
'iso3c': 'ISO 3-letter country code',
'year': 'Year',
'value': 'GDP per capita (current US$)',
'value_change': 'Year-over-Year change in value',
'value_change_percent': 'Year-over-Year percent change in value',
'rank': 'Country rank by GDP per capita (higher = richer)',
'rank_change': 'Change in rank from previous year'
}

# Display first few rows
print(final_df.head(10))

# Optional: Save to CSV
#final_df.to_csv("gdp_per_capita_cleaned.csv", index=False)
                    
                
                    
# Check and install required packages
required_packages <- c("WDI", "countrycode", "dplyr")

for (pkg in required_packages) {
  if (!requireNamespace(pkg, quietly = TRUE)) {
    install.packages(pkg)
  }
}

# Load the necessary libraries
library(WDI)
library(dplyr)
library(countrycode)

# Define the dataset code (World Bank indicator code)
dataset_code <- 'SP.POP.TOTL'

# Download data using WDI package
dat <- WDI(indicator = dataset_code)

# Filter only countries using 'is_country' from countrycode
# This uses iso2c to identify whether the entry is a recognized country
dat <- dat %>%
  filter(countrycode(iso2c, origin = 'iso2c', destination = 'country.name', warn = FALSE) %in%
           countrycode::codelist$country.name.en)

# Ensure dataset is ordered by country and year
dat <- dat %>%
  arrange(iso3c, year)

# Rename the dataset_code column to "value" for easier manipulation
dat <- dat %>%
  rename(value = !!dataset_code)

# Calculate year-over-year (YoY) change and percentage change
dat <- dat %>%
  group_by(iso3c) %>%
  mutate(
    value_change = value - lag(value),                              # Absolute change from previous year
    value_change_percent = 100 * (value - lag(value)) / lag(value) # Percent change from previous year
  ) %>%
  ungroup()

# Calculate rank by year (higher value => higher rank)
dat <- dat %>%
  group_by(year) %>%
  mutate(rank = dense_rank(desc(value))) %>% # Rank countries by descending value
  ungroup()

# Calculate rank change (positive = moved up, negative = moved down)
dat <- dat %>%
  group_by(iso3c) %>%
  mutate(rank_change = rank - lag(rank)) %>% # Change in rank compared to previous year
  ungroup()

# Select and reorder final columns
final_data <- dat %>%
  select(
    country,
    iso2c,
    iso3c,
    year,
    value,
    value_change,
    value_change_percent,
    rank,
    rank_change
  )

# Add labels (variable descriptions)
attr(final_data$country, "label") <- "Country name"
attr(final_data$iso2c, "label") <- "ISO 2-letter country code"
attr(final_data$iso3c, "label") <- "ISO 3-letter country code"
attr(final_data$year, "label") <- "Year"
attr(final_data$value, "label") <- "GDP per capita (current US$)"
attr(final_data$value_change, "label") <- "Year-over-Year change in value"
attr(final_data$value_change_percent, "label") <- "Year-over-Year percent change in value"
attr(final_data$rank, "label") <- "Country rank by GDP per capita (higher = richer)"
attr(final_data$rank_change, "label") <- "Change in rank from previous year"

# Print the first few rows of the final dataset
print(head(final_data, 10))