How this calculator works
- Step 1Add spendingC + I + G + (X − M)Who bought the economy’s output.
- Step 2Remove pricesnominal ÷ (deflator ÷ 100)GDP at base-year prices.
- Step 3Compareshares and real valuesAcross components or years.
GDP measures what an economy produces. On the demand side, every rupee of output is bought by households, businesses, government or foreigners, so GDP is the sum of their spending.
Imports are subtracted because they are already inside consumption, investment and government spending. Net exports can be negative.
Worked example: OpenStax’s US table
- GDP
C + I + G + (X − M)
- Consumption14.0
- Investment3.6
- Government3.9
- Net exports2.1 − 2.7-0.6
- GDP20.9
This is Table 6.1 in OpenStax Principles of Macroeconomics, which also gives $20.9 trillion.
Read the result
Consumption is usually the largest part of GDP. Shares here come from the rounded table, so they differ slightly from OpenStax’s published percentages.
Real GDP
- 1960$3,267.5 billionNominal $542.4 billion at a deflator of 16.6.
- 2015$17,388.7 billionNominal $18,206 billion at a deflator of 104.7.
Dividing by the deflator removes price changes, so years can be compared by quantity produced. A deflator below 100 means prices were lower than in the base year, so real GDP is higher than nominal.
Assumptions and limits
- Same unitsAll figures in one currency and scale.
- Same yearUse the deflator for the nominal figure’s year.
- Base 100Enter the deflator as published, e.g. 104.7.
- No statisticsDiscrepancies in official accounts are not modelled.
Related economics tools
Real GDP removes price changes. The same idea turns any future sum into today's money.
To adjust a rupee amount for price rises, use the inflation calculator. For a growth rate between two values, the CAGR calculator gives the yearly rate, and the percentage calculator the total change.
Common mistakes
Mistake: Adding imports to GDP.
Instead: Subtract them; they were produced abroad.
Mistake: Counting pensions and subsidies in G.
Instead: Only government purchases count.
Mistake: Entering the deflator as 1.047.
Instead: Use the published index, 104.7.
Checking the method
A separate script re-works every golden value in exact fractions and reproduces OpenStax’s Table 6.1 and both real GDP examples.
Read how we test our calculators, or browse more maths calculators.