25 Years of Life Expectancy from the World Bank

Analyze This! is our series of live QuantumLayers demonstrations. We connect a public data source, let the platform chart it and test it, and report what comes back. Every chart on this page is fetched live from QuantumLayers. This time: one World Bank API call, every country and region from 2000 to 2024, and what the numbers say about global health gains, the pandemic shock, and how fast the world recovered.


6,650
rows from a single API call
266
countries and regional aggregates
91.5%
of the variation explained by country
-1.7 years
global life expectancy lost from 2019 to 2021

Life expectancy at birth is the average number of years a newborn would live if current death rates stayed the same throughout their life. Because it is a snapshot of current mortality, it reacts quickly to shocks such as epidemics, which makes it a good series to examine for the years around 2020.

The data comes from QuantumLayers’ built-in World Bank, Life expectancy at birth (all countries) template. It needs no API key. It requests indicator SP.DYN.LE00.IN for all economies from 2000 to 2024, which returns individual countries and the World Bank’s aggregates, such as World, Sub-Saharan Africa and High income. QuantumLayers recognised the date column, which holds plain years, as a time axis. We marked the datasets public, which is what lets the charts below load for anyone.

Five trajectories

To compare trajectories side by side, we connected the same template for five single economies (the world, the United States, India, Sub-Saharan Africa and Japan) and merged the five datasets on the year. That gives one table with a column per economy, which the chart below plots.

Loading live data from QuantumLayers…

Figure 1: Life expectancy at birth for the world and four economies, fetched live from QuantumLayers. The five series come from a merged dataset that joins five single-country World Bank connections on the year. In the ql-chart, the World series is the column named value. Source: World Bank.

▶ Open the live ql-chart on QuantumLayers

The world

Global life expectancy was 67.7 years in 2000. It rose almost every year to 72.9 in 2019, about three months per calendar year. Then it fell two years running, to 72.2 in 2020 and 71.2 in 2021: a loss of 1.7 years that took the world back to roughly its 2012 level. The recovery was fast. By 2022 it was 73.0, already above the 2019 peak, and by 2024 it reached 73.5.

India: the sharpest dip

India went from 62.7 in 2000 to 70.7 in 2019. The drop came mostly in 2021, not 2020: 70.2 in 2020, then 67.3 in 2021, a loss of 3.5 years from 2019 that lines up with the Delta wave in the spring of 2021. India rebounded to 71.7 in 2022 and 72.2 in 2024.

United States: stalling before the pandemic

The US rose from 76.6 in 2000 to 78.8 by 2014, then stopped. It slipped to 78.5 in 2016 and 2017, years associated with rising drug overdose deaths. The pandemic took it to 77.0 in 2020 and 76.3 in 2021, below its 2000 level. By 2024 it was back to 78.9, just above its 2014 figure: a net gain of 2.3 years over 25 years, less than half the world’s.

Sub-Saharan Africa: the largest gain

The Sub-Saharan Africa aggregate rose from 51.6 in 2000 to 61.1 in 2019, almost 9.5 years, the fastest of any series here. Much of this reflects falling child mortality and the expansion of HIV treatment. The pandemic dip in the regional figures was small, and by 2024 it reached 62.8, a total gain of 11.2 years.

Japan: a ceiling

Japan rose from 81.1 in 2000 to a peak of 84.6 in 2020, with a small dip in 2011, the year of the Tōhoku earthquake and tsunami. It has since edged down to 84.0. At that level, gains are slow and small changes in excess deaths are enough to move the number.

Convergence, measured

The gap between the US and India was 13.9 years in 2000 and 6.7 years in 2024. The gap between Japan and Sub-Saharan Africa went from 29.4 to 21.2 years. Countries that started lower gained more, as basic health interventions spread. The gaps are still wide.

What the statistics flagged

We ran QuantumLayers’ automated insights over all 6,650 rows, and again over the five-series table. One finding stands out above the rest, and one result we expected did not appear.

Where you are born matters more than when. The ANOVA test found that country explains 91.5% of all the variation in the dataset (effect size η² = 0.915). Life expectancy has risen over 25 years, but the gap between countries is still far larger than the gain over time.

No break in the trend. An earlier version of the structural break test (CUSUM) found a break in 2010 in the all-economies average: 68.8 years before, 72.1 after. That was an artifact. A series that rises steadily is always higher in its second half, so a test that compares levels will put a break near the middle. QuantumLayers now checks whether a series is trending first, and if it is, it runs the test on year-on-year changes. Run that way, the test finds no break in the average or in any of the five series. Even the pandemic, which cost the world 1.7 years, shows up as a two-year dip and a rebound, not a lasting change in how fast life expectancy rises.

Steady gains, measured. On year-on-year changes, two series show a clearly significant average gain. Sub-Saharan Africa gained 0.47 years per year (z = 7.7, p < 0.0001), 11.2 years over the period. Japan gained 0.12 years per year (z = 2.9, p = 0.004), 3.0 years over the period. The world, the US and India all ended higher than they started, but the test did not find their average gain significant. The swings from 2020 to 2022 most likely make their annual changes too uneven.

A lead that isn’t one. The tests also say the US “leads” India by two years (cross-correlation −0.64, on year-on-year changes). That is the timing of the pandemic, not a real relationship. The US had its biggest fall in 2020 (−1.8 years) and India its biggest rebound in 2022 (+4.4 years), exactly two years apart.

Loading live data from QuantumLayers…

Figure 2: Unweighted average of every row per year, fetched live. With the trend taken into account, QuantumLayers finds no structural break. Source: World Bank.

▶ Open the live ql-chart on QuantumLayers

No forecast, and that is expected. QuantumLayers only reports a forecast when it projects a change of more than 5% over the horizon. Life expectancy moves by fractions of a year per year, so over a few years it rarely clears that bar.

The averages in Figure 2 mix countries with regional aggregates, so they are a rough global signal rather than a population-weighted world figure. For that, use the World series in Figure 1, which is the World Bank’s own WLD aggregate.

How this was built

  1. Connect. We picked the World Bank life expectancy template in QuantumLayers’ REST API connection form and saved it without changes. QuantumLayers typed all ten columns, including the year, automatically.
  2. Analyze. We ran the automated insights (ANOVA, structural breaks, trend and forecast tests) on the full dataset. For trending series, the break and trend tests run on year-on-year changes. For the trajectories, we connected five single-economy versions of the template and merged them on the year.
  3. Publish. With the datasets public, each chart here is drawn with Chart.js from an unauthenticated request to QuantumLayers’ ql_get_chart_data endpoint. The purple buttons open the same charts on QuantumLayers’ hosted ql-chart page.

To go further, replace SP.DYN.LE00.IN in the URL with any other World Bank indicator, such as infant mortality or health spending, or change date=2000:2024 to 1960:2024 for the full history.

Data: World Bank World Development Indicators. Figures reflect the dataset at request time.


This post is part of Analyze This!, a series of live QuantumLayers demonstrations. For the economic sources you can connect the same way, see Economic Data in QuantumLayers: FRED, World Bank and IMF, and for another worked example, 50 Years of GDP Growth from the IMF. Start building at quantumlayers.com.