Consumer Price Index (CPI) Explained: Market Basket, Formula, Biases and Core CPI
Jude Wallis
Founder of EconLearn · 2nd place internationally at the Economics Olympiad (econolympiad.org)
The consumer price index (CPI) is a price index that compares what a fixed market basket of goods and services bought by a typical urban household costs today with what it cost in a base period. The base period is set equal to 100, so a CPI of 120 means the basket costs 20 percent more than it did then. The percentage change in the CPI from one year to the next is the inflation rate.
The CPI measures how much more money a household needs to buy the same things it bought before. It tracks the prices households pay for food, rent, transportation, medical care, clothing and recreation, and it leaves out factory machines, government purchases and exports. That focus on consumers makes it the standard measure of the cost of living. For extra practice with a different three-year basket, work through the CPI worked example with real wages.
The market basket
The market basket is a list of goods and services in fixed quantities, chosen to represent what a typical household buys over a period. Statistical agencies build it from surveys of household spending. Once the quantities are set, they stay the same in every year the index is computed. Only the prices change.
Holding quantities fixed is the whole point. If the quantities moved too, a rise in the basket's cost could come from people buying more stuff instead of from higher prices.
The base period and why it equals 100
The base year, or base period, is the reference point. In that year, the basket's current cost and its base-year cost are the same number, so their ratio is 1 and the index is 1 x 100 = 100. Every other year is read against that benchmark. A CPI of 135 means prices are 35 percent above the base period, and a CPI of 96 means they are 4 percent below it.
The choice of base year changes every index level, but never the inflation rate between two years, as the example below shows.
CPI formula
- CPI = (cost of the market basket in the current year / cost of the same basket in the base year) x 100
- Inflation rate = ((CPI this year - CPI last year) / CPI last year) x 100
The first formula turns dollar costs into an index number. The second turns two index numbers into the inflation rate. Run either one with your own numbers in the CPI calculator and the inflation rate calculator.
Worked example: a three-good basket over two years
A hypothetical household buys three things. Year 1 is the base year.
| Good | Quantity in basket | Year 1 price | Year 2 price |
|---|---|---|---|
| Bags of rice | 5 | $6.00 | $7.00 |
| Monthly bus passes | 2 | $50.00 | $55.00 |
| Concert tickets | 4 | $30.00 | $31.25 |
Step 1: price the basket in the base year. Multiply each quantity by its Year 1 price and add.
- Rice: 5 x $6.00 = $30.00
- Bus passes: 2 x $50.00 = $100.00
- Concert tickets: 4 x $30.00 = $120.00
- Total: 30 + 100 + 120 = $250.00
Step 2: price the same basket in Year 2. Keep the quantities and change only the prices.
- Rice: 5 x $7.00 = $35.00
- Bus passes: 2 x $55.00 = $110.00
- Concert tickets: 4 x $31.25 = $125.00
- Total: 35 + 110 + 125 = $270.00
Step 3: compute the CPI for each year.
- Year 1: (250 / 250) x 100 = 100
- Year 2: (270 / 250) x 100 = 1.08 x 100 = 108
Step 4: compute the inflation rate.
- (108 - 100) / 100 x 100 = 8 percent
The basket costs $20 more, and 20 / 250 = 0.08 confirms the same 8 percent.
Why the answer is a weighted average
Each good's price rose by a different amount. Rice rose (7 - 6) / 6 = 16.7 percent, bus passes rose (55 - 50) / 50 = 10 percent, and concert tickets rose (31.25 - 30) / 30 = 4.2 percent. A simple average of those three numbers would be about 10.3 percent. The CPI instead weights each price change by the good's share of base-year spending.
| Good | Share of base-year spending | Price change | Share x change |
|---|---|---|---|
| Rice | 30 / 250 = 12% | 16.7% | 2.0 points |
| Bus passes | 100 / 250 = 40% | 10.0% | 4.0 points |
| Concert tickets | 120 / 250 = 48% | 4.2% | 2.0 points |
| Total | 100% | 8.0 points |
Rice had the biggest price jump but the smallest weight, so it added only 2 points.
Changing the base year does not change inflation
Suppose the agency made Year 2 the base instead. Year 2's CPI becomes (270 / 270) x 100 = 100, and Year 1's becomes (250 / 270) x 100 = about 92.6. Inflation is (100 - 92.6) / 92.6 x 100 = about 8.0 percent, the same answer. The base year is a choice of reference point, not a change in what prices did.
Real vs nominal using the CPI
A nominal value is measured in the dollars of its own year. A real value is adjusted for the price level, so you can compare purchasing power across years. To express a nominal value in base-year dollars:
- Real value = (nominal value / CPI) x 100
Continue the example. The household earns $540 a month from part-time work in Year 1 and $567 a month in Year 2.
1. Nominal raise: (567 - 540) / 540 x 100 = 27 / 540 x 100 = 5 percent.
2. Real earnings in Year 2: (567 / 108) x 100 = 5.25 x 100 = $525 in Year 1 dollars.
3. Real change: (525 - 540) / 540 x 100 = -15 / 540 x 100 = about -2.8 percent.
The paycheck grew 5 percent, but prices grew 8 percent, so the household can buy less than before. To keep purchasing power the same, earnings would have had to rise to 540 x 1.08 = $583.20. The real wage calculator and the cost-of-living adjustment calculator run both steps. For real GDP and real interest rates, see the real vs nominal guide.
Biases in the CPI
Because the basket is fixed, the CPI tends to overstate how much the true cost of living rises. Textbooks name three sources.
Substitution bias
When one good gets relatively expensive, households buy less of it and more of something cheaper. In the example, rice rose 16.7 percent while the other prices rose less. A real household might buy 4 bags of rice and switch the money for the fifth to pasta. The fixed basket still buys 5 bags, so it charges the household for a choice the household no longer makes.
Quality change bias
If a bus pass now covers more routes at the same price, riders get more for their money, which is effectively a price cut. If a better product costs more, part of the higher price pays for quality, yet an index that tracks only sticker prices can count the whole increase as inflation.
New goods bias
New products enter the basket only after a delay, often after their price has already fallen from launch levels. Households gain from the new choices before the index records them.
Agencies correct for some of this by updating weights and adjusting for quality, but a fixed-basket index still leans toward overstating inflation.
CPI vs GDP deflator
The CPI prices a fixed basket of consumer goods, including imports, while the GDP deflator prices all final goods and services produced at home, with a basket that changes each year along with output. That is why a jump in import prices raises the CPI but not the deflator, and the GDP deflator vs CPI guide computes both from one data set.
Core CPI
Core CPI is the consumer price index with food and energy prices removed. Those two categories swing sharply with weather, harvests and fuel supply, and the swings often reverse. Removing them gives a smoother series that shows the underlying trend. Headline CPI still measures the household's full cost of living; core CPI is a tool for reading the trend. The glossary entry for core inflation gives the short definition.
In the example basket, rice is the only food item and nothing is energy, so drop rice:
- Year 1 core basket: 100 + 120 = $220
- Year 2 core basket: 110 + 125 = $235
- Core index for Year 2: (235 / 220) x 100 = about 106.8
- Core inflation: about 6.8 percent, compared with 8 percent headline inflation
The gap says the food price rose faster than everything else. The core inflation calculator repeats this with any index values, and the core inflation vs inflation comparison sets the two measures side by side. Core CPI goes beyond what AP Macro topic 2.4 asks for.
How the CPI shows up on the AP exam
The CPI belongs to AP Macroeconomics topic 2.4, Price Indices and Inflation, and the topic 2.4 page has a summary. Questions usually ask you to:
- Compute a CPI from a priced basket, then an inflation rate between two index values.
- Convert a nominal value into real terms and say whether purchasing power rose or fell.
- Explain why the CPI may overstate the rise in the cost of living.
Common mistakes:
- Treating a CPI level as an inflation rate. A CPI of 108 says prices are 8 percent above the base year. It equals this year's inflation only when last year was the base year.
- Updating the quantities. Only prices change. The basket stays fixed.
- Dividing by the wrong number. The CPI divides by the base-year cost. The inflation rate divides by the earlier year's CPI.
- Multiplying when you should divide. Real value = nominal value / CPI x 100.
The CPI measures how much prices rose, not why. For causes, read what causes inflation, and for a falling price level, read deflation explained. For the full picture of inflation, read inflation explained. The unemployment and inflation module has practice questions.
Frequently asked questions
What is the consumer price index?
The consumer price index (CPI) is a price index that measures the cost of a fixed market basket of goods and services bought by a typical urban household, compared with the cost of the same basket in a base period set equal to 100. A CPI of 125 means the basket costs 25 percent more than it did in the base period.
How do you calculate CPI?
CPI equals the cost of the market basket in the current year divided by the cost of the same basket in the base year, times 100. If a basket costs $250 in the base year and $270 this year, the CPI is 270 / 250 x 100 = 108, so prices are 8 percent above the base year.
What is the difference between CPI and the inflation rate?
The CPI is a level: an index number showing how the cost of a fixed basket compares with a base period. The inflation rate is the percentage change in the CPI between two periods. A CPI that moves from 120 to 126 rose 6 index points, but the inflation rate is 6 / 120 x 100 = 5 percent.
What is core CPI?
Core CPI is the consumer price index with food and energy prices removed, because those prices swing sharply and often reverse within months. Core CPI gives a smoother reading of the underlying trend in prices, while headline CPI, which includes food and energy, still measures the full cost of living that households face.
Why does the CPI overstate inflation?
The CPI prices a fixed basket, so it misses three effects textbooks name: substitution bias (households switch toward goods whose prices rose less), quality change bias (better products are partly counted as price increases) and new goods bias (new products enter the basket late). Each bias makes measured CPI inflation run a little above the true rise in the cost of living.
Why is the CPI equal to 100 in the base year?
In the base year, the current cost of the CPI basket and its base-year cost are the same number, so their ratio is 1 and the CPI equals 1 x 100 = 100. Every other year is read against that benchmark, so a CPI of 92 means the basket costs 8 percent less than in the base year.
Use what you just learned
Turn this topic into a class activity
Build a short prediction activity with one student link, or browse the free interactive graphs you can place in a class site or LMS.
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. Read our privacy policy.
Teaching this topic? Every interactive graph on this site can be assigned as a graded activity with scores in your gradebook, and the classroom tools are free to pilot. No student accounts are needed for the graphs themselves.