Government expenditure on education, total (% of government expenditure)

Source: worldbank.org, 01.09.2025

Year: 2023

Flag Country Value Value change, % Rank
Angola Angola 7.74 +16.5% 67
Andorra Andorra 12.8 +83.4% 42
Antigua & Barbuda Antigua & Barbuda 9.8 +6.93% 57
Burundi Burundi 15.7 -23.8% 24
Benin Benin 19 +18.3% 12
Burkina Faso Burkina Faso 20.3 -7.56% 10
Bangladesh Bangladesh 10.7 -8.47% 51
Bahamas Bahamas 11.6 +1.33% 47
Belize Belize 18.5 +3.93% 14
Barbados Barbados 12.5 -2.02% 44
Bhutan Bhutan 17.8 -9.43% 17
Central African Republic Central African Republic 9.99 -6.96% 55
Côte d’Ivoire Côte d’Ivoire 15.9 +0.273% 23
Cameroon Cameroon 13.1 +2.47% 39
Congo - Brazzaville Congo - Brazzaville 14.7 -5.03% 30
Cape Verde Cape Verde 14.7 -6.3% 31
Dominica Dominica 6.41 -31.5% 70
Dominican Republic Dominican Republic 22 -1.51% 6
Algeria Algeria 13.3 +1.22% 38
Ecuador Ecuador 9.69 +4.32% 58
Fiji Fiji 14.6 +15.7% 32
Gabon Gabon 13.6 -1.72% 37
Ghana Ghana 12 -8.68% 45
Gibraltar Gibraltar 8.83 +12.9% 62
Guinea Guinea 10 -16.1% 54
Gambia Gambia 17.5 +20.8% 19
Grenada Grenada 14.4 +45.4% 33
Honduras Honduras 15.4 -33.6% 26
Haiti Haiti 11.2 -14.4% 49
Kuwait Kuwait 12.6 +2.58% 43
Laos Laos 9.8 -0.216% 56
Sri Lanka Sri Lanka 8.68 +62.3% 63
Lesotho Lesotho 11.3 -27.5% 48
Morocco Morocco 22.8 -4.36% 4
Monaco Monaco 7.73 +61.2% 68
Maldives Maldives 10.6 -4.01% 52
Mali Mali 19.1 +5.12% 11
Mauritania Mauritania 9.53 +12.7% 59
Malaysia Malaysia 17.1 -15.1% 20
Namibia Namibia 25 -1.39% 2
Niger Niger 12.8 +3.52% 41
Nigeria Nigeria 4.4 +2.36% 71
Nicaragua Nicaragua 17.7 -8.83% 18
Pakistan Pakistan 8.34 -11.3% 66
Panama Panama 11.9 -24.2% 46
Peru Peru 18.9 +14.7% 13
Philippines Philippines 16.7 +6.57% 21
Palau Palau 9.53 -6.37% 60
North Korea North Korea 15.1 +8.82% 27
Paraguay Paraguay 22 -8.64% 7
Rwanda Rwanda 14.8 +15.7% 29
Senegal Senegal 22.5 +0.299% 5
Solomon Islands Solomon Islands 25.9 +0.433% 1
São Tomé & Príncipe São Tomé & Príncipe 18.3 +7.37% 15
Suriname Suriname 7.54 -31.2% 69
Sint Maarten Sint Maarten 23 +1.92% 3
Turks & Caicos Islands Turks & Caicos Islands 9.27 -26.3% 61
Chad Chad 16.5 -1.42% 22
Togo Togo 14.8 +2.4% 28
Turkmenistan Turkmenistan 20.4 -28.9% 9
Tonga Tonga 8.44 -13.5% 65
Tunisia Tunisia 18.1 -9.33% 16
Tuvalu Tuvalu 10.5 53
Tanzania Tanzania 13.7 -4.38% 36
Uganda Uganda 8.63 +1.7% 64
Uruguay Uruguay 15.4 +3.37% 25
St. Vincent & Grenadines St. Vincent & Grenadines 12.9 -15.6% 40
Venezuela Venezuela 0.00924 72
British Virgin Islands British Virgin Islands 11.1 -9.14% 50
Vanuatu Vanuatu 20.9 -0.202% 8
Samoa Samoa 13.7 +27.5% 35
Zambia Zambia 13.9 +12% 34

Government expenditure on education, measured as a percentage of total government expenditure, is a crucial indicator reflecting a country's commitment to fostering human capital and supporting economic growth. This metric provides insights into how much value a government places on education in relation to other public spending areas, such as healthcare, infrastructure, and defense. In 2023, the global median for government expenditure on education stands at 13.64%, a slight decline from historical highs but still indicative of the importance placed on educational investments in many countries.

This indicator holds significant importance as it directly correlates with various socio-economic factors. Higher expenditure in education is generally associated with improved educational outcomes, literacy rates, and overall human development. Countries that prioritize educational funding often witness a more skilled workforce, which in turn can lead to increased productivity and economic growth. Moreover, investing in education can help to reduce poverty and inequality, as access to quality education is a key driver of upward social mobility.

In analyzing the global landscape of government expenditure on education in 2023, we see notable disparities across different regions. The top five areas investing the most in education as a percentage of their total government expenditure are the Solomon Islands (25.89%), Namibia (24.97%), Sint Maarten (23.04%), Morocco (22.83%), and Senegal (22.55%). These nations exemplify a strong commitment to prioritizing education, aiming to build a foundation for sustainable development. For instance, in the Solomon Islands, a significant percentage allocated to education could be indicative of efforts to enhance skills training and improve literacy rates, which are essential for a developing economy.

Conversely, the bottom five areas reflect concerning trends. Venezuela (0.0092%), Nigeria (4.4%), Dominica (6.41%), Suriname (7.54%), and Monaco (7.73%) showcase a stark contrast to their more educationally focused counterparts. Particularly in Venezuela, the minimal allocation towards education reveals an urgent need for reform, as such underfunding can severely hamper the development of human capital necessary for the country’s recovery and growth. Nigeria's low percentage also raises alarms, as the country struggles with significant educational challenges, including high dropout rates and inadequate infrastructure.

The relationship between government expenditure on education and other indicators is intricate. For example, higher spending on education is often correlated with better health outcomes and lower crime rates. A well-educated population typically requires fewer healthcare resources and is generally more inclined toward community engagement, which can result in safer neighborhoods. Conversely, low educational expenditure can lead to poor health outcomes and increased crime rates, thus creating a vicious cycle of poverty and underdevelopment.

Multiple factors can affect government expenditure on education. Economic conditions play a significant role; countries experiencing economic growth may allocate more resources to education. In contrast, during economic downturns or crises, educational spending may be among the first budgets to be cut, as governments prioritize immediate financial stability over long-term investments. Political will is another critical driver, as leaders committed to educational reform will advocate for necessary funding. Additionally, social factors, such as public demand for better education, influence governmental decisions regarding expenditure. In societies where the value of education is deeply ingrained, citizens often advocate for increased funding and accountability.

Adopting strategies to enhance government expenditure on education is crucial for sustainable growth. Governments should aim to increase the ratio of educational funding through a combination of policy reform and effective budget management. Enhancing the efficiency of educational spending is equally important, ensuring that funds are channeled into programs that create measurable impacts. Collaborations with international organizations can provide additional funding resources and expertise, facilitating improvements in educational infrastructure, teacher training, and curriculum development.

Despite the significance of government expenditure on education, it is critical to recognize inherent flaws in this indicator. Solely relying on percentages to gauge educational quality can be misleading. A country with high expenditure may still struggle with poor educational outcomes due to mismanagement, lack of accountability, or corruption. Furthermore, the effectiveness of spending should also consider the socio-economic context, as disparities in wealth distribution can make even high investments ineffective if not equitably allocated.

The historical data from 2000 to 2022 reveals a fluctuating commitment to educational funding globally. The peak in the early 2000s (14.1%) and the decline observed during the COVID-19 pandemic (12.85% in 2020, followed by 12.78% in 2021) indicate vulnerabilities in sustained education funding. However, a rebound to 13.83% in 2022 suggests that nations are beginning to recover and recognize the importance of education as a cornerstone of post-pandemic recovery. This trend will be crucial as governments navigate future uncertainties and strategize the reallocation of resources toward education.

In conclusion, government expenditure on education as a percentage of total government expenditure serves as an essential lens through which to assess national and global educational priorities. While notable advancements can emerge from increased investment, the commitment must be long-term and accompanied by effective management strategies to ensure that such funding translates into meaningful educational outcomes. Moving forward, a concerted effort is necessary to rectify discrepancies and reinforce the idea that education is not merely a line-item budget but a vital investment in a nation’s future.

                    
# 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.TOTL.GB.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.TOTL.GB.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))