Gross domestic product (GDP) is the market value of all final goods and services produced within a country in a given period. It is the headline measure of the size of an economy, and its growth rate is the number behind every “the economy grew 2% last year” report.
Statistical agencies measure GDP in three ways that should give the same total. The expenditure approach adds up what is spent on final output: household consumption, investment, government purchases and net exports. The income approach adds up what production pays out: wages, profits, rents, interest and mixed income, plus taxes on production net of subsidies. The production approach sums the value added by every industry. This GDP calculator uses the expenditure approach, the one taught in every introductory macroeconomics course: .
It then goes further. Enter the GDP deflator to turn nominal GDP into real GDP at base-year prices, which removes the effect of inflation. Enter last year’s figure to get the GDP growth rate, and the population to get GDP per capita. A breakdown shows the share of each component in the total. It is a teaching and estimation tool; official figures come from national statistics offices.
How to use this calculator
- Choose the unit your figures are in (national accounts are usually published in millions or billions).
- Enter consumption (C), investment (I), government purchases (G), exports (X) and imports (M). Imports are typed as a positive number; the calculator subtracts them.
- Optionally enter the GDP deflator (base year = 100) to get real GDP.
- Optionally enter last year’s GDP on the same basis — real if you gave a deflator — and the population.
- Read nominal GDP, net exports, real GDP, the growth rate, GDP per capita and the share of each component.
The formula
Expenditure approach:
Real GDP with the GDP deflator (base year = 100):
Growth rate from one year to the next:
Per capita:
For reference, the income approach is GDP = compensation of employees + gross operating surplus + gross mixed income + taxes on production and imports − subsidies.
Worked example
An economy reports, in billions: consumption 1,400, investment 420, government purchases 380, exports 600 and imports 550.
- Net exports = 600 − 550 = 50.
- Nominal GDP = 1,400 + 420 + 380 + 50 = 2,250 billion; consumption alone is 62.2% of it.
- With a deflator of 112.5, real GDP = 2,250 ÷ 112.5 × 100 = 2,000 billion at base-year prices.
- Real GDP was 1,950 billion the year before, so real growth is 2.56%.
- With 40 million inhabitants, GDP per capita is 56,250 (real: 50,000).
Nominal vs real GDP
Nominal GDP values output at the prices of the year it was produced, so it rises when prices rise even if nothing more is made. Real GDP values output at the prices of a fixed base year and therefore tracks volume. The GDP deflator links the two: it equals nominal ÷ real × 100, and its change from one year to the next is a broad measure of inflation covering everything produced, not just what households buy.
A quick approximation: real growth ≈ nominal growth − inflation. With 7% nominal growth and a deflator up 4%, real growth is roughly 3% (precisely ). To adjust other amounts for price changes, use the inflation calculator.
What is not counted in GDP
GDP counts final goods only, so the steel sold to a carmaker is not added on top of the car. It excludes transfers (pensions, unemployment benefits), purchases of second-hand goods and financial assets, unpaid household work and most of the informal economy. It also measures where production happens, not who owns it: gross national income (GNI) adds income earned abroad by residents and subtracts income paid to non-residents.
Frequently asked questions
Why are imports subtracted?
Consumption, investment and government spending include purchases of foreign goods. Those goods were not produced in the country, so imports are taken out to leave only domestic production. Imports do not reduce GDP by themselves; they cancel spending already counted.
Can investment be negative?
Gross fixed investment cannot, but the change in inventories can. If firms sell more from stock than they produce, inventories fall and total investment for that period can, in rare cases, be negative.
Which is the best measure for comparing countries?
GDP per capita at purchasing power parity (PPP), which adjusts for price levels between countries. Market-exchange-rate GDP per capita understates living standards in countries where goods and services are cheap.
What is the GDP deflator compared with the CPI?
The deflator covers all goods and services produced in the country, with weights that change every year; the consumer price index covers a fixed basket bought by households, including imports. The two usually move together but can diverge, for example when oil import prices jump.
How do I compute average growth over several years?
Use the compound annual growth rate: (GDP_end ÷ GDP_start)^(1/years) − 1. It gives the constant yearly rate that leads from the first value to the last; the CAGR calculator does this directly.
Sources
- U.S. Bureau of Economic Analysis — NIPA Handbook: Concepts and Methods of the U.S. National Income and Product Accounts
- OpenStax — Principles of Macroeconomics 3e, §6.1 Measuring the Size of the Economy: GDP
- OpenStax — Principles of Macroeconomics 3e, §6.2 Adjusting Nominal Values to Real Values
Last updated: