acalculator

What is the GDP from its parts?

Type consumption, investment, government spending, exports and imports in one unit. The GDP calculator adds them up by the expenditure approach and shows net exports, each part’s share, real GDP from a price index, and GDP per person.

Your numbers

Real GDP and per person
GDP
20.9

GDP = $20.9 trillion.

GDP in words
$20.9 trillion
Net exports (X − M)
-0.6
Consumption share
67%
Investment share
17.2%
Government share
18.7%
Net exports share
-2.9%

GDP: 20.9. GDP = $20.9 trillion.

The results are estimates for information only. They are not financial, tax, or legal advice. Check the numbers with your lender or a qualified professional before you decide. Terms of use

How to calculate

Computes gross domestic product by the expenditure approach, GDP = C + I + G + (X − M), with net exports, each part’s share, real GDP from a deflator, and GDP per person.

Example with the default inputs (Amounts are in Trillions of dollars, Consumption (C) 14, Investment (I) 3.6, Government (G) 3.9, Exports (X) 2.1, Imports (M) 2.7): GDP = $20.9 trillion.

Method: GDP = C + I + G + (X − M); real GDP = GDP ÷ (deflator ÷ 100); GDP per person = GDP in dollars ÷ population.

  • The expenditure approach of the national accounts (BEA): consumption, investment, government, and exports minus imports.
  • You type every amount, in one unit; no data is looked up.
  • Real GDP uses the deflator you type, with its base year = 100.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Amounts are in Trillions of dollars, Consumption (C) 14, Investment (I) 3.6, Government (G) 3.9, Exports (X) 2.1, Imports (M) 2.7 gives GDP 20.9, Net exports (X − M) -0.6, GDP in words $20.9 trillion.Source: OpenStax, Principles of Macroeconomics 3e, §6.1, Table 6.1 Components of U.S. GDP (consumption $14.0, investment $3.6, government $3.9, exports $2.1, imports −$2.7, total $20.9 trillion), https://openstax.org/books/principles-macroeconomics-3e/pages/6-1-measuring-the-size-of-the-economy-gross-domestic-product
  2. Amounts are in Billions of dollars, Consumption (C) 542.4, Investment (I) 0, Government (G) 0, Exports (X) 0, Imports (M) 0, GDP deflator (price index) 16.6 gives Real GDP 3,267.46988.Source: OpenStax, Principles of Macroeconomics 3e, §6.2 Adjusting Nominal Values to Real Values (real GDP = nominal GDP ÷ (price index ÷ 100); 1960: $542.4 billion ÷ 0.166 = $3,267.5 billion), https://openstax.org/books/principles-macroeconomics-3e/pages/6-2-adjusting-nominal-values-to-real-values
  3. Amounts are in Trillions of dollars, Consumption (C) 14, Investment (I) 3.6, Government (G) 3.9, Exports (X) 2.1, Imports (M) 2.7, Population 334,000,000 gives GDP per person $62,574.85, Consumption share 66.985646%.Source: OpenStax, Principles of Macroeconomics 3e, §6.1, Table 6.1, https://openstax.org/books/principles-macroeconomics-3e/pages/6-1-measuring-the-size-of-the-economy-gross-domestic-product

How it works

All five parts are typed in the same unit: dollars, or thousands, millions, billions or trillions of dollars.

  • GDP = C + I + G + (X − M)
  • Net exports = X − M
  • Shares: consumption = C ÷ GDP × 100, investment = I ÷ GDP × 100, government = G ÷ GDP × 100, net exports = (X − M) ÷ GDP × 100. They add up to 100%.
  • Real GDP (when you type a deflator) = GDP ÷ (deflator ÷ 100), in the same unit.
  • GDP per person (when you type a population) = GDP × the unit (1, 1,000, 1,000,000, 10⁹ or 10¹²) ÷ population, in dollars.
  • GDP in words = "$" + GDP rounded half up to 2 decimals (trailing zeros left off, thousands separated by commas) + the unit word (thousand, million, billion or trillion; nothing for dollars).

Rules. GDP must be more than 0; when C + I + G + (X − M) is 0 or less there is no answer and the page says so. C, G, X and M are from 0 to 10¹⁵; I may be negative (inventories can fall), from −10¹⁵ to 10¹⁵. The deflator is from 0.001 to 100,000 and the population a whole number from 1 to 100,000,000,000.

Exact arithmetic. Every step is an exact fraction of the decimals you type, rounded once for display.

Output format. GDP, net exports and real GDP show with at most 2 decimals, shares as percents with at most 1 decimal, and GDP per person in dollars and cents, each rounded half up from its exact value.

Assumptions

  • The expenditure approach of the national accounts; no numbers are looked up.
  • Real GDP uses the deflator you type, with its base year equal to 100.

Worked examples by hand

OpenStax’s U.S. table, in trillions. 14.0 + 3.6 + 3.9 + (2.1 − 2.7) = 20.9, so $20.9 trillion; net exports −0.6.

Real GDP for 1960. $542.4 billion ÷ (16.6 ÷ 100) = 542.4 ÷ 0.166 = 3,267.47 billion of base-year dollars.

Per person. $20.9 trillion = 20,900,000,000,000 ÷ 334,000,000 people = $62,574.85. Consumption share 14 ÷ 20.9 = 67.0%.

Other questions people ask

How do you calculate GDP?

By the expenditure approach, GDP = C + I + G + (X − M): consumption plus investment plus government spending plus exports minus imports. With OpenStax’s U.S. figures (trillions of dollars), 14.0 + 3.6 + 3.9 + (2.1 − 2.7) = 20.9.

What is GDP?

The BEA defines it as the value of the final goods and services produced in the United States. Only final goods count, so the steel in a new car is not counted twice.

Why are imports subtracted?

Consumption, investment and government spending include goods made abroad. Subtracting imports takes them out, so GDP counts only what was produced at home. Exports are made at home but bought abroad, so they are added.

What is the difference between nominal and real GDP?

Nominal (current-dollar) GDP uses the prices of the year measured. Real GDP removes inflation by dividing by a price index: real GDP = nominal GDP ÷ (deflator ÷ 100). OpenStax’s example: 1960 nominal GDP of $542.4 billion with a deflator of 16.6 is $3,267.5 billion in base-year dollars.

How do I find GDP per person?

Divide GDP in dollars by the population. $20.9 trillion shared by 334 million people is about $62,575 each.

Where do I find the numbers?

In the national accounts. For the United States, the Bureau of Economic Analysis (BEA) publishes GDP and its parts each quarter. Type them here in one unit, for example billions of dollars.