Current health expenditure (% of GDP)

Source: worldbank.org, 03.09.2025

Year: 2022

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 23.1 +7.34% 1
Angola Angola 2.93 -5.35% 176
Albania Albania 6.19 -16.3% 102
Andorra Andorra 7.54 -9.57% 72
United Arab Emirates United Arab Emirates 4.68 -11.9% 132
Argentina Argentina 9.86 -1.75% 30
Armenia Armenia 9.96 -19.2% 27
Antigua & Barbuda Antigua & Barbuda 5.73 +14.8% 111
Australia Australia 9.93 -4.78% 29
Austria Austria 11.2 -8.19% 16
Azerbaijan Azerbaijan 3.98 -15.1% 156
Burundi Burundi 8.4 -6.67% 56
Belgium Belgium 10.8 -2.58% 19
Benin Benin 2.68 +3.82% 183
Burkina Faso Burkina Faso 6.77 +5.69% 90
Bangladesh Bangladesh 2.39 +1.05% 187
Bulgaria Bulgaria 7.66 -11.1% 67
Bahrain Bahrain 3.84 -14.6% 160
Bahamas Bahamas 7.22 +3.01% 82
Bosnia & Herzegovina Bosnia & Herzegovina 8.72 -8.78% 52
Belarus Belarus 6.66 +1.43% 94
Belize Belize 4.23 -16.3% 151
Bolivia Bolivia 8.43 +3.33% 55
Brazil Brazil 9.14 -5.12% 43
Barbados Barbados 6.29 -20.7% 101
Brunei Brunei 1.82 -15.3% 191
Bhutan Bhutan 4.39 +42.7% 143
Botswana Botswana 5.73 -9.18% 112
Central African Republic Central African Republic 9.96 +8.77% 28
Canada Canada 11.2 -9.54% 15
Switzerland Switzerland 11.7 -2.48% 13
Chile Chile 10.1 +3.88% 25
China China 5.37 -0.262% 118
Côte d’Ivoire Côte d’Ivoire 3.64 -3.18% 166
Cameroon Cameroon 4.48 +4.02% 141
Congo - Kinshasa Congo - Kinshasa 3.79 +2.95% 161
Congo - Brazzaville Congo - Brazzaville 2.19 -37.2% 188
Colombia Colombia 7.57 -16% 71
Comoros Comoros 8.38 +30.3% 57
Cape Verde Cape Verde 6.67 -8.78% 93
Costa Rica Costa Rica 7.18 -5.62% 84
Cuba Cuba 11.8 -14.5% 11
Cyprus Cyprus 8.87 -6.38% 47
Czechia Czechia 8.8 -6.91% 49
Germany Germany 12.6 -2.3% 9
Djibouti Djibouti 2.5 -13.5% 186
Dominica Dominica 6.32 +0.0488% 99
Denmark Denmark 9.48 -11.8% 39
Dominican Republic Dominican Republic 4.57 -7.03% 137
Algeria Algeria 3.62 -27.7% 168
Ecuador Ecuador 7.53 -8.19% 73
Egypt Egypt 4.7 +2.06% 130
Eritrea Eritrea 3.87 -7.27% 159
Spain Spain 9.74 -5.53% 32
Estonia Estonia 6.99 -6.57% 85
Ethiopia Ethiopia 2.85 -11.1% 181
Finland Finland 9.66 -1.79% 34
Fiji Fiji 4.01 -43.2% 155
France France 11.9 -3.34% 10
Micronesia (Federated States of) Micronesia (Federated States of) 10.3 -9.36% 23
Gabon Gabon 2.86 +6.16% 180
United Kingdom United Kingdom 11.1 -8.06% 17
Georgia Georgia 7.26 -12.7% 79
Ghana Ghana 3.7 -4.17% 164
Guinea Guinea 3.96 +6.48% 157
Gambia Gambia 3.41 +6.95% 169
Guinea-Bissau Guinea-Bissau 8.11 -0.609% 60
Equatorial Guinea Equatorial Guinea 2.91 -14.2% 178
Greece Greece 8.5 -7.46% 53
Grenada Grenada 4.95 -7.41% 125
Guatemala Guatemala 7.44 +6.65% 75
Guyana Guyana 3.01 -38.9% 175
Honduras Honduras 8.28 -9.59% 58
Croatia Croatia 7.22 -9.96% 83
Haiti Haiti 3.21 -6.79% 173
Hungary Hungary 6.69 -9.39% 92
Indonesia Indonesia 2.69 -27.3% 182
India India 3.31 -1.22% 171
Ireland Ireland 6.12 -7.22% 104
Iran Iran 5.35 -7.3% 120
Iraq Iraq 4.29 -18.2% 147
Iceland Iceland 9.29 -5.12% 42
Israel Israel 7.34 -4.3% 78
Italy Italy 9.03 -3.39% 44
Jamaica Jamaica 7.78 +8.24% 64
Jordan Jordan 6.83 -5.19% 89
Japan Japan 11.4 +2.07% 14
Kazakhstan Kazakhstan 3.74 -4.7% 162
Kenya Kenya 4.33 -5.24% 146
Kyrgyzstan Kyrgyzstan 4.92 -8.04% 126
Cambodia Cambodia 4.71 -14.7% 129
Kiribati Kiribati 10.5 -9.91% 21
St. Kitts & Nevis St. Kitts & Nevis 5.57 -9.89% 115
South Korea South Korea 9.43 +5.32% 40
Kuwait Kuwait 4.27 -22.4% 149
Laos Laos 2.02 -26.4% 190
Lebanon Lebanon 5.74 +18.1% 110
Liberia Liberia 13.5 -2.63% 7
Libya Libya 4.65 -25.2% 133
St. Lucia St. Lucia 5.02 -11.6% 124
Sri Lanka Sri Lanka 4.36 +8.3% 144
Lesotho Lesotho 12.7 +17% 8
Lithuania Lithuania 7.24 -6.65% 80
Luxembourg Luxembourg 5.55 -1.93% 116
Latvia Latvia 7.62 -16.3% 69
Morocco Morocco 5.68 +2.86% 114
Monaco Monaco 3.4 -7.48% 170
Moldova Moldova 6.97 -10.1% 86
Madagascar Madagascar 3.25 -7.26% 172
Maldives Maldives 9.65 -4.39% 36
Mexico Mexico 5.72 -2.9% 113
Marshall Islands Marshall Islands 11.7 -6.42% 12
North Macedonia North Macedonia 7.62 -10.6% 70
Mali Mali 3.67 +5.95% 165
Malta Malta 9.52 -8.1% 38
Myanmar (Burma) Myanmar (Burma) 5.2 -10.8% 122
Montenegro Montenegro 10.9 +3.51% 18
Mongolia Mongolia 8.85 +22.8% 48
Mozambique Mozambique 8.78 -1.04% 50
Mauritania Mauritania 4.48 +18.6% 140
Mauritius Mauritius 5.82 -12% 108
Malawi Malawi 6.5 -14.8% 96
Malaysia Malaysia 3.91 -10.7% 158
Namibia Namibia 9.3 -0.442% 41
Niger Niger 4.35 -25.1% 145
Nigeria Nigeria 4.27 +4.78% 148
Nicaragua Nicaragua 8.95 -6.66% 45
Netherlands Netherlands 10.1 -9.21% 24
Norway Norway 7.95 -19% 61
Nepal Nepal 6.66 +25% 95
Nauru Nauru 18.2 +51.4% 3
New Zealand New Zealand 10 +0.0916% 26
Oman Oman 2.92 -33.3% 177
Pakistan Pakistan 2.9 -2.87% 179
Panama Panama 8.47 -7.33% 54
Peru Peru 6.09 -8.78% 105
Philippines Philippines 5.16 -13.7% 123
Palau Palau 14.3 -2.34% 6
Papua New Guinea Papua New Guinea 2.62 +11.9% 185
Poland Poland 6.4 -0.657% 98
Portugal Portugal 10.5 -5.89% 22
Paraguay Paraguay 7.74 -3.67% 65
Palestinian Territories Palestinian Territories 9.73 -6.72% 33
Qatar Qatar 2.18 -24.6% 189
Romania Romania 5.75 -11.1% 109
Russia Russia 6.92 -0.802% 88
Rwanda Rwanda 7.88 +7.88% 63
Saudi Arabia Saudi Arabia 4.62 -22% 134
Sudan Sudan 4.62 +63.1% 135
Senegal Senegal 4.06 -8.53% 154
Singapore Singapore 4.9 -5.22% 127
Solomon Islands Solomon Islands 4.82 -2.5% 128
Sierra Leone Sierra Leone 7.95 -7.08% 62
El Salvador El Salvador 9.84 -2.82% 31
San Marino San Marino 7.41 -1.41% 76
Somalia Somalia 2.62 +2.06% 184
Serbia Serbia 9.66 -3.52% 35
South Sudan South Sudan 6.76 +8.08% 91
São Tomé & Príncipe São Tomé & Príncipe 7.46 -5.02% 74
Suriname Suriname 5.92 +8.38% 107
Slovakia Slovakia 7.73 -0.33% 66
Slovenia Slovenia 9.61 +1.31% 37
Sweden Sweden 10.5 -5.43% 20
Eswatini Eswatini 7.22 -2.18% 81
Seychelles Seychelles 4.24 -18.6% 150
Syria Syria 4.15 -11.8% 152
Chad Chad 4.53 +8.3% 139
Togo Togo 6.04 +7.56% 106
Thailand Thailand 5.35 +3.91% 119
Tajikistan Tajikistan 7.63 -8.91% 68
Turkmenistan Turkmenistan 5.37 -2.2% 117
Timor-Leste Timor-Leste 14.3 +25.3% 5
Tonga Tonga 8.14 +6.59% 59
Trinidad & Tobago Trinidad & Tobago 6.43 -9.76% 97
Tunisia Tunisia 6.96 -0.185% 87
Turkey Turkey 3.7 -18.8% 163
Tuvalu Tuvalu 18.4 -5.95% 2
Tanzania Tanzania 3.11 -10.4% 174
Uganda Uganda 4.39 -19.9% 142
Uruguay Uruguay 8.95 +0.321% 46
United States United States 16.5 -5.77% 4
Uzbekistan Uzbekistan 7.36 -4.35% 77
St. Vincent & Grenadines St. Vincent & Grenadines 4.69 -12.6% 131
Venezuela Venezuela 4.55 +10.9% 138
Vietnam Vietnam 4.59 +1.13% 136
Vanuatu Vanuatu 4.15 -8.79% 153
Samoa Samoa 6.3 -7.51% 100
Yemen Yemen 6.19 +0.182% 103
South Africa South Africa 8.77 +1.11% 51
Zambia Zambia 5.26 -20.8% 121
Zimbabwe Zimbabwe 3.63 +30.3% 167

The indicator of Current Health Expenditure as a percentage of Gross Domestic Product (GDP) serves as a vital metric in assessing the financial commitment of nations towards healthcare. This indicator encapsulates the total of public and private health expenditures as a share of the country's GDP, reflecting how much of the economic output is dedicated to health services. Furthermore, it provides insights into the health system's robustness, accessibility, and efficiency.

One of the primary reasons for the importance of this indicator is its ability to indicate the level of investment in health relative to the overall economy. A higher percentage suggests that a country prioritizes health in its economic agenda, potentially leading to improved health outcomes and a better quality of life for its citizens. Conversely, lower values may point to underinvestment, which can result in inadequate healthcare services and poorer health outcomes.

Understanding the relationships between current health expenditure and other indicators is crucial. For instance, there is often a positive correlation between GDP per capita and health expenditure as a percentage of GDP. Wealthier nations tend to allocate a larger share of their GDP to health due to higher income levels, alongside increased expectations for healthcare services. Furthermore, the level of education and population aging can influence health spending, as older populations generally demand more health services.

In 2022, the median value of current health expenditure stood at approximately 8.93% of GDP, with notable variations across different countries. The top spenders, like the United States (16.57%), signify a greater financial commitment to health, suggesting robust healthcare systems designed to cater to a diverse array of health needs. Close behind are Germany (12.65%), the United Kingdom (11.34%), Canada (11.15%), and Sweden (10.67%), all exhibiting substantial investments aimed at ensuring health service accessibility and quality. These nations typically boast advanced healthcare systems characterized by comprehensive coverage, advanced medical technologies, and a focus on preventative care.

In stark contrast, the bottom feeders in the indicator, such as the Philippines (5.1%), Luxembourg (5.46%), Ireland (6.07%), Poland (6.68%), and Estonia (6.94%), reflect different economic priorities or infrastructural challenges. Lower health expenditure can indicate limited resources, potentially leading these countries to experience higher rates of morbidity and mortality from preventable diseases, ultimately placing a strain on their healthcare systems.

The historical trend of world values reveals a gradual increase in health expenditure as a percentage of GDP from 2000 to 2022, with notable spikes, particularly in response to global crises like the COVID-19 pandemic, which caused expenditure to rise to 10.87% in 2020 from 9.81% in 2019. This trend emphasizes the need for countries to adapt their healthcare spending in response to emergent health challenges, ensuring that the healthcare system remains resilient and prepared for future pressures.

Several factors can affect the current health expenditure as a percentage of GDP. Economic growth is a significant factor—during periods of economic downturn, resources available for healthcare may diminish, constraining spending. Conversely, improving economic conditions may allow for increased health investment. Policy decisions, such as the introduction of universal healthcare systems or reforms aimed at reducing out-of-pocket expenditures, can also influence this indicator.

Strategies to improve current health expenditure could involve enhancing government spending on health, increasing efficiency in healthcare delivery systems, and fostering public-private partnerships. Policymakers may prioritize cost-effective prevention strategies such as vaccinations and health education to mitigate future healthcare burdens. Furthermore, targeting specific areas like mental health or chronic disease management can also serve to optimize spending and improve health outcomes.

However, this indicator is not without its flaws. Solely focusing on percentage of GDP can obscure critical nuances, such as the quality of health services or the efficiency of spending. A nation can spend a high percentage of its GDP on health but still provide poor health outcomes if the systems are inefficient or widely inaccessible. Furthermore, international comparisons need to consider variations in economic conditions, demographic contexts, and prevailing health challenges among different nations, making it complex to draw direct comparisons or conclusions solely based on expenditure data.

In summary, the indicator of Current Health Expenditure as a percentage of GDP serves as a critical measurement of national health investment, with a variety of implications for population health and healthcare system performance. The disparities between countries underscore the need for targeted strategies and policies to optimize health outcomes and ensure adequate resource allocation, enabling better overall health for citizens across the globe.

                    
# 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 = 'SH.XPD.CHEX.GD.ZS'

# 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 <- 'SH.XPD.CHEX.GD.ZS'

# 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))