Government expenditure per student, primary (% of GDP per capita)

Source: worldbank.org, 01.09.2025

Year: 2016

Flag Country Value Value change, % Rank
Afghanistan Afghanistan 10.3 +0.917% 69
Andorra Andorra 12.7 -5.3% 61
Argentina Argentina 15.2 -2.69% 50
Armenia Armenia 11.3 +2.52% 67
Australia Australia 19.3 +2.75% 30
Austria Austria 23.5 +1.19% 12
Belgium Belgium 21.9 -0.707% 15
Belize Belize 16.2 +7.44% 43
Barbados Barbados 20.8 -6.26% 23
Brunei Brunei 8.87 +76.8% 75
Switzerland Switzerland 24.8 +0.899% 8
Chile Chile 18.3 +20.5% 32
Côte d’Ivoire Côte d’Ivoire 15.8 +14.6% 49
Colombia Colombia 17.4 +0.162% 34
Cape Verde Cape Verde 17.1 +2.67% 38
Costa Rica Costa Rica 24.9 -6.91% 7
Cyprus Cyprus 31.9 -0.954% 3
Czechia Czechia 13.9 -7.22% 57
Germany Germany 17.4 -0.376% 35
Djibouti Djibouti 37.3 +61.5% 1
Dominican Republic Dominican Republic 15.8 +5.93% 48
Ecuador Ecuador 9.51 +0.841% 72
Spain Spain 17.1 -0.912% 37
Estonia Estonia 20.3 +1.48% 25
Finland Finland 21.5 -2.21% 21
France France 17.4 -0.997% 36
United Kingdom United Kingdom 24.2 -3.23% 10
Guinea Guinea 6.81 +12.1% 78
Greece Greece 20.3 +0.335% 26
Guatemala Guatemala 11.1 +10.1% 68
Hong Kong SAR China Hong Kong SAR China 15 +1.16% 51
Hungary Hungary 19.1 +2.1% 31
Ireland Ireland 11.8 +0.111% 63
Iran Iran 9.52 +26% 71
Iceland Iceland 22.1 -3.06% 14
Israel Israel 21.5 +0.88% 20
Italy Italy 19.5 -10.2% 28
Jamaica Jamaica 21.8 -1.83% 17
Jordan Jordan 14.9 -1.82% 52
Japan Japan 21.8 -3.39% 16
South Korea South Korea 27.8 +64.7% 5
Liberia Liberia 14.5 +268% 53
St. Lucia St. Lucia 16.5 +3.43% 41
Sri Lanka Sri Lanka 14.4 +93.8% 54
Lithuania Lithuania 19.5 +4.82% 29
Latvia Latvia 24.5 -8.45% 9
Monaco Monaco 3.31 -4.85% 82
Moldova Moldova 32.5 -6.55% 2
Maldives Maldives 16.1 -14% 47
Mexico Mexico 13.8 -4.43% 58
Mali Mali 9.34 -30.5% 73
Mongolia Mongolia 16.6 +25.8% 40
Mauritania Mauritania 10.2 +6.09% 70
Mauritius Mauritius 14.1 +12.5% 56
Malawi Malawi 8.16 -14.6% 76
Malaysia Malaysia 16.1 +0.305% 46
Niger Niger 16.5 -26.9% 42
Netherlands Netherlands 16.7 -1.05% 39
Norway Norway 21.7 +0.945% 19
New Zealand New Zealand 20.3 +10.8% 24
Oman Oman 31.8 +103% 4
Peru Peru 11.5 -8.59% 66
Poland Poland 23.1 -3.22% 13
Paraguay Paraguay 11.7 +8.61% 65
Romania Romania 7.83 -9.55% 77
Rwanda Rwanda 5.47 -1.29% 80
Senegal Senegal 11.8 -14.1% 64
Sierra Leone Sierra Leone 5.66 -7.8% 79
El Salvador El Salvador 16.2 +19.2% 45
South Sudan South Sudan 4.58 +34.1% 81
Slovakia Slovakia 20.8 -3.97% 22
Slovenia Slovenia 23.6 -4% 11
Sweden Sweden 21.7 +1.9% 18
Seychelles Seychelles 14.2 -10.4% 55
Togo Togo 16.2 +0.392% 44
Turkey Turkey 13 -9.65% 59
Ukraine Ukraine 26.3 -2.9% 6
Uruguay Uruguay 12.4 +2.93% 62
United States United States 19.9 +0.498% 27
St. Vincent & Grenadines St. Vincent & Grenadines 17.9 +7.3% 33
Samoa Samoa 8.97 -15.1% 74
Zambia Zambia 12.9 -9.82% 60

Government expenditure per student in primary education, expressed as a percentage of GDP per capita, serves as a critical indicator of a country's commitment to education and its prioritization of nurturing human capital. This metric reflects not only the financial resources allocated to the education sector but also the broader economic context within which these investments occur. It provides insight into how governments view the importance of education in the overall development of the nation and outlines the socio-economic landscape that shapes educational policy decisions.

The importance of government expenditure per student cannot be overstated. A higher percentage suggests that a country is investing sufficient resources into its primary education system, which can lead to improved educational outcomes, higher literacy rates, and better overall economic productivity. This is a vital aspect because investment in education is closely linked to sustainable economic growth. When a government allocates more funds for education, it enables schools to improve facilities, hire qualified teachers, and provide adequate learning materials, ultimately leading to a more educated populace capable of contributing to the economy.

Moreover, this indicator often correlates with various other social and economic indicators. For instance, countries that invest significantly in education tend to experience lower poverty rates and reduced income inequality. This is because education is a powerful tool for social mobility; it provides individuals with the skills and knowledge necessary to secure better employment opportunities. Hence, government expenditure per student serves as a predictor of future socio-economic stability and growth.

Several factors affect government expenditure per student, primarily the nation’s overall economic condition and budgetary priorities. In countries facing economic constraints, education often competes with other pressing needs such as healthcare, infrastructure, and national defense for funding. The political will to prioritize education plays a crucial role as well. Governments committed to enhancing their education systems are more likely to allocate a larger percentage of GDP per capita to primary education, even in challenging economic times.

Another influencing factor is population demographics. Countries with a larger proportion of young people may need to allocate more resources to education to accommodate the growing number of students. Conversely, nations with aging populations might shift priorities toward healthcare, thereby allocating less to education.

Identifying strategies to enhance government expenditure per student requires a multi-faceted approach. Implementing policies that prioritize education in national budgets is essential. Governments should assess their spending patterns and aim to funnel more resources into education without compromising other critical sectors. International cooperation can also play a significant role, as foreign aid and investment often help developing countries bolster their education systems.

Additionally, community involvement in education can lead to innovative funding strategies. Engaging local communities in decision-making and resource mobilization can help ensure that spending is aligned with actual needs and can increase local investment in education.

Despite its importance, the indicator of government expenditure per student has its flaws. For one, simply increasing financial allocations does not guarantee improved educational outcomes. These funds must be utilized efficiently and effectively, coupled with robust governance, accountability mechanisms, and quality improvements in teaching and curricula. Moreover, countries with a low percentage of expenditure per student may still have relatively good educational outcomes due to other factors such as cultural value placed on education, robust community involvement, and innovative teaching practices.

Analyzing the latest data from 2018 reveals intriguing insights into the state of global education expenditure. The median value of government expenditure per student in primary education stood at 14.01% of GDP per capita. This suggests that while many countries recognize education as a vital investment, significant disparities exist in funding levels.

Focusing on the top five areas, we find Moldova leading with an expenditure of 32.53%. This robust investment reflects the nation's prioritization of education, likely resulting in better educational outcomes for children. Jamaica follows with 21.68%, Costa Rica at 20.83%, Lesotho with 20.71%, and South Africa at 17.94%. These regions share a positive outlook towards education, which correlates with better literacy rates and economic growth prospects.

Conversely, the bottom five areas reveal concerning trends. Kazakhstan, with just 0.24%, shows an alarming lack of investment in primary education. Rwanda, at 4.26%, along with Turks & Caicos Islands at 5.7%, Myanmar at 7.81%, and Sri Lanka at 7.92%, collectively highlight regions where significant underinvestment in education could jeopardize the future economic potential and social stability of these nations.

In contrast to the listed figures from 2018, previous years (2010 through 2013) indicated a relatively stable expenditure range, with values hovering around 15% of GDP per capita. This slight decline in expenditure could suggest a global trend towards either economic constraints for some nations or shifting political priorities away from education during those years.

Ultimately, understanding and addressing the nuances surrounding government expenditure per student can empower nations to make informed decisions regarding their education systems. By recognizing the importance of investing in primary education, governments can position themselves on a path toward sustainable development and improved quality of life for their citizens.

                    
# 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 = 'SE.XPD.PRIM.PC.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 <- 'SE.XPD.PRIM.PC.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))