DataBrighten

    Pupil-teacher ratio, primary

    6,016 × 6rows × columns: 206 countries, 1970 to 2019

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

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

    What it measures

    Primary school pupil-teacher ratio is the average number of pupils per teacher in primary school.

    Limits and exceptions (World Bank note)

    The comparability of pupil-teacher ratios across countries is affected by the definition of teachers and by differences in class size by grade and in the number of hours taught, as well as the different practices countries employ such as part-time teachers, school shifts, and multi-grade classes. Moreover, the underlying enrollment levels are subject to a variety of reporting errors.

    The numbers in 2018

    In 2018, 90 countries have a value. The highest is Rwanda (59.51); the lowest is San Marino (6.93). The median country value is 20.27. The World Bank's World aggregate for 2018 is 23.45.

    Top 10 countries, 2018

    value

    Source: World Bank, SE.PRM.ENRL.TC.ZS, retrieved 19 November 2026. Computed from pupil-teacher-ratio-primary.csv.

    Highest, 2018

    #CountryValue
    1Rwanda59.51
    2Malawi58.68
    3Mozambique55.27
    4Tanzania50.63
    5Afghanistan48.79
    6Cameroon44.83
    7Pakistan44.08
    8Burundi42.52
    9Cote d'Ivoire41.82
    10Cambodia41.7

    Lowest, 2018

    #CountryValue
    1San Marino6.93
    2Kuwait8.88
    3Georgia8.98
    4Cuba9.16
    5Oman9.67
    6Brunei Darussalam9.9
    7Andorra10.5
    8Monaco11.39
    9Bahrain11.92
    10Qatar12.17
    How many countries report, by decade
    DecadeMost countries in one year
    1970s125
    1980s125
    1990s150
    2000s146
    2010s142

    World aggregate by year

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

    YearWorld
    201823.45
    201723.39
    201623.44
    201523.11
    201423.29
    201323.55
    201224.2
    201124.12
    201024.31
    200924.68
    200824.97
    200725.05

    By region, 2018

    World Bank regionValue
    Sub-Saharan Africa 37.36
    South Asia33.25
    Middle East, North Africa, Afghanistan & Pakistan21.32
    Latin America & Caribbean 21.3
    East Asia & Pacific17.54
    Europe & Central Asia14.87
    North America14.43

    First rows

    pupil-teacher-ratio-primary.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197041.22332
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197139.10539
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197240.38314
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197338.32161
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197437.21537
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197537.30693
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197635.75747
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income198936.40558

    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
    valuenumberPupil-teacher ratio, primary, 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 2018?

    Rwanda, with 59.51.

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

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

    SQL (table wb = the CSV)

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

    pandas (df = pd.read_csv("pupil-teacher-ratio-primary.csv"))

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

    File: pupil-teacher-ratio-primary.csv

    How many countries report a value for 2018?

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

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

    =COUNTIF(E2:E100000,2018)

    SQL (table wb = the CSV)

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

    pandas (df = pd.read_csv("pupil-teacher-ratio-primary.csv"))

    (df.year == 2018).sum()

    File: pupil-teacher-ratio-primary.csv

    What is the median across countries in 2018?

    20.27 (median of the 90 country values; not a World Bank aggregate).

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

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

    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 = 2018 ORDER BY value
      LIMIT 2 - (SELECT COUNT(*) FROM wb WHERE year = 2018) % 2
      OFFSET (SELECT (COUNT(*) - 1) / 2 FROM wb WHERE year = 2018));

    pandas (df = pd.read_csv("pupil-teacher-ratio-primary.csv"))

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

    File: pupil-teacher-ratio-primary.csv

    Which country rose the most between 2008 and 2018?

    Afghanistan: from 43.73 to 48.79, a rise of 5.06 (out of 73 countries with both years).

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

    Use the wide file (pupil-teacher-ratio-primary-wide.csv): add a column = [2018] - [2008], 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 = 2008 AND b.year = 2018 ORDER BY rise DESC LIMIT 1;

    pandas (df = pd.read_csv("pupil-teacher-ratio-primary.csv"))

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

    File: pupil-teacher-ratio-primary.csv

    Which year has the most countries reporting?

    1999, with 150 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("pupil-teacher-ratio-primary.csv"))

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

    File: pupil-teacher-ratio-primary.csv