Home / Glossary / Gross Domestic Product (GDP)
EconomicsGross Domestic Product (GDP)
Total market value of goods & services produced in an economy.
The expenditure approach sums consumption, investment, government spending, and net exports. Real GDP strips out inflation so growth reflects true output. GDP growth, alongside inflation and unemployment, anchors most macro analysis.
Formula / theory
Y = C + I + G + (X − M) Real GDP = Nominal GDP / (Deflator / 100)
In Python
national_accounts["gdp"] = (
national_accounts[["C", "I", "G"]].sum(axis=1)
+ national_accounts["X"] - national_accounts["M"]
)
real_gdp = nominal_gdp / (deflator / 100)In SQL
SELECT year, (consumption + investment + govt_spending
+ exports - imports) AS gdp
FROM national_accounts
ORDER BY year;