DataBrighten

    Expenditure on primary education (% of government expenditure on education)

    2,873 × 6rows × columns: 186 countries, 1970 to 2019

    Real data: World Bank, World Development Indicators, indicator SE.XPD.PRIM.ZS, retrieved 19 November 2026. Values are as published; we only reshaped the file.

    textnumberdateyes/no
    Rows2,873country-year values
    Countries186with at least one value
    Years1970 – 201950 years with data
    LicenceCC BY 4.0credit the World Bank

    What it measures

    Expenditure on primary education is expressed as a percentage of total general government expenditure on education. General government usually refers to local, regional and central governments.

    Limits and exceptions (World Bank note)

    Data disaggregated by level of education are estimates in some instances. It is often difficult to separate lower from upper secondary education expenditure, or pre-primary from primary.

    The numbers in 2016

    In 2016, 75 countries have a value. The highest is Zambia (67.45); the lowest is Romania (12.5). The median country value is 31.7. The World Bank's World aggregate for 2013 is 31.59.

    Top 10 countries, 2016

    % of government expenditure on education

    Source: World Bank, SE.XPD.PRIM.ZS, retrieved 19 November 2026. Computed from expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv.

    Highest, 2016

    #CountryValue
    1Zambia67.45
    2Togo64.06
    3Mauritania55.9
    4Guatemala55.47
    5Niger50.67
    6El Salvador47.18
    7Cote d'Ivoire44.45
    8Malawi43.92
    9Afghanistan43.3
    10Djibouti42.84

    Lowest, 2016

    #CountryValue
    1Romania12.5
    2Monaco12.7
    3Germany12.92
    4Czechia13.24
    5Hungary16.22
    6Austria16.6
    7Lithuania18.89
    8Brunei Darussalam19.52
    9Ukraine19.64
    10Finland20.51
    How many countries report, by decade
    DecadeMost countries in one year
    1970s53
    1980s56
    1990s59
    2000s91
    2010s101

    World aggregate by year

    As published by the World Bank (in the regions file, not the country file).

    YearWorld
    201331.59
    201234.19
    201132.7
    201033.2

    By region, 2016

    World Bank regionValue
    Europe & Central Asia22.84

    First rows

    expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197126.53717
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197536.81436
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197943.59369
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income198047.29202
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income198142.30996
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income198242.82383
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income198344.01152
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income201062.13647

    Data dictionary

    ColumnTypeMeaning
    countrytextCountry or economy, World Bank name
    iso3textISO 3166-1 alpha-3 code
    regiontextWorld Bank region
    income_grouptextWorld Bank income group
    yearnumberCalendar year of the value
    valuenumberExpenditure on primary education (% of government expenditure on education), exactly as the World Bank API returns it (not rounded)

    Only country-years with a value are in the long file; blank cells in the wide file mean no value was published.

    Practice questions

    answers computed from the file

    Which country has the highest value in 2016?

    Zambia, with 67.45.

    Excel (on the long CSV: E = year, F = value)

    =FILTER(A2:A100000,(E2:E100000=2016)*(F2:F100000=MAXIFS(F2:F100000,E2:E100000,2016)))

    SQL (table wb = the CSV)

    SELECT country, value FROM wb WHERE year = 2016
      AND value = (SELECT MAX(value) FROM wb WHERE year = 2016);

    pandas (df = pd.read_csv("expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv"))

    y = df[df.year == 2016]
    y[y.value == y.value.max()][["country", "value"]]

    File: expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv

    How many countries report a value for 2016?

    75 of the 217 economies in the file's country list.

    Excel (on the long CSV: E = year, F = value)

    =COUNTIF(E2:E100000,2016)

    SQL (table wb = the CSV)

    SELECT COUNT(*) FROM wb WHERE year = 2016;

    pandas (df = pd.read_csv("expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv"))

    (df.year == 2016).sum()

    File: expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv

    What is the median across countries in 2016?

    31.7 (median of the 75 country values; not a World Bank aggregate).

    Excel (on the long CSV: E = year, F = value)

    =MEDIAN(FILTER(F2:F100000,E2:E100000=2016))

    SQL (table wb = the CSV)

    -- SQLite has no MEDIAN(); this picks the middle value(s)
    SELECT AVG(value) FROM (SELECT value FROM wb WHERE year = 2016 ORDER BY value
      LIMIT 2 - (SELECT COUNT(*) FROM wb WHERE year = 2016) % 2
      OFFSET (SELECT (COUNT(*) - 1) / 2 FROM wb WHERE year = 2016));

    pandas (df = pd.read_csv("expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv"))

    df[df.year == 2016]["value"].median()

    File: expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv

    Which country rose the most between 2006 and 2016?

    Togo: from 33.63 to 64.06, a rise of 30.44 (out of 41 countries with both years).

    Excel (on the long CSV: E = year, F = value)

    Use the wide file (expenditure-on-primary-education-percent-of-government-expenditure-on-education-wide.csv): add a column = [2016] - [2006], then sort it largest to smallest.

    SQL (table wb = the CSV)

    SELECT a.country, b.value - a.value AS rise FROM wb a JOIN wb b ON a.iso3 = b.iso3
    WHERE a.year = 2006 AND b.year = 2016 ORDER BY rise DESC LIMIT 1;

    pandas (df = pd.read_csv("expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv"))

    w = df.pivot(index="country", columns="year", values="value")
    (w[2016] - w[2006]).dropna().nlargest(1)

    File: expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv

    Which year has the most countries reporting?

    2013, with 101 countries. (Later years are still filling in as countries report.)

    Excel (on the long CSV: E = year, F = value)

    Make a pivot table: year in Rows, Count of value in Values, then sort by the count.

    SQL (table wb = the CSV)

    SELECT year, COUNT(*) AS n FROM wb GROUP BY year ORDER BY n DESC, year DESC LIMIT 1;

    pandas (df = pd.read_csv("expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv"))

    df.groupby("year").size().sort_values(ascending=False).head(1)

    File: expenditure-on-primary-education-percent-of-government-expenditure-on-education.csv