Skip to content
FigureSure
Sign in

GDP Calculator

Learn how gross domestic product is measured. Add up consumption, investment, government spending and net exports to get GDP, then turn it into real GDP with a price deflator, GDP per person, and the growth rate between two years. The default numbers describe a made-up economy for practice.
  • Updated
  • Formula shown

Spending in the economy (example figures)

Made-up example figure

Business, housing, inventories

Not transfers such as pensions

Made-up example figure

Made-up example figure

Optional: real GDP, per person and growth

Price index for the whole economy

Same units as above

Compare growth using

Results

GDP (expenditure approach)
$1,050 billion
C + I + G + (X − M)
Net exports (X − M)
A trade deficit lowers GDP
−$30 billion
Real GDP
Nominal ÷ 105 × 100, in base-year prices
$1,000 billion
GDP per person
$1,050 billion ÷ 30 million people
$35,000
Real GDP per person
$33,333
Nominal growth
From $950 billion to $1,050 billion
10.53%

GDP = $700 billion + $180 billion + $200 billion + ($120 billion − $150 billion) = $1,050 billion.

Components of GDP
Consumption (C)
$700 billion
Investment (I)
$180 billion
Government (G)
$200 billion
Net exports (X − M)
−$30 billion
Share of GDP by component
ComponentAmountShare of GDP
Consumption (C)$700 billion66.7%
Investment (I)$180 billion17.1%
Government (G)$200 billion19%
Net exports (X − M)−$30 billion−2.9%
GDP$1,050 billion100%

The default numbers describe a made-up economy for learning, not real statistics. For official US figures, see the Bureau of Economic Analysis (bea.gov).

How to use the GDP calculator

  1. Choose whether your amounts are in millions, billions or trillions, and use that scale for every amount.
  2. Enter consumption, investment, government spending, exports and imports for one year. Investment may be negative if inventories fell sharply.
  3. Optionally add a GDP deflator to see real GDP, a population for GDP per person, and an earlier year's GDP to see the growth rate.
  4. The defaults are invented example figures. Replace them with data from an official source, such as a national statistics office, to study a real economy.

GDP formula (expenditure approach)

GDP = C + I + G + (X − M)
Real GDP = nominal GDP ÷ GDP deflator × 100
GDP per person = GDP ÷ population
Growth = (GDP this year ÷ GDP earlier − 1) × 100; average yearly growth = (later ÷ earlier)1/years − 1

C is household consumption, I is gross private investment (business equipment and buildings, new homes and changes in inventories), G is government consumption and investment, X is exports and M is imports. Imports are subtracted because they are already included in C, I and G but were produced abroad. Government transfers such as pensions are not in G, since they pay for no new production. The deflator is a price index for everything in GDP, equal to 100 in the base year, so dividing by it removes the effect of price changes.

Worked example (a made-up economy)

An imaginary country spends $700 billion on consumption, $180 billion on investment and $200 billion on government purchases. It exports $120 billion and imports $150 billion, so net exports are −$30 billion. GDP is 700 + 180 + 200 + (120 − 150) = $1,050 billion, of which consumption is 66.7%.

With a GDP deflator of 105, prices are 5% above the base year, so real GDP is $1,050 billion ÷ 105 × 100 = $1,000 billion. With 30 million people, GDP per person is $35,000. If GDP the year before was $950 billion, nominal GDP grew 10.53%; if that $950 billion was real GDP in the same base-year prices, real growth was 5.26%. These figures are invented for the arithmetic and describe no real country.

Nominal vs real GDP with different deflators

Illustrative: nominal GDP of $1,000 billion deflated at different price levels.

GDP deflatorPrices vs base yearReal GDP
90−10%$1,111.11 billion
95−5%$1,052.63 billion
1000%$1,000 billion
1055%$952.38 billion
11010%$909.09 billion
12020%$833.33 billion

Total and average yearly growth

FromToYearsTotal growthAverage a year
$1,000 billion$1,100 billion110%10%
$1,000 billion$1,100 billion510%1.92%
$1,000 billion$1,500 billion1050%4.14%
$1,000 billion$2,000 billion10100%7.18%
$1,000 billion$2,000 billion20100%3.53%

Things to keep in mind

  • Other ways to measure GDP. Statisticians also add up incomes (wages, profits, rents) or the value added by each industry. In principle all three approaches give the same total; in practice there is a small statistical discrepancy.
  • Compare real figures over time. Nominal GDP can rise just because prices rose. Real GDP shows how much more was actually produced.
  • Per person, not just in total. A country can grow because its population grows. GDP per person is a better guide to average living standards, though it says nothing about how income is shared.
  • Use official data for real economies. For the United States, the Bureau of Economic Analysis (bea.gov) publishes GDP and its components in the National Income and Product Accounts. Other countries publish theirs through national statistics offices.

To see how price changes affect money over time, try the inflation calculator. For growth rates of any value, the percentage calculator and ROI calculator use the same arithmetic.

Frequently asked questions

How do you calculate GDP?

With the expenditure approach, add consumption (C), investment (I), government spending (G) and net exports (exports minus imports). For a made-up economy with C = 700, I = 180, G = 200, X = 120 and M = 150 (billions), GDP is 700 + 180 + 200 − 30 = 1,050 billion.

Why are imports subtracted in the GDP formula?

GDP counts what is produced in the country. Spending on imported goods is already included in consumption, investment and government spending, so imports are subtracted to remove production that happened abroad.

How do you calculate real GDP?

Divide nominal GDP by the GDP deflator and multiply by 100. Nominal GDP of 1,050 billion with a deflator of 105 is real GDP of 1,000 billion in base-year prices.

How do you calculate GDP per capita?

Divide GDP by the population, using the same scale. 1,050 billion divided by 30 million people is 35,000 per person.

How do you calculate the GDP growth rate?

Divide this year’s GDP by last year’s, subtract 1 and multiply by 100. Going from 950 to 1,050 is 10.53% growth. Use real GDP for both years to measure growth in output rather than prices; over several years, the average yearly rate is (later ÷ earlier)^(1/years) − 1.

Was this calculator helpful?