How to use the GDP calculator
- Choose what to calculate: GDP from spending, real GDP, the growth rate, or GDP per person.
- Choose the scale your figures are in: units, thousands, millions, billions or trillions. National accounts are usually published in billions.
- For GDP from spending, enter consumer spending (C), investment (I), government spending (G), exports (X) and imports (M).
- For real GDP, enter nominal GDP and the GDP deflator (base year = 100).
- For growth, enter GDP in the earlier and later year and the years between them.
- For GDP per person, enter GDP and the population in millions.
How GDP is calculated
Gross domestic product is the market value of all final goods and services produced in a country in a period. The expenditure approach adds up everything that buys that output:
Investment covers business equipment, software and buildings, new homes, and the change in inventories. Government spending counts only purchases of goods and services; transfers such as Social Security payments are left out because they don't pay for new output. Imports are subtracted because C, I and G already include spending on goods made abroad. In the United States, the Bureau of Economic Analysis publishes GDP built from these components.
Worked example
The defaults are round, illustrative figures in billions of dollars, not official data:
- C = $20,000, I = $5,300, G = $5,000
- Net exports: X − M = $3,200 − $4,100 = −$900 (a trade deficit)
- GDP = 20,000 + 5,300 + 5,000 − 900 = $29,400 billion
- Consumer spending is 68.0% of GDP
With a GDP deflator of 125, prices are 25% higher than in the base year, so real GDP is 29,400 ÷ 125 × 100 = $23,520 billion in base-year dollars. If GDP rose from $28,000 to $29,400 billion in one year, growth is (29,400 − 28,000) ÷ 28,000 = +5.00%. And $29,400 billion shared among 340 million people is $86,470.59 per person.
Nominal vs. real GDP
| Nominal GDP | Real GDP | |
|---|---|---|
| Prices used | Current year's prices | A fixed base year's prices |
| Changes when | Output or prices change | Only output changes |
| Used for | Size of the economy today, debt ratios | Growth, comparing years |
The GDP deflator links the two: deflator = nominal ÷ real × 100. Because it covers everything the economy produces, it differs from the consumer price index, which tracks a basket of household purchases. Use the inflation calculator for changes in consumer prices.
Growth over several years
For more than one year, the calculator shows the compound annual growth rate as well as the total. GDP rising from $27,000 to $29,400 billion over two years is 8.89% in total, but (29,400 ÷ 27,000)^½ − 1 = 4.35% a year, not 4.44%, because each year's growth builds on the last. Official growth rates use real GDP, so inflation doesn't inflate them. U.S. quarterly figures are also annualized: a 0.5% rise in one quarter is reported as about 2.0% a year.
Frequently asked questions
Why are imports subtracted in the GDP formula?
GDP measures what is produced at home. Consumer, business and government spending all include some imported goods, so the value of imports is taken back out. Imports themselves don't reduce GDP; they just aren't part of it.
What is the difference between GDP and GNP?
GDP counts production inside a country's borders, whoever owns the factories. Gross national product (now usually called gross national income) counts production by a country's residents and companies, wherever it happens. For most large economies the two are close.
What is a GDP deflator?
It is a price index for everything included in GDP, equal to nominal GDP divided by real GDP, times 100. A deflator of 125 means prices are 25% above the base year, so nominal GDP overstates real output by that much.
Does GDP per capita measure living standards?
Only roughly. It shows average output per person, but not how income is shared, the cost of living, unpaid work at home, or environmental damage. Economists compare countries with purchasing-power-parity figures to adjust for price differences.
Related calculators
- Inflation Calculator — What money will cost in the future, and what today's savings will really be worth.
- Compound Interest Calculator — How a starting balance and monthly contributions grow, with any compounding frequency.
- Percentage Calculator — Percent of a number, what percent one number is of another, percentage change and difference.
Results are calculated in your browser. Double-check anything important before you rely on it. See our disclaimer.