GDP Calculator
Compute a country's Gross Domestic Product from its core spending components using the expenditure approach.
Example
With Consumption = 14,000, Investment = 4,000, Government = 3,500, Exports = 2,500 and Imports = 3,000: net exports = 2,500 - 3,000 = -500, so GDP = 14,000 + 4,000 + 3,500 - 500 = $21,000.
How it works
The expenditure approach: GDP = C + I + G + (X - M), where C is consumption, I is investment, G is government spending, X is exports and M is imports. Net exports equals exports minus imports.
Good to know
This GDP Calculator computes a country's Gross Domestic Product using the expenditure approach, summing household consumption (C), business investment (I), government spending (G), and net exports (exports minus imports). You enter the five spending components and it returns total GDP along with net exports and the percentage share each major component contributes. It's aimed at economics students, instructors, journalists, and anyone reconstructing or sanity-checking national-accounts figures.
Reach for it when you have spending-side data and want a quick total, when you're working through a textbook problem set, or when you want to model how a change in one component (say a rise in imports or a cut in government spending) shifts both the GDP total and the composition of the economy. Because it recalculates live as you type, it's well suited to "what-if" exploration rather than a one-off single answer.
To read the result, start with the headline GDP figure, then look at net exports: a negative value means imports exceed exports (a trade deficit), which pulls GDP down even when domestic spending is strong. The consumption, investment, and government shares tell you the structure of the economy; in most developed economies consumption is by far the largest slice, often around 60 to 70 percent of GDP. Note that share percentages are taken against total GDP, so when net exports are negative the three positive shares can sum to more than 100 percent.
A practical caveat: keep every input in the same unit and the same currency (for example, all in billions of USD), since the tool does no unit conversion and assumes a single consistent measure. Also remember this is the nominal expenditure approach using the numbers you supply; it does not adjust for inflation, so it won't match real (inflation-adjusted) GDP unless your inputs are already in real terms, and it won't necessarily equal figures derived from the income or production approaches.
Frequently asked questions
What is the expenditure approach to GDP?
It measures GDP as total spending in an economy: household consumption (C), business investment (I), government spending (G), and net exports (exports X minus imports M). The formula is GDP = C + I + G + (X - M).
Why can net exports be negative?
Net exports equal exports minus imports. When a country imports more goods and services than it exports, net exports are negative, which reduces total GDP. This is common for trade-deficit economies.
Is my data uploaded anywhere?
No — this calculator runs entirely in your browser. Your inputs never leave your device, and it works offline once loaded.
Is this calculator free?
Yes, completely free with no sign-up and no limits.
People also ask
What are the four components of GDP in the expenditure approach?
They are consumption (C), investment (I), government spending (G), and net exports, where net exports equals exports (X) minus imports (M). The full formula is GDP = C + I + G + (X - M).
Do imports subtract from GDP?
Imports are subtracted in the net exports term because GDP measures domestic production; spending on foreign-made goods is already counted in C, I, or G, so subtracting imports removes that foreign output from the total.
What is the difference between nominal and real GDP?
Nominal GDP values output at current prices, while real GDP adjusts for inflation by using prices from a fixed base year. This calculator returns nominal GDP unless the inputs you enter are already inflation-adjusted.
What is the difference between GDP and GNP?
GDP measures the value of goods and services produced within a country's borders, while GNP (Gross National Product) measures output produced by a country's residents and firms regardless of location. They differ by net income earned from abroad.
Why is consumption usually the largest part of GDP?
Household spending on goods and services tends to dominate because it covers everyday purchases by the entire population, and in many developed economies it accounts for roughly 60 to 70 percent of total GDP.
Are there other ways to calculate GDP besides the expenditure approach?
Yes. The income approach sums wages, profits, rents, and taxes minus subsidies, and the production (output) approach sums the value added at each stage of production. In theory all three methods yield the same GDP figure.
What does a negative net exports figure mean for an economy?
It indicates a trade deficit, meaning the country imports more goods and services than it exports. This subtracts from GDP, though it can reflect strong domestic demand or reliance on foreign goods rather than economic weakness on its own.
What units should I enter values in for a GDP calculation?
Use one consistent unit and currency for all five inputs, such as billions of US dollars. The calculator does not convert units, so mixing scales or currencies will produce an inaccurate total.
Related calculators