Business Finance · Formula v1.0

GDP Calculator

Calculate gross domestic product from consumption, investment, government spending, exports and imports.

LAST REVIEWEDSeptember 24, 2026Inputs stay in your browser
Live calculation

Enter your numbers

Calculated result
Gross domestic product$22,300
Net exports (X − M)-$700
Sensitivity check

What if consumption (c) changes?

-10% input$20,800
0% input$22,300
+10% input$23,800

Answer first

What this calculator tells you

Calculate gross domestic product from consumption, investment, government spending, exports and imports. Check how each part of the expenditure approach adds to, or takes from, an economy's output. Formula: GDP = consumption + investment + government spending + (exports − imports). At the worked-example inputs, the gross domestic product is $22,300. Holding every other input steady, moving consumption (c) from $12,000 to $18,000 moves the result from $19,300 to $25,300.

FreeNo sign-upInputs stay in-browserCSV exportReviewed September 24, 2026

Transparent method

The formula

GDP = consumption + investment + government spending + (exports − imports)Enter consumption (c) in dollars, investment (i) in dollars, government spending (g) in dollars, exports (x) in dollars and imports (m) in dollars.

Check how each part of the expenditure approach adds to, or takes from, an economy's output.

Worked example

Gross domestic product$22,300
Net exports (X − M)-$700

Example inputs

Consumption (C)$15,000
Investment (I)$4,000
Government spending (G)$4,000
Exports (X)$2,500
Imports (M)$3,200

How to interpret the result

Gross domestic product adds up what an economy spends on final goods and services in a year. Households consume, businesses invest, governments buy, and the country sells to and buys from the rest of the world. The trade line is exports minus imports, so it can pull the total down. Here it removes 700 from 23,000 of domestic demand, leaving 22,300.

At the worked-example inputs the gross domestic product is $22,300. It rises with consumption (c), investment (i), government spending (g) and exports (x) and falls as imports (m) increases.

Interpretation boundary

These are planning metrics, not audited accounting or a valuation opinion.

Before you rely on it

What to check

Keep all five lines in the same unit and the same year's prices. A mix of billions and trillions, or of two different years, gives a total that means nothing.

The common error

Where people go wrong with GDP calculator

Counting government transfers such as pensions as government spending. They move money between people and buy nothing themselves, so they enter later, as consumption.

Sensitivity evidence

How consumption (c) changes the gross domestic product

Holding every other input at the worked-example value, moving consumption (c) from $12,000 to $18,000 moves the gross domestic product from $19,300 to $25,300: a spread of $6,000, or 27% of the worked-example result.

GDP Calculator: gross domestic product and net exports (x − m) across a range of consumption (c), every other input held at the worked-example value.
Consumption (C)Gross domestic productNet exports (X − M)
$12,000$19,300-$700
$13,500$20,800-$700
$15,000worked example$22,300-$700
$16,500$23,800-$700
$18,000$25,300-$700

Every input, tested

Which input moves the gross domestic product most

Of the 5 inputs, consumption (c) moves the gross domestic product most ($3,000 across the range tested) and exports (x) moves it least ($500).

GDP Calculator: gross domestic product with each input moved on its own, every other input held at the worked-example value.
InputTested fromToGross domestic product at each endSwing
Consumption (C)$13,500$16,500$20,800 to $23,800$3,000 (13%)
Investment (I)$3,600$4,400$21,900 to $22,700$800 (3.6%)
Government spending (G)$3,600$4,400$21,900 to $22,700$800 (3.6%)
Imports (M)$2,880$3,520$22,620 to $21,980$640 (2.9%)
Exports (X)$2,250$2,750$22,050 to $22,550$500 (2.2%)

Two variables at once

Gross domestic product by consumption (c) and investment (i)

Across the grid the gross domestic product runs from $18,500 to $26,100. Moving consumption (c) from $12,000 to $18,000 shifts it by $6,000 at the middle column, and moving investment (i) from $3,200 to $4,800 shifts it by $1,600 at the middle row, so consumption (c) is the bigger lever here.

GDP Calculator: gross domestic product at each combination of consumption (c) (rows) and investment (i) (columns).
Consumption (C) \ Investment (I)$3,200$4,000$4,800
$12,000$18,500$19,300$20,100
$13,500$20,000$20,800$21,600
$15,000$21,500$22,300$23,100
$16,500$23,000$23,800$24,600
$18,000$24,500$25,300$26,100

The highlighted cell is the worked example: $22,300.

Step by step

The worked example, input by input

Worked-example inputs and the results they produce for the GDP calculator.
InputValue usedWhat it means
Consumption (C)$15,000Household spending, in the same unit as the other lines, such as billions.
Investment (I)$4,000Business investment, home building and inventory change.
Government spending (G)$4,000Government purchases of goods and services. Transfer payments are left out.
Exports (X)$2,500Enter the exports (x) used in this calculation.
Imports (M)$3,200Enter the imports (m) used in this calculation.
Gross domestic product$22,300
Net exports (X − M)-$700

Inputs, definitions and assumptions

Consumption (C)

Household spending, in the same unit as the other lines, such as billions. The prefilled worked-example value is $15,000.

Investment (I)

Business investment, home building and inventory change. The prefilled worked-example value is $4,000.

Government spending (G)

Government purchases of goods and services. Transfer payments are left out. The prefilled worked-example value is $4,000.

Exports (X)

Enter the exports (x) used in this calculation. The prefilled worked-example value is $2,500.

Imports (M)

Enter the imports (m) used in this calculation. The prefilled worked-example value is $3,200.

How to use this calculator

  1. 1Verify the inputs. Gather consumption (c), investment (i), government spending (g), exports (x) and imports (m) from your own documents; the prefilled values are examples.
  2. 2Save a baseline. The worked example puts the gross domestic product at $22,300. Store your own version of it as Scenario A.
  3. 3Test one change. Start with consumption (c), the input with the biggest effect here: moving consumption (c) from $13,500 to $16,500 takes the gross domestic product from $20,800 to $23,800, a swing of 13% of the worked-example figure.
  4. 4Check the extremes. At half the example consumption (c) ($7,500) the gross domestic product is $14,800; at double ($30,000) it is $37,300.

People also ask

Frequently asked questions

How do you calculate GDP?

GDP = consumption + investment + government spending + (exports − imports). Enter consumption (c) in dollars, investment (i) in dollars, government spending (g) in dollars, exports (x) in dollars and imports (m) in dollars. At the worked-example inputs the gross domestic product is $22,300.

What does the GDP result mean?

Check how each part of the expenditure approach adds to, or takes from, an economy's output. At the worked-example inputs the gross domestic product is $22,300. It rises with consumption (c), investment (i), government spending (g) and exports (x) and falls as imports (m) increases.

How much does consumption (c) change the gross domestic product?

Holding every other input at the worked-example value, moving consumption (c) from $12,000 to $18,000 moves the gross domestic product from $19,300 to $25,300, a spread of $6,000.

What are the limits of this GDP calculator?

These are planning metrics, not audited accounting or a valuation opinion. The tables on this page test consumption (c) only from $12,000 to $18,000; a value outside that range is not tabulated here.

Which input moves the gross domestic product most in the GDP calculator?

Ranked by how far each moves the gross domestic product across the range tested: consumption (c) ($3,000, 13%), investment (i) ($800, 3.6%), government spending (g) ($800, 3.6%) and imports (m) ($640, 2.9%).

If I double consumption (c) in the GDP calculator, does the gross domestic product double?

Doubling it from $15,000 to $30,000 takes the gross domestic product from $22,300 to $37,300, which is 1.67 times the worked-example figure. So it grows, but by less than double. Halving it to $7,500 gives $14,800.

How much does investment (i) matter in the GDP calculator?

The worked example uses $4,000. With the other inputs left at the worked example, moving investment (i) from $3,600 to $4,400 takes the gross domestic product from $21,900 to $22,700, a swing of 3.6% of the worked-example figure.

How much does government spending (g) matter in the GDP calculator?

The worked example uses $4,000. With the other inputs left at the worked example, moving government spending (g) from $3,600 to $4,400 takes the gross domestic product from $21,900 to $22,700, a swing of 3.6% of the worked-example figure.

How much does exports (x) matter in the GDP calculator?

The worked example uses $2,500. With the other inputs left at the worked example, moving exports (x) from $2,250 to $2,750 takes the gross domestic product from $22,050 to $22,550, a swing of 2.2% of the worked-example figure.

How much does imports (m) matter in the GDP calculator?

The worked example uses $3,200. Holding every other input at its worked-example value, moving imports (m) from $2,880 to $3,520 takes the gross domestic product from $22,620 to $21,980, a swing of 2.9% of the worked-example figure.

Which inputs change the net exports (x − m) in the GDP calculator?

At the worked-example inputs it is -$700. Exports (x) takes it from -$950 to -$450 and imports (m) takes it from -$380 to -$1,020.

What is the difference between gross profit and net profit?

Gross profit is revenue minus the direct cost of what was sold. Net profit is what remains after every other cost, including overhead, interest and tax. A business can show a healthy gross profit and still make a net loss.

All business finance questions answered

Sources and evidence

Free Calculators Online is independent and is not affiliated with or endorsed by the source organizations. Educational estimates only.

Background reading

Guides that use this calculator

Definitions

Terms used on this page

Fixed cost : glossary term
A cost that does not vary with output within a given capacity range. Cross that range and it steps up.
Gross margin : glossary term
Revenue minus cost of goods sold, divided by revenue.
Variable cost : glossary term
A cost that changes with output. Subtracted from price to give contribution margin, the figure that drives break-even.
Break-even point : glossary term
The volume at which total revenue equals total costs. It moves whenever the cost structure changes. Treat it as a range, not a point: fixed costs are only fixed within a capacity band.