Can GDP per capita and population estimate total GDP?
Practice joining GDP per capita and population by country and year, then calculate an estimated total GDP.
01 / THE QUESTION
Question
For a country and year, what is the estimated total GDP in current US dollars when GDP per capita is multiplied by total population? Compare the estimate across years or countries.
worldbank_gdp_per_capita.country_iso_alpha3 = worldbank_population_total.country_iso_alpha3 + year · one GDP-per-capita observation to one population observation for each country and year
04 / ANALYST GUIDE
Guide
Analysis requirements
Join worldbank_gdp_per_capita and worldbank_population_total on bothcountry_iso_alpha3 and year.
Keep the country and year in the result so each product can be checked against its two input values.
Multiply gdp_per_capita_current_usd by population_total; exclude rows where either input is null when calculating an estimate.
Start with a small year range and inspect the joined row count for duplicate country-year keys.
Treat the result as an estimate of nominal GDP in current US dollars. GDP per capita is reported as a derived, rounded indicator; multiplying it back by a separately published population series may differ from an official GDP total. Do not interpret changes as inflation-adjusted growth.
Suggested query
Expand suggested query
SQL / STARTER QUERY
SELECT g.country_iso_alpha3, g.country_name, g.year,
g.gdp_per_capita_current_usd,
p.population_total,
g.gdp_per_capita_current_usd * p.population_total AS estimated_gdp_current_usd
FROM worldbank_gdp_per_capita AS g
JOIN worldbank_population_total AS p
ON g.country_iso_alpha3 = p.country_iso_alpha3
AND g.year = p.year
WHERE g.gdp_per_capita_current_usd IS NOT NULL
AND p.population_total IS NOT NULL
AND g.year BETWEEN 2020 AND 2024
ORDER BY g.country_iso_alpha3, g.year;