GDP Calculator
Compute GDP by the expenditure approach: C + I + G + (X − M), the total market value of final goods and services produced in a period.
Input Data
Results
At a glance:GDP (gross domestic product) is the total market value of all final goods and services produced within an economy in a period. By the expenditure approach: GDP = C + I + G + (X − M) — consumption, investment, government spending and net exports. It is the core measure of economic scale. C is usually the largest component in most economies. Net exports can be negative (a trade deficit) and drags GDP down. This calculator gives nominal GDP; use the deflator for real GDP. GDP misses distribution, non-market activity and quality of life.
Formula
GDP = C + I + G + (X − M).
Net exports = X − M.
$$GDP = C + I + G + (X - M)$$$$NX = X - M$$How to Use
- Enter household consumption (C).
- Enter investment (I).
- Enter government spending (G).
- Enter exports (X) and imports (M).
- View GDP and net exports.
Expenditure-approach GDP composition (HK$100M)
| Case | C | I | G | X | M | X−M | GDP |
|---|---|---|---|---|---|---|---|
| Domestic-led | 8,000 | 2,000 | 3,000 | 1,500 | 1,200 | 300 | 13,300 |
| Export-led | 9,000 | 2,500 | 3,200 | 2,000 | 1,800 | 200 | 14,900 |
| Deficit | 7,000 | 1,500 | 2,800 | 1,000 | 1,400 | −400 | 10,900 |
Negative net exports (imports > exports) lowers GDP; C is usually the largest GDP component.
Case Studies
Case 1: Decompose an open economy's GDP
C 8,000, I 2,000, G 3,000, X 1,500, M 1,200 (HK$100M).
Net exports = 1,500 − 1,200 = 300; GDP = 8,000 + 2,000 + 3,000 + 300 = 13,300.
C is ~60% of GDP, the largest; net exports positive but small — a domestic-led economy. To lift GDP, consumer-demand stimulus usually has more leverage than trade alone.
Case 2: How a trade deficit drags GDP
C 7,000, I 1,500, G 2,800, X 1,000, M 1,400.
Net exports = 1,000 − 1,400 = −400 (deficit); GDP = 7,000 + 1,500 + 2,800 − 400 = 10,900.
With the same C+I+G = 11,300, zero net exports would give 11,300; the deficit subtracts 400. Imports are a minus in the expenditure approach (domestic demand leaks abroad) — do not think 'more imports = higher GDP'.
FAQ
How does the expenditure approach differ from other GDP methods?
Three equivalent methods measure the same output from different angles. This calculator uses the expenditure approach — sum all sectors' spending on final output: GDP = C + I + G + (X − M), intuitive for 'who buys the output'. The income approach sums factor incomes — wages, rent, interest, profit, plus depreciation and indirect taxes — 'who earns the output'. The production (value-added) approach sums each industry's output minus intermediate inputs, 'which industries create it'. They are equal because total spending = total income = total value added — every dollar spent is someone's income and some production's value. Statistical agencies cross-check with several. The expenditure approach is the most intuitive and the one news uses for GDP composition (consumption share, etc.).
Nominal vs real GDP?
Nominal GDP is at current prices (what this calculator gives); real GDP removes price change using a base-period price. The key is whether inflation is stripped. Example: same output as last year but all prices +5% → nominal GDP is +5% but nothing extra was produced; nominal misleads you into thinking the economy grew, while real GDP (fixed base prices) shows no growth. To judge true growth, watch real GDP. Convert via the GDP deflator: real GDP = nominal ÷ (deflator ÷ 100). Use real GDP for cross-year scale and growth rates. Pair with the GDP growth calculator.
Does high GDP mean a good life?
Not necessarily — GDP measures total output scale, not welfare. Limits: (1) it is a total; a populous economy has big GDP but low per person — use per-capita GDP (GDP ÷ population); (2) it ignores distribution — high per-capita with extreme inequality means most are not well off, need the Gini coefficient; (3) it counts only market transactions — housework, volunteering, subsistence and the underground economy are excluded; (4) it does not subtract environmental/social costs — pollution and crash repairs raise GDP yet lower welfare; (5) it misses health, education, leisure, safety. Hence HDI, green GDP and happiness indices as complements. GDP is a handy scale metric; judge welfare with per-capita GDP, distribution, inflation, unemployment and quality-of-life indicators.
Why is imports (M) a minus in the GDP formula?
Because GDP measures locally produced final value, but C, I, G sum all resident spending — including spending on imports. Example: a Hong Kong consumer buys a foreign phone, counted in C, but it is not Hong Kong-produced and should not be in Hong Kong's GDP. To fix the double count, subtract imports M, removing all spending on foreign-produced goods. So (X − M) is both net exports and a correction: add local output sold abroad (X), subtract the foreign-produced part of spending (M), leaving GDP reflecting only local production. Do not misread 'imports hurt the economy' — imports satisfy domestic need (already in C/I/G); subtracting just avoids double counting, not implying imports are bad.
GDP vs GNP (GNI)?
GDP and GNP/GNI differ by border vs nationality. GDP is territorial — anything produced within the economy's borders counts, by locals or foreigners (foreign firms, migrant workers). GNP/GNI is by nationality — residents' production/income counts wherever earned, minus foreigners' local earnings. Relation: GNP = GDP + net foreign factor income (residents' overseas earnings − foreigners' local earnings). Example: a foreign factory in Hong Kong counts in HK GDP but its profit repatriated is not in HK GNP; HK residents' overseas investment income counts in GNI not GDP. Economies reliant on foreign capital or with large outward investment show a bigger GDP/GNP gap. For 'domestic activity and jobs' use GDP; for 'residents' actual income' use GNI.
Related Tools
References
Content review: Calculatorism Finance Team. Results are for reference only; please refer to the relevant authorities for the official figures.