GDP Calculator (Gross Domestic Product)

Calculate nominal Gross Domestic Product with the standard expenditure-approach formula. Enter consumer spending, investment, government spending, exports, and imports to get total GDP, net exports, the growth rate versus a prior period, and consumption's share of output.

Quick Facts

Formula
GDP = C + I + G + (X − M)
The expenditure approach sums all final spending on goods and services produced within the country during the period.
Largest component
Consumption (C), in most economies
Household consumer spending is typically the largest single driver of GDP under the expenditure approach, followed by investment and government spending.

Your Results

Calculated
Nominal GDP
-
C + I + G + (X − M)
Net exports
-
Exports minus imports (X − M)
GDP growth rate
-
vs. the prior period entered
Consumption share
-
C as a percent of total GDP

Ready

Enter the five expenditure components (and, optionally, a prior period GDP) and press Calculate.

How the GDP Calculator works

Gross Domestic Product measures the total value of final goods and services produced within a country during a period. This calculator uses the standard expenditure approach, which adds up everything spent on that output rather than trying to track it at the source. It is the same method national statistics agencies (such as the U.S. Bureau of Economic Analysis) use for their headline GDP figure.

The formula

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

  • C — Consumer spending: household purchases of goods and services (groceries, rent, healthcare, entertainment).
  • I — Private investment: business spending on equipment, structures, and inventories, plus residential construction.
  • G — Government spending: government purchases of goods and services and public-sector investment (excludes transfer payments like pensions, which are not payments for current output).
  • X − M — Net exports: exports of goods and services minus imports. Imports are subtracted because spending captured in C, I, and G on foreign-made goods does not represent domestic production.

Worked example

With the default figures — $15,000B consumption, $4,000B investment, $4,500B government spending, $2,000B exports, and $2,800B imports — net exports are $2,000B − $2,800B = −$800B (a trade deficit). Adding the components: $15,000B + $4,000B + $4,500B − $800B = $22,700B nominal GDP. If the prior period's GDP was $22,000B, growth works out to (22,700 − 22,000) / 22,000 × 100 ≈ 3.18%.

Nominal GDP, not real GDP

This tool reports nominal GDP: the sum of your inputs valued at the prices of the period you entered. It does not adjust for inflation. Real GDP divides nominal GDP by a price index (the GDP deflator) so that growth reflects a genuine change in output rather than rising prices. If you are comparing two periods with meaningfully different price levels, deflate both figures to a common base year before comparing growth rates.

Reading the result

  • Net exports: a negative value means the country is a net importer for the period (a trade deficit); a positive value means a trade surplus.
  • Growth rate: compares the calculated GDP against the prior-period figure you supply. Leave the prior GDP at 0 and this field reports "N/A" since there is nothing to compare against.
  • Consumption share: consumer spending divided by total GDP. In many large developed economies this typically runs somewhere in the 55%–70% range, though it varies significantly by country and by how export- or investment-driven the economy is.

Frequently Asked Questions

How is GDP calculated?
This calculator uses the expenditure approach: GDP = C + I + G + (X − M), where C is consumer spending, I is private investment, G is government spending, X is exports, and M is imports. Adding up final spending on goods and services produced within the country gives total output for the period.
What does it mean when net exports are negative?
Negative net exports (X − M) mean the country imported more than it exported, i.e. a trade deficit. That deficit is subtracted in the GDP formula because imports represent spending on goods produced elsewhere, not domestic output, even though they are also counted inside consumption, investment, and government spending.
Is this nominal or real GDP?
This tool produces nominal GDP: the sum of the dollar figures you enter for the period, valued at that period's prices. Real GDP adjusts nominal GDP for inflation using a price index (a GDP deflator) so growth between periods reflects actual output rather than price changes. This calculator does not apply that adjustment.
What does the GDP growth rate compare against?
The growth rate compares the GDP calculated from your five inputs to the prior period GDP figure you enter, using (current GDP − prior GDP) / prior GDP × 100. For the comparison to be meaningful, both figures should use the same currency, the same time period length, and the same nominal or real basis.