AP MacroInflationGDP DeflatorCPIPrice Indexes

GDP Deflator vs CPI: The Difference, With a Worked Example

·9 min read
Jude Wallis

Jude Wallis

Founder of EconLearn · 2nd place internationally, Economics Olympiad (econolympiad.org)

The GDP deflator and the Consumer Price Index (CPI) are both measures of the overall price level, and both are used to compute inflation, but they are built differently and they can disagree. The short version: the CPI tracks the prices of a fixed basket of goods bought by a typical consumer, including imports, while the GDP deflator tracks the prices of everything a country produces, using a basket that updates every year. Those two design choices, a fixed basket versus a changing one, and consumption versus domestic production, are the entire reason the two indexes can move apart. This guide explains each one, lays out the differences, and works a full numeric example for a tiny economy so you can see precisely when and why they diverge.

The Short Answer

Use the CPI when you care about the cost of living for a household, since it measures the price of what consumers actually buy. Use the GDP deflator when you care about the price of a nation's total output, since it covers everything counted in GDP. In practice they usually tell a similar inflation story, but in any year with big changes in import prices or in what the economy produces, they can split apart, and knowing which way they split is a favorite exam question.

Both are computed with the inflation rate formula once you have the index values, and both rest on the same real versus nominal distinction.

What Each One Measures

The Consumer Price Index (CPI) measures the cost of a fixed basket of goods and services that a representative urban consumer buys. Statisticians survey households, fix the basket of quantities in a base period, then track how much that same basket costs over time. Because the basket is fixed, the CPI is a Laspeyres index: it holds quantities constant at base-year levels and lets only prices change. Importantly, the CPI includes imported consumer goods, because consumers buy them, and it excludes things consumers do not buy directly, such as industrial machinery. You can walk the full calculation in the CPI calculator.

The GDP deflator measures the price level of all final goods and services produced domestically. It is defined as:

GDP deflator = (Nominal GDP / Real GDP) times 100

Because nominal GDP uses current-year quantities and current prices, while real GDP uses current-year quantities at base-year prices, the deflator effectively weights prices by what the economy is producing this year. That makes it a Paasche index: it uses current-year quantities. It covers investment goods, government purchases, and exports, but it excludes imports, because imports are not part of domestic production. Step through it in the GDP deflator calculator, and see the real GDP piece in the real GDP calculator.

The Three Key Differences

FeatureCPIGDP deflator
BasketFixed base-year quantities (Laspeyres)Current-year quantities (Paasche)
CoverageGoods and services consumers buyAll domestically produced final output
ImportsIncluded (consumers buy them)Excluded (not domestic production)
Capital and government goodsLargely excludedIncluded
UpdatesBasket revised only occasionallyBasket effectively updates every year

Those differences produce two predictable patterns. First, because the CPI holds the basket fixed, it tends to overstate inflation slightly (a substitution bias): when a good gets expensive, consumers switch away from it, but the fixed basket keeps buying the old amount. The deflator, using current quantities, captures that substitution. Second, when import prices spike, the CPI rises but the deflator does not, because the deflator ignores imports.

A Worked Example: A Two-Good Economy

Imagine an economy that produces only two goods, bread and computers. Here is the data for the base year (Year 1) and the current year (Year 2).

GoodYear 1 priceYear 1 quantityYear 2 priceYear 2 quantity
Bread11002100
Computers10201230

Notice what changed: the price of bread doubled (a 100 percent rise), the price of computers rose only 20 percent, and the economy produced more computers in Year 2 (30 instead of 20).

Step 1: Compute the CPI. The CPI holds the basket at base-year quantities: 100 bread and 20 computers, in both years.

Cost of the fixed basket at Year 1 prices = (100 times 1) + (20 times 10) = 100 + 200 = 300

Cost of the same fixed basket at Year 2 prices = (100 times 2) + (20 times 12) = 200 + 240 = 440

CPI in Year 2 (base = 100) = (440 / 300) times 100 = 146.7

So CPI inflation from Year 1 to Year 2 is (146.7 minus 100) / 100 = 46.7 percent.

Step 2: Compute the GDP deflator. The deflator uses current-year (Year 2) quantities: 100 bread and 30 computers.

Nominal GDP in Year 2 (Year 2 prices, Year 2 quantities) = (100 times 2) + (30 times 12) = 200 + 360 = 560

Real GDP in Year 2 (Year 1 prices, Year 2 quantities) = (100 times 1) + (30 times 10) = 100 + 300 = 400

GDP deflator in Year 2 = (560 / 400) times 100 = 140.0

So GDP-deflator inflation from Year 1 to Year 2 is (140 minus 100) / 100 = 40.0 percent.

Step 3: Read the divergence. CPI says prices rose 46.7 percent; the GDP deflator says 40.0 percent. Same economy, same year, two different inflation numbers.

Why the gap? The two goods inflated at very different rates: bread by 100 percent, computers by only 20 percent. The CPI, using the fixed base-year basket, weights the goods by how many were bought in Year 1, when computers were a smaller share (20 units). The deflator weights by Year 2 production, when computers were a larger share (30 units). Because the deflator puts more weight on computers, the low-inflation good, it reports lower overall inflation. The CPI, stuck with the old basket that had relatively less of the cheap-inflating good, reports higher inflation. This is the substitution effect in action, and it shows why a fixed-basket index tends to run a little hot.

Adding Imports: The Oil Case

The two-good example above is all domestic production. The other major source of divergence is imports, and it produces the opposite tug.

Suppose this economy also consumes imported oil, and the world price of oil doubles in Year 2. Households pay the higher price at the pump, so the CPI rises, because oil is in the consumer basket. But oil is imported, not domestically produced, so it is not in GDP and therefore not in the GDP deflator. The deflator does not budge from the oil shock.

This is exactly what happened during the 1970s oil shocks: consumer-facing inflation (CPI) jumped more than the GDP deflator because a large part of the price pressure came from imported energy. So the direction of divergence depends on the source. Rising import prices push CPI above the deflator; a shift in domestic production toward slower-inflating goods pushes the deflator below CPI. Both can happen at once.

Which One Should You Use?

It depends on the question.

Use the CPI to measure the cost of living, to adjust wages, pensions, or the poverty line, and to gauge the inflation a typical household actually feels. It is published monthly and includes imports, which is why it is the number in the news.

Use the GDP deflator to measure economy-wide price changes in domestic output and to convert nominal GDP into real GDP. Because its basket updates every year, it is the cleaner measure of price changes in what a country produces, and it avoids the fixed-basket substitution bias. It is published quarterly with the GDP figures.

Neither is wrong; they answer different questions. In most years they land within a point or two of each other. It is the years they split that reveal what is happening in the economy: an import shock, a shift in the mix of what is produced, or fast substitution away from a good whose price spiked.

On the AP Exam

What to have ready:

Know the two formulas. The GDP deflator is (Nominal GDP / Real GDP) times 100. The CPI is the cost of the fixed base-year basket at current prices, divided by its cost at base-year prices, times 100.

Know the three differences cold. Fixed basket versus current basket, consumption versus domestic production, and imports included versus excluded. Most exam questions hinge on one of these three.

Predict the direction of divergence. If import prices rise, CPI rises more than the deflator. If the economy produces more of a slower-inflating good, the deflator comes in below CPI. Being able to say which one is higher, and why, is the payoff.

Practice the arithmetic. Reproduce the two-good example above until the CPI and deflator calculations are automatic, then check yourself with the CPI, GDP deflator, and inflation rate tools.

The GDP deflator and the CPI are two honest answers to two different questions. One asks what a household's basket costs; the other asks what a nation's output costs. Get the basket, the coverage, and the import treatment straight, run one clean worked example, and you will never mix them up on the exam.

Frequently asked questions

What is the difference between the CPI and the GDP deflator?

The CPI measures the price of a fixed basket of goods and services that consumers buy, including imports, using base-year quantities (a Laspeyres index). The GDP deflator measures the price of all goods a country produces domestically, excludes imports, and uses current-year quantities (a Paasche index). Those differences in basket, coverage, and weighting are why the two can report different inflation rates.

Why do the GDP deflator and CPI give different inflation rates?

They diverge for two main reasons. The CPI holds quantities fixed at base-year levels, so it overweights goods whose prices rose most (substitution bias) and tends to run slightly higher. The GDP deflator uses current quantities and excludes imports, so a spike in import prices raises the CPI but not the deflator. In a worked two-good example, the CPI showed 46.7 percent inflation while the deflator showed 40 percent for the same year.

Does the GDP deflator include imports?

No. The GDP deflator only covers goods and services produced domestically, because it is derived from GDP, which excludes imports. The CPI does include imported consumer goods, since households buy them. This is why an oil price shock, driven by imported energy, raises the CPI more than the GDP deflator, as happened during the 1970s.

How do you calculate the GDP deflator?

The GDP deflator equals nominal GDP divided by real GDP, times 100. Nominal GDP uses current-year prices and quantities; real GDP uses base-year prices with current-year quantities. For example, if nominal GDP is 560 and real GDP is 400, the deflator is (560 / 400) times 100 = 140, meaning prices rose 40 percent since the base year.

Which is better for measuring the cost of living, CPI or the GDP deflator?

The CPI is better for the cost of living because it measures the prices of goods and services consumers actually buy, including imports, and is published monthly. The GDP deflator is better for measuring price changes in a nation's total domestic output and for converting nominal GDP to real GDP. They answer different questions, so neither is universally better.

Ready to study?

EconLearn has interactive graphs, 398 practice questions, and flashcards for every AP Economics topic.

Start Learning Free

Get new study guides in your inbox

Occasional emails with new posts, study tips, and exam-season reminders. Free, no spam.

No spam. Unsubscribe anytime.

AP® is a trademark registered by the College Board, which is not affiliated with, and does not endorse, EconLearn.