Years of schooling
What you should know about this indicator
- This indicator shows the average number of years that adults in a country have spent in formal education.
- It reflects the overall educational attainment of the population based on what they have already completed.
- The calculation converts each person's highest completed education level into years - for example, someone who finished high school counts as having roughly 12 years of schooling, while someone who never attended school counts as 0 years.
- The data comes from censuses and surveys of adults aged 25 and older, including only formal education starting from primary school.
- This indicator captures how much schooling adults have accumulated over their lifetimes, showing the results of past investments in education systems.
- Higher values indicate a population with stronger educational foundations, but the measure does not account for education quality or informal learning.
- The data may not reflect recent progress in countries with infrequent surveys or outdated census information.
- UNDP originally obtained this indicator from: Barro and Lee (2018), Eurostat (2024), ICF Macro Demographic and Health Surveys (various years), UNESCO Institute for Statistics (2024) and UNICEF Multiple Indicator Cluster Surveys (various years).
Sources and processing
This data is based on the following sources
How we process data at Our World in Data
All data and visualizations on Our World in Data rely on data sourced from one or several original data providers. Preparing this original data involves several processing steps. Depending on the data, this can include standardizing country names and world region definitions, converting units, calculating derived indicators such as per capita measures, as well as adding or adapting metadata such as the name or the description given to an indicator.
At the link below you can find a detailed description of the structure of our data pipeline, including links to all the code used to prepare data across Our World in Data.
Reuse this work
Citations
How to cite this page
To cite this page overall, including any descriptions, FAQs or explanations of the data authored by Our World in Data, please use the following citation:
“Data Page: Average years of schooling”, part of the following publication: Hannah Ritchie, Veronika Samborska, Esteban Ortiz-Ospina, and Max Roser (2023) - “Global Education”. Data adapted from UNDP, Human Development Report. Retrieved from https://archive.ourworldindata.org/20260326-120116/grapher/years-of-schooling.html [online resource] (archived on March 26, 2026).How to cite this data
In-line citationIf you have limited space (e.g. in data visualizations), you can use this abbreviated in-line citation:
UNDP, Human Development Report (2025) – with minor processing by Our World in DataFull citation
UNDP, Human Development Report (2025) – with minor processing by Our World in Data. “Average years of schooling – UNDP” [dataset]. UNDP, Human Development Report, “Human Development Report” [original data]. Retrieved April 10, 2026 from https://archive.ourworldindata.org/20260326-120116/grapher/years-of-schooling.html (archived on March 26, 2026).Download
Quick download
Download the data shown in this chart as a ZIP file containing a CSV file, metadata in JSON format, and a README. The CSV file can be opened in Excel, Google Sheets, and other data analysis tools.
Data API
Use these URLs to programmatically access this chart's data and configure your requests with the options below. Our documentation provides more information on how to use the API, and you can find a few code examples below.
Data URL (CSV format)
https://ourworldindata.org/grapher/years-of-schooling.csv?v=1&csvType=full&useColumnShortNames=false&level=all&metric_type=average_years_schooling&sex=boysMetadata URL (JSON format)
https://ourworldindata.org/grapher/years-of-schooling.metadata.json?v=1&csvType=full&useColumnShortNames=false&level=all&metric_type=average_years_schooling&sex=boysExcel / Google Sheets
=IMPORTDATA("https://ourworldindata.org/grapher/years-of-schooling.csv?v=1&csvType=full&useColumnShortNames=false&level=all&metric_type=average_years_schooling&sex=boys")Python with Pandas
import pandas as pd
import requests
# Fetch the data.
df = pd.read_csv("https://ourworldindata.org/grapher/years-of-schooling.csv?v=1&csvType=full&useColumnShortNames=false&level=all&metric_type=average_years_schooling&sex=boys", storage_options = {'User-Agent': 'Our World In Data data fetch/1.0'})
# Fetch the metadata
metadata = requests.get("https://ourworldindata.org/grapher/years-of-schooling.metadata.json?v=1&csvType=full&useColumnShortNames=false&level=all&metric_type=average_years_schooling&sex=boys").json()R
library(jsonlite)
# Fetch the data
df <- read.csv("https://ourworldindata.org/grapher/years-of-schooling.csv?v=1&csvType=full&useColumnShortNames=false&level=all&metric_type=average_years_schooling&sex=boys")
# Fetch the metadata
metadata <- fromJSON("https://ourworldindata.org/grapher/years-of-schooling.metadata.json?v=1&csvType=full&useColumnShortNames=false&level=all&metric_type=average_years_schooling&sex=boys")Stata
import delimited "https://ourworldindata.org/grapher/years-of-schooling.csv?v=1&csvType=full&useColumnShortNames=false&level=all&metric_type=average_years_schooling&sex=boys", encoding("utf-8") clear