DataBrighten

    Pupil-teacher ratio, secondary

    4,344 × 6rows × columns: 204 countries, 1970 to 2019

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

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

    What it measures

    Secondary school pupil-teacher ratio is the average number of pupils per teacher in secondary 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, 71 countries have a value. The highest is Malawi (72.31); the lowest is San Marino (5.84). The median country value is 12.81. The World Bank's World aggregate for 2018 is 17.

    Top 10 countries, 2018

    value

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

    Highest, 2018

    #CountryValue
    1Malawi72.31
    2Bangladesh35.1
    3Eritrea35.02
    4Afghanistan33.5
    5India28.52
    6Rwanda28.25
    7El Salvador27.56
    8Cote d'Ivoire27.28
    9Myanmar27.25
    10Burundi26.6

    Lowest, 2018

    #CountryValue
    1San Marino5.84
    2Kazakhstan6.96
    3Ukraine7.34
    4Georgia7.58
    5Azerbaijan7.61
    6Serbia7.95
    7Andorra8.02
    8Armenia8.02
    9Brunei Darussalam8.27
    10Comoros8.31
    How many countries report, by decade
    DecadeMost countries in one year
    1970s98
    1980s84
    1990s110
    2000s112
    2010s116

    World aggregate by year

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

    YearWorld
    201817
    201716.94
    201617.09
    201517.41
    201417.62
    201317.68
    201217.14
    201117.03
    201016.89
    200916.89
    200817.07
    200717.35

    By region, 2018

    World Bank regionValue
    South Asia27.19
    Sub-Saharan Africa 21.61
    Latin America & Caribbean 16.5
    North America14.94
    Middle East, North Africa, Afghanistan & Pakistan14.92
    East Asia & Pacific14.76
    Europe & Central Asia11.08

    First rows

    pupil-teacher-ratio-secondary.csv

    countrytextiso3textregiontextincome_grouptextyearnumbervaluenumber
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197023.13762
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197122.52125
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197221.7014
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197320.51185
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197421.96758
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income197629.27404
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income199024.78793
    AfghanistanAFGMiddle East, North Africa, Afghanistan & PakistanLow income199326.68461

    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, secondary, 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?

    Malawi, with 72.31.

    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-secondary.csv"))

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

    File: pupil-teacher-ratio-secondary.csv

    How many countries report a value for 2018?

    71 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-secondary.csv"))

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

    File: pupil-teacher-ratio-secondary.csv

    What is the median across countries in 2018?

    12.81 (median of the 71 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-secondary.csv"))

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

    File: pupil-teacher-ratio-secondary.csv

    Which country rose the most between 2008 and 2018?

    Malawi: from 38.49 to 72.31, a rise of 33.82 (out of 37 countries with both years).

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

    Use the wide file (pupil-teacher-ratio-secondary-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-secondary.csv"))

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

    File: pupil-teacher-ratio-secondary.csv

    Which year has the most countries reporting?

    2016, with 116 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-secondary.csv"))

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

    File: pupil-teacher-ratio-secondary.csv