Skip to content

GDP Calculator

Expenditure GDP = C + I + G + (X - M). Sum of consumption, investment, government, and net exports.

Maintained by the Calcenzo team. Last reviewed September 25, 2026. Methodology

GDP Calculator

A GDP calculator finds gross domestic product with the expenditure formula GDP = C + I + G + (X − M), adding consumption, investment, government spending and net exports. $1,000,000 + $400,000 + $350,000 + ($200,000 − $180,000) = $1,770,000.

gdp calculator
GDP calculator chart: example expenditure components adding to $1.77 million.

How to use the GDP calculator

  1. Enter consumption spending.
  2. Enter investment and government spending.
  3. Enter exports and imports.
  4. Read GDP.

The GDP formula

Gross domestic product (GDP) is the value of all final goods and services produced within a country in a given period. The U.S. Bureau of Economic Analysis (BEA) estimates it several ways; the GDP calculator uses the expenditure approach, which adds up spending on final goods and services:

  • GDP = C + I + G + (X − M)
  • C = personal consumption expenditures
  • I = gross private domestic investment: business equipment, structures, software, housing and inventory changes
  • G = government consumption expenditures and gross investment
  • X − M = exports minus imports (net exports)

GDP calculator worked example

Suppose a small economy has $1,000,000 of consumer spending, $400,000 of investment, $350,000 of government spending, $200,000 of exports and $180,000 of imports. Net exports are $20,000, and GDP is $1,000,000 + $400,000 + $350,000 + $20,000 = $1,770,000.

Component Amount
Consumption (C) $1,000,000
Investment (I) $400,000
Government spending (G) $350,000
Exports (X) $200,000
Imports (M) −$180,000
Net exports (X − M) $20,000
GDP $1,770,000

Why imports are subtracted

Imports are not subtracted because they hurt the economy. Spending on imported goods is already included in consumption, investment and government spending, but those goods were produced abroad. Subtracting imports removes foreign production so GDP counts only what was produced domestically.

What GDP leaves out

  • Intermediate goods: flour sold to a bakery is counted only once, in the price of the bread, to avoid double counting.
  • Transfer payments: Social Security and unemployment benefits are not purchases of output, so they are not part of G, although the spending they fund appears in C.
  • Used goods and financial assets: reselling a used car or buying stock does not create new production.
  • Unpaid work: household chores and volunteer work are not counted.

Nominal vs real GDP

BEA explains that “current-dollar” or nominal GDP uses market prices during the period measured, while “real” or chained GDP removes the effect of inflation so that periods can be compared. The headline GDP number in the news is usually the percentage change in real GDP from the previous quarter, expressed at an annual rate. BEA publishes an advance estimate about a month after each quarter ends, then second and third estimates that add more source data.

GDP per capita and growth

Divide GDP by population to get GDP per capita, a rough measure of average output per person. Growth rate = (this period’s real GDP − last period’s) ÷ last period’s × 100. If real GDP rises from $1,770,000 to $1,823,100, growth is 3%.

Income and production approaches

GDP can also be measured by adding incomes earned in production (wages, profits, rents, interest and taxes on production) or by adding the value added at each stage of production across industries. In principle all three give the same total; in practice, small statistical discrepancies remain. The GDP calculator uses spending because its parts are the most familiar.

Using the GDP calculator for what-if questions

Because GDP is a sum, you can see how a change in one part moves the total. In the example, a 10% rise in investment, from $400,000 to $440,000, raises GDP by $40,000 to $1,810,000, about 2.3%. A $30,000 increase in imports with no change in spending lowers measured GDP by $30,000, because that spending now goes to foreign producers. Try changing one input at a time in the GDP calculator to see which component has the largest effect. In most large economies, consumer spending is the biggest part, so changes in household spending have an outsized impact on growth.

Related calculators:

Sources

U.S. Bureau of Economic Analysis: What to know about GDP.

Questions about this calculator

What is the GDP formula?

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

Why are imports subtracted?

To remove goods produced abroad that are already counted in spending.

Are transfer payments part of GDP?

No, they are not purchases of output.

What is real GDP?

GDP adjusted to remove inflation.

How is GDP growth calculated?

Percentage change in real GDP from the previous period.

Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.

Report a calculation issue