GDP Calculator
Add up the four spending components to find GDP from the expenditure approach, or convert a nominal figure to real GDP using the deflator. Switch methods with the toggle.
One tile of the full GDP and national income unit.
The course teaches GDP and national income interactively — drag the graphs, practice with feedback, and spaced reviews bring it back before you forget. Free.
Enter each component in billions of dollars.
Gross domestic product
20,700 billion
Net exports (X − M) = -600 billion
What the course adds
Beyond this one page
The national-income unit builds GDP from the ground up — the expenditure and income approaches, the circular flow, nominal versus real, and what GDP leaves out — each on interactive graphs, with practice that finds your weak spots.
Spaced reviews
FSRS brings every concept back right before you'd forget. ~50% better retention than re-reading.
Per-concept mastery
Performance Factor Analysis tracks each sub-skill separately — you see which version of the idea is still wobbly.
Diagnostic placement
A short test skips you past what you already know. No re-learning the basics.
The formulas
Expenditure approach:
Nominal to real:
Net exports can be negative when a country imports more than it exports. That does not mean trade shrinks GDP — the imported goods were already counted inside , , or , and subtracting them just strips out the foreign-made part.
Worked example
Suppose a country reports, in billions of dollars: consumption 14,000, investment 3,500, government 3,800, exports 2,500, and imports 3,100.
billion
Now suppose nominal GDP is 23,000 billion and the deflator is 115.
billion
Prices are 15 percent above the base year, so real output of 20,000 billion sits below the 23,000 billion nominal figure. The gap is pure price inflation, not extra goods.
FAQ
- What is the expenditure approach to GDP?
- The expenditure approach adds up everything spent on final goods and services in a year: . is household consumption, is private investment (business spending on capital plus changes in inventories), is government purchases, and is net exports — exports minus imports. Because imports are subtracted, buying foreign goods does not count toward domestic output.
- Why are imports subtracted in the GDP formula?
- GDP measures domestic production. Consumption, investment, and government spending all include some imported goods, so those imports were already counted in , , or . Subtracting imports in removes the foreign-made portion, leaving only what was produced at home. A larger trade deficit does not, by itself, shrink GDP — the imports were already added in elsewhere.
- What is the difference between nominal and real GDP?
- Nominal GDP values output at current prices, so it rises when prices rise even if no extra goods are produced. Real GDP values output at the prices of a fixed base year, so it changes only when the quantity of goods and services changes. Real GDP is the better measure of whether an economy actually grew.
- How do you convert nominal GDP to real GDP?
- Divide nominal GDP by the GDP deflator and multiply by 100: . The deflator is a price index set to 100 in the base year. A deflator of 115 means prices are 15 percent higher than the base year, so real GDP is nominal GDP divided by 1.15.
- What is the GDP deflator?
- The GDP deflator is a price index that measures the average price of all goods and services counted in GDP, relative to a base year set to 100. It equals nominal GDP divided by real GDP, times 100. Unlike the consumer price index, which tracks a fixed basket, the deflator covers everything in GDP and reweights as the mix of output changes.
For instructors
Assign this to your class
Free, no account needed for students. Paste either snippet into Canvas, Moodle, Blackboard, Google Classroom, or your slide deck.
Sends students to the full page with the worked example and related lessons.
Inlines just the interactive widget in your LMS — no nav, no footer, no signup wall.
Ready to go deeper than a calculator?
The Econ Academy macroeconomics course builds national income accounting from scratch — the circular flow, the income approach, and what GDP misses — with interactive graphs and spaced-repetition review.