Primary education, duration (years)
Real data: World Bank, World Development Indicators, indicator SE.PRM.DURS, retrieved 19 November 2026. Values are as published; we only reshaped the file.
What it measures
Primary duration refers to the number of grades (years) in primary school.
Limits and exceptions (World Bank note)
The presence of national legislation does not guarantee that countries will implement it effectively, nor does it ensure that parents will take advantage of the provisions available for their children.
The numbers in 2025
In 2025, 210 countries have a value. At the top, 2 countries tie at 8 (e.g. Guam, Ireland); at the bottom, 25 countries tie at 4 (e.g. Armenia, Austria, Azerbaijan). The median country value is 6. The World Bank's World aggregate for 2025 is 6.
Top 10 countries, 2025
years
Highest, 2025
Ties are listed A to Z.
| # | Country | Value |
|---|---|---|
| 1 | Guam | 8 |
| 2 | Ireland | 8 |
| 3 | Antigua and Barbuda | 7 |
| 4 | Australia | 7 |
| 5 | Botswana | 7 |
| 6 | British Virgin Islands | 7 |
| 7 | Denmark | 7 |
| 8 | Dominica | 7 |
| 9 | Eswatini | 7 |
| 10 | Grenada | 7 |
Lowest, 2025
Ties are listed A to Z.
| # | Country | Value |
|---|---|---|
| 1 | West Bank and Gaza | 4 |
| 2 | Uzbekistan | 4 |
| 3 | United Arab Emirates | 4 |
| 4 | Ukraine | 4 |
| 5 | Turkmenistan | 4 |
| 6 | Turkiye | 4 |
| 7 | Tajikistan | 4 |
| 8 | Somalia, Fed. Rep. | 4 |
| 9 | Slovak Republic | 4 |
| 10 | Serbia | 4 |
How many countries report, by decade
| Decade | Most countries in one year |
|---|---|
| 1970s | 201 |
| 1980s | 206 |
| 1990s | 208 |
| 2000s | 208 |
| 2010s | 210 |
| 2020s | 210 |
World aggregate by year
As published by the World Bank (in the regions file, not the country file).
| Year | World |
|---|---|
| 2025 | 6 |
| 2024 | 6 |
| 2023 | 6 |
| 2022 | 6 |
| 2021 | 6 |
| 2020 | 6 |
| 2019 | 6 |
| 2018 | 6 |
| 2017 | 6 |
| 2016 | 6 |
| 2015 | 6 |
| 2014 | 6 |
By region, 2025
| World Bank region | Value |
|---|---|
| East Asia & Pacific | 6 |
| Latin America & Caribbean | 6 |
| Middle East, North Africa, Afghanistan & Pakistan | 6 |
| North America | 6 |
| Sub-Saharan Africa | 6 |
| Europe & Central Asia | 5 |
| South Asia | 5 |
First rows
primary-education-duration-years.csv
| countrytext | iso3text | regiontext | income_grouptext | yearnumber | valuenumber |
|---|---|---|---|---|---|
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 1970 | 6 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 1971 | 6 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 1972 | 6 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 1973 | 6 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 1974 | 6 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 1975 | 6 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 1976 | 6 |
| Afghanistan | AFG | Middle East, North Africa, Afghanistan & Pakistan | Low income | 1977 | 6 |
Data dictionary
| Column | Type | Meaning |
|---|---|---|
| country | text | Country or economy, World Bank name |
| iso3 | text | ISO 3166-1 alpha-3 code |
| region | text | World Bank region |
| income_group | text | World Bank income group |
| year | number | Calendar year of the value |
| value | number | Primary education, duration (years), 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 2025?
There is a tie: 2 countries share the highest value, 8 (for example Guam, Ireland).
Excel (on the long CSV: E = year, F = value)
=FILTER(A2:A100000,(E2:E100000=2025)*(F2:F100000=MAXIFS(F2:F100000,E2:E100000,2025)))SQL (table wb = the CSV)
SELECT country, value FROM wb WHERE year = 2025
AND value = (SELECT MAX(value) FROM wb WHERE year = 2025);pandas (df = pd.read_csv("primary-education-duration-years.csv"))
y = df[df.year == 2025]
y[y.value == y.value.max()][["country", "value"]]File: primary-education-duration-years.csv
How many countries report a value for 2025?
210 of the 217 economies in the file's country list.
Excel (on the long CSV: E = year, F = value)
=COUNTIF(E2:E100000,2025)SQL (table wb = the CSV)
SELECT COUNT(*) FROM wb WHERE year = 2025;pandas (df = pd.read_csv("primary-education-duration-years.csv"))
(df.year == 2025).sum()File: primary-education-duration-years.csv
What is the median across countries in 2025?
6 (median of the 210 country values; not a World Bank aggregate).
Excel (on the long CSV: E = year, F = value)
=MEDIAN(FILTER(F2:F100000,E2:E100000=2025))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 = 2025 ORDER BY value
LIMIT 2 - (SELECT COUNT(*) FROM wb WHERE year = 2025) % 2
OFFSET (SELECT (COUNT(*) - 1) / 2 FROM wb WHERE year = 2025));pandas (df = pd.read_csv("primary-education-duration-years.csv"))
df[df.year == 2025]["value"].median()File: primary-education-duration-years.csv
Which country rose the most between 2015 and 2025?
Afghanistan: from 6 to 6, a rise of 0 (out of 208 countries with both years).
Excel (on the long CSV: E = year, F = value)
Use the wide file (primary-education-duration-years-wide.csv): add a column = [2025] - [2015], 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 = 2015 AND b.year = 2025 ORDER BY rise DESC LIMIT 1;pandas (df = pd.read_csv("primary-education-duration-years.csv"))
w = df.pivot(index="country", columns="year", values="value")
(w[2025] - w[2015]).dropna().nlargest(1)File: primary-education-duration-years.csv
Which year has the most countries reporting?
2025, with 210 countries.
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("primary-education-duration-years.csv"))
df.groupby("year").size().sort_values(ascending=False).head(1)File: primary-education-duration-years.csv