How it works
The expenditure approach to calculating GDP adds up four major categories of spending in an economy. When households buy groceries, businesses purchase machinery, governments fund infrastructure, and countries trade goods across borders, all of that activity contributes to GDP.
You provide five numbers: consumer spending (C), business investment (I), government purchases (G), exports (X), and imports (M). The calculator combines them using a single, straightforward formula that economists use worldwide to measure economic output.
The formula
GDP = C + I + G + (X − M)
Worked example
Imagine a mid-sized country with the following annual figures (in billions of dollars):
- Consumption (C): $800 billion — households spend on food, housing, transport, entertainment
- Investment (I): $200 billion — businesses build factories, buy equipment, develop technology
- Government spending (G): $250 billion — federal, state, and local governments pay for roads, schools, defence, healthcare
- Exports (X): $150 billion — the country sells cars, software, and agricultural products abroad
- Imports (M): $120 billion — the country buys electronics, oil, and raw materials from other nations
Step 1: Calculate net exports. $$X − M = 150 − 120 = 30 ext{ billion}$$
Step 2: Add all components. $$GDP = 800 + 200 + 250 + 30 = 1,280 ext{ billion}$$
The country's GDP is $1.28 trillion.
Notice that imports reduce the total—this is correct because they represent production that happened in other countries. If imports had been $160 billion instead, net exports would be −$10 billion, and GDP would fall to $1.27 trillion.
Tips
Consistency matters. All five inputs must cover the same time period (usually one year or one quarter). Mixing quarterly data with annual data produces meaningless results.
Watch the units. Whether you work in dollars, euros, yuan, or any other currency is fine—but don't mix units. Similarly, pick one scale (billions or trillions) and stick with it throughout.
Imports are tricky. A common mistake is to add imports instead of subtracting them. Remember: imports are goods made elsewhere, so they reduce the measure of domestic product. Only subtract them.
This is an estimate. Real GDP calculations by government statistics agencies involve price adjustments, seasonal corrections, and revisions over time. This calculator gives you the nominal figure based on your inputs—useful for learning or quick comparisons, but official economic data should come from your country's statistical authority.
The expenditure approach works because in a market economy, one person's spending is another person's income. By totalling all the spending categories, you capture the scale of economic activity and the value of everything produced.