GDP Calculator
With consumption (c) 20700 usd, investment (i) 5200 usd, government (g) 5300 usd, exports (x) 3300 usd and 3 more fields, gdp comes to 30,200.0 $ billion — nominal gdp. It is reached in 8 steps, the last of which is 20700 + 5200 + 5300 + -1000, and each one is printed on the page with its numbers filled in. The formula is the one published by BEA, not an approximation fitted to it.
Gross domestic product by the expenditure approach, with the share each component contributes, real GDP after the price deflator, and GDP per head.
Formula and sources checked · How we check
Consumption (C) 20700, Investment (I) 5200, Government (G) 5300, Exports (X) 3300
30,200.0 $ billion
Nominal GDP for the example below. Editing a field recomputes the calculator below; this figure holds the answer the page was loaded with.
It is written into the HTML rather than drawn by a script, so a search engine reading this page without running JavaScript still finds an answer.
- Net exports (X − M)
3300 - 4300-1,000- Nominal GDP, $bn
20700 + 5200 + 5300 + -100030,200- Real GDP, $bn at base-year prices
30200 * 100 / 12723,779.528- GDP per head
30200 * 1000000000 / 342000000$88,304- Consumption share
20700 / 30200 * 10068.543- Investment share
5200 / 30200 * 10017.219- Government share
5300 / 30200 * 10017.55- Net exports share
-1000 / 30200 * 100-3.311
Worked example
Net exports are 3,300 − 4,300 = −1,000, so the trade deficit subtracts a trillion dollars. GDP is 20,700 + 5,200 + 5,300 − 1,000 = $30,200 billion. Divided by a deflator of 127 that is $23,780 billion at base-year prices, and across 342 million people, $88,304 a head.
How to work it out yourself
- 1.Enter every figure in the same units. BEA publishes the components in billions of dollars at an annual rate, which is what the defaults use; a quarterly figure has to be annualised first or the answer is a quarter of the truth.
- 2.Subtract imports rather than leaving them out. An imported car sits inside consumption already — the subtraction removes it, it does not penalise trade. A rising trade deficit lowers measured GDP arithmetically, not economically.
- 3.Use the deflator when comparing years. Nominal GDP rises when prices rise even if nothing more is produced; real GDP is the same output priced at one year’s prices, and it is the only one of the two that answers "did the economy grow".
The formula
- Net exports (X − M)
3300 - 4300 - Nominal GDP, $bn
20700 + 5200 + 5300 + -1000 - Real GDP, $bn at base-year prices
30200 * 100 / 127 - GDP per head
30200 * 1000000000 / 342000000 - Consumption share
20700 / 30200 * 100 - Investment share
5200 / 30200 * 100 - Government share
5300 / 30200 * 100 - Net exports share
-1000 / 30200 * 100
Source: BEA — NIPA handbook, chapter 2: fundamental concepts, BEA — gross domestic product, current release
Questions people actually ask
- What is the formula for GDP?
- GDP = C + I + G + (X − M): consumption, plus investment, plus government spending, plus exports minus imports. That is the expenditure approach, the one BEA publishes quarterly. Two other approaches — income and production — arrive at the same total from different sides of the same transactions.
- Why are imports subtracted from GDP?
- Because they were already added. A phone bought by a household is counted in consumption whether it was made in Ohio or Shenzhen, so the import subtraction removes the part that was not produced domestically. It is bookkeeping, not a judgement about trade.
- What is the difference between nominal and real GDP?
- Nominal GDP values this year’s output at this year’s prices; real GDP values it at a fixed base year’s prices. If output is flat and prices rise 3%, nominal GDP rises 3% and real GDP does not move. Growth figures in the news are real.
- Does government spending include social security?
- No. Transfer payments — social security, unemployment, Medicaid — are excluded from G, because no good or service is produced when the money moves. They enter GDP later, inside consumption, when the recipient spends them.
Related
- ROI CalculatorReturn on investment as a total percentage and as an annualised rate, so holdings of different lengths compare fairly.
- Present Value CalculatorWhat a future sum, or a stream of payments, is worth today at a given discount rate. Names what the wait costs, as money and as a share of the nominal total.
- Compound Interest CalculatorFuture value of a starting balance plus monthly contributions, separating what you put in from what the interest earned.
- Average Return CalculatorThe compound annual growth rate of an investment, next to the arithmetic average that overstates it.
- Salary CalculatorPay converted between every period — hourly, daily, weekly, biweekly, semi-monthly, monthly and annual — with unpaid holidays and days off taken out.
- Tip CalculatorTip and total from a bill, and what each person owes once it is split — including the rounding that makes the split come out even.
Where this one stops
Put this calculator on your site
Free, no attribution required beyond the link.
<iframe src="https://rulecalculators.com/embed/gdp" width="100%" height="420" style="border:1px solid #e7e4de;border-radius:12px" title="GDP Calculator"></iframe>