Skip to content

GDP Calculator

Compute gross domestic product from its spending components, or turn nominal GDP into real GDP and a real growth rate.

FinancialUpdated Free · No sign-up

How to use the GDP Calculator

  1. Pick what you want to work out using the tabs: Expenditure approach or Real GDP & growth.
  2. Enter Consumption (C) (Any unit, e.g. billions).
  3. Enter Investment (I).
  4. Enter Government spending (G).
  5. Enter Exports (X).
  6. Enter Imports (M).
  7. Read your answer in the results panel. It updates as you type, and the breakdown, step-by-step working and any charts or tables appear below it.
  8. Use Share link to save or send the exact calculation, or Copy to paste the results elsewhere.

The expenditure approach

Gross domestic product (GDP) is the market value of all final goods and services produced in a country over a period. The most common way to measure it adds up everyone’s spending on those goods and services:

GDP = C + I + G + (X − M)

  • C, consumption: household spending on goods and services. It’s about two-thirds of GDP in the United States.
  • I, investment: business spending on equipment, buildings and software, plus new housing and changes in inventories. Buying shares is not investment in this sense.
  • G, government purchases: spending on goods, services and public investment. Transfer payments like Social Security are left out because they don’t buy new output.
  • X − M, net exports: exports minus imports. Imports are subtracted because they’re already counted in C, I and G but were produced abroad.

Worked example

With C = 18,000, I = 4,000, G = 4,500, X = 3,000 and M = 3,800 (in billions), GDP = 18,000 + 4,000 + 4,500 + (3,000 − 3,800) = 25,700. Net exports are −800, a trade deficit equal to about 3.1% of GDP.

Nominal vs real GDP

Nominal GDP uses current prices, so it rises with inflation even when output doesn’t change. Real GDP removes price changes using the GDP deflator, a price index where the base year equals 100:

real GDP = nominal GDP ÷ deflator × 100

A nominal GDP of 28,000 with a deflator of 120 is a real GDP of 23,333.33 in base-year prices. If the year before had a nominal GDP of 26,000 and a deflator of 115 (a real GDP of 22,608.70), then:

  • Nominal growth = 28,000 ÷ 26,000 − 1 = 7.69%
  • Inflation (deflator change) = 120 ÷ 115 − 1 = 4.35%
  • Real growth = 23,333.33 ÷ 22,608.70 − 1 = 3.21%

Real growth is roughly nominal growth minus inflation. The exact relationship is (1 + nominal) ÷ (1 + inflation) − 1.

Notes

  • GDP can also be measured by the income approach (wages + profits + rents + taxes − subsidies) or the production approach (value added). In theory all three give the same result.
  • GDP per person (GDP divided by population) is a better guide to living standards than total GDP.
  • Official US figures come from the Bureau of Economic Analysis, are reported at seasonally adjusted annual rates, and are revised several times.

Frequently asked questions

What is the formula for GDP?

Using the expenditure approach, GDP = C + I + G + (X − M): consumption plus investment plus government purchases plus exports minus imports.

What is the difference between nominal and real GDP?

Nominal GDP is measured in current prices. Real GDP adjusts for inflation using a price index such as the GDP deflator, so it shows changes in actual output.

How do you calculate the GDP growth rate?

Divide this period’s real GDP by the previous period’s, subtract 1 and multiply by 100. Using real figures means inflation doesn’t inflate the growth rate.

Why are imports subtracted in the GDP formula?

Spending on imports is already included in consumption, investment and government purchases. Subtracting imports removes output produced abroad, so GDP counts only domestic production.