ECON 102 · Principles of Macroeconomics

The Consumer Price Index and Inflation

Build a price index from a shopping basket, calculate inflation step by step and learn why the consumer price index can miss the mark.

Key takeaways

  • A price index tracks the cost of a fixed basket of goods and services relative to a base period set to 100.
  • The inflation rate is the percentage change in the index from one period to the next.
  • Items that take a bigger share of the budget move the index more than minor items do.
  • A fixed basket tends to overstate cost-of-living increases because people substitute, new goods appear and quality changes.
  • In the United States the Bureau of Labor Statistics publishes the Consumer Price Index, and your own inflation may differ from it.

Two roommates, Priya and Marcus, are arguing over breakfast. Priya says everything costs more lately. Marcus says that is nonsense, because his headphones were cheaper this year and so was his data plan. Priya points at the eggs. Marcus points at the headphones.

Both are right about their own item. Neither can settle the bigger question, which is whether prices in general went up, and by how much. To answer that, you need a way to squash thousands of prices into one number. That is the job of a price index.

The idea of a basket

The consumer price index (CPI) measures how the cost of a representative set of goods and services bought by households changes over time. That set is called the market basket. It includes things like food, housing, transportation, medical care, education, recreation and clothing.

The logic is simple. Fill a cart with the same things in two different years. See what the cart costs each time. If the same cart costs more, prices have risen.

Statisticians need two ingredients. First, they need to know what households typically buy, which they learn from surveys of spending. Those spending shares act as weights, telling how much each item matters. Second, they need prices, which they collect regularly from many places that sell those items.

How a price index is built
1 Choose the basket Survey households to learn what they buy and in what amounts. 2 Collect prices Record the price of each item in each period. 3 Cost the basket Multiply each price by its fixed quantity and add up. 4 Scale to the base Divide by the base-period cost and multiply by 100. 5 Compare periods The percentage change in the index is the inflation rate. Choose the basket Survey households to learn what they buy and in what amounts. 1 Collect prices Record the price of each item in each period. 2 Cost the basket Multiply each price by its fixed quantity and add up. 3 Scale to the base Divide by the base-period cost and multiply by 100. 4 Compare periods The percentage change in the index is the inflation rate. 5

Worked example: Priya and Marcus build an index

Their invented monthly basket has three items. They keep the quantities the same every year and let the prices change.

Item Monthly quantity Price, year 1 Price, year 2 Price, year 3
Eggs (dozen) 10 $3.00 $3.60 $3.60
Bus rides 40 $2.00 $2.10 $2.31
Data plan 1 $90.00 $81.00 $81.00

Step 1: cost the basket each year. Multiply quantity by price and add.

Year 1: (10 × 3.00) + (40 × 2.00) + (1 × 90) = 30 + 80 + 90 = 200
Year 2: (10 × 3.60) + (40 × 2.10) + (1 × 81) = 36 + 84 + 81 = 201
Year 3: (10 × 3.60) + (40 × 2.31) + (1 × 81) = 36 + 92.40 + 81 = 209.40

Step 2: choose a base period and compute the index. We choose year 1.

Index = (basket cost in that year ÷ basket cost in base year) × 100
Year 1: (200 ÷ 200) × 100 = 100
Year 2: (201 ÷ 200) × 100 = 100.5
Year 3: (209.40 ÷ 200) × 100 = 104.7

Step 3: compute inflation.

Inflation, year 2 = (100.5 − 100) ÷ 100 = 0.5%
Inflation, year 3 = (104.7 − 100.5) ÷ 100.5 ≈ 4.18%

Look at year 2. Eggs jumped 20%, yet the index barely moved, because the cheaper data plan almost canceled it. Priya and Marcus were both noticing something real.

The roommates' price index
Index (year 1 = 100) 1 2 3 50 100 Basket index 100 100.5 104.7 Year Index (year 1 = 100) 1 2 3 50 100 Basket index 100 100.5 104.7 Year

Does the choice of base period matter?

The base period is only a reference point, like choosing where to put zero on a ruler. Suppose the roommates pick year 2 instead. Now divide every basket cost by 201.

Year 1: (200 ÷ 201) × 100 ≈ 99.50
Year 2: (201 ÷ 201) × 100 = 100
Year 3: (209.40 ÷ 201) × 100 ≈ 104.18

Every index number changed. The inflation rate from year 2 to year 3 did not: it is still about 4.18%. Rates of change are what carry meaning. An index of 104.18 or 104.7 means nothing until you know its base.

This also explains why you cannot compare the index levels of two cities and conclude which is more expensive. If one city's index reads 130 and another's reads 115, it only tells you that prices rose more in the first since the base period. The second city could still be far pricier. Comparing price levels between places needs a different measure built for that purpose.

One more reading tip: points and percentages are not the same. If an index goes from 200 to 204, it rose 4 points but only 2 percent. The bigger the starting number, the wider the gap between the two.

Why weights matter

Not every price change hits equally hard. The weight of an item is its share of basket spending. In year 1:

Eggs: 30 ÷ 200 = 15%
Bus rides: 80 ÷ 200 = 40%
Data plan: 90 ÷ 200 = 45%

You can get year 2's inflation from the weights and each item's price change.

Eggs:      15% × (+20%) = +3.0 points
Bus:       40% × (+5%)  = +2.0 points
Data plan: 45% × (−10%) = −4.5 points
Total                   = +0.5 points

It matches the 0.5% found earlier. This shows why housing, which takes a large share of many budgets, can move an index far more than a doubled price of a rarely bought spice.

What moved the index from year 1 to year 2 (points)
Year 1 index 100 Eggs +3 Bus rides +2 Data plan (4.50) Year 2 index 100.50 Year 1 index 100 Eggs +3 Bus rides +2 Data plan (4.50) Year 2 index 100.50

Example with made-up numbers.

Inflation, disinflation and deflation

Inflation is a rise in the general price level. Keep three related words straight.

  • Disinflation means inflation is slowing, such as from 6% to 3%. Prices still rise.
  • Deflation means the general price level is falling, so the inflation rate is negative.
  • A relative price change is one item getting dearer or cheaper compared with others. It can happen with no inflation at all.

The CPI is often reported in two forms. Headline CPI includes everything in the basket. Core CPI leaves out food and energy, whose prices swing sharply. Core is not a claim that food is unimportant. It is a filter meant to show the underlying trend.

Here is how the words play out for Priya. Say her basket index reads 100, then 106, then 109, then 107. The first step is 6% inflation. The second is 3 ÷ 106, about 2.8%, which is disinflation because prices rose more slowly. The third is −2 ÷ 109, about −1.8%, which is deflation because the index itself went down. Even after that dip, her basket still costs 7% more than at the start.

Why strip anything out of the index at all? Imagine a freeze ruins an orange harvest. Juice prices spike, then fall back when the next crop arrives. A policymaker who reacted to that spike might be chasing something that fixes itself. Looking at core inflation alongside the headline figure helps separate a passing jolt from a broad, lasting climb, although sometimes a jolt turns out to last.

Check the comparison period, too. A year-over-year rate compares a month with the same month a year earlier. A month-to-month rate compares neighbors and is often shown seasonally adjusted, meaning that regular calendar patterns have been smoothed out.

Besides the CPI, you will hear about the personal consumption expenditures (PCE) price index from the BEA. The Federal Reserve states its inflation goal in terms of that measure. It covers a somewhat broader set of spending and updates its weights differently, so it often differs a little from the CPI.

Why a fixed basket can mislead

The CPI is a good tool, but it faces hard problems.

Substitution bias. When egg prices soar, some people eat oatmeal. A basket fixed at 10 dozen eggs ignores that escape route and overstates the rise in what it costs to live equally well.

Put numbers on it. Marcus buys 10 apples and 10 oranges at $1 each, for $20. Then apples double to $2 while oranges stay at $1. The fixed basket now costs 10 × 2 + 10 × 1 = $30, a 50% rise. But suppose Marcus would be just as happy with 5 apples and 17 oranges. That costs 5 × 2 + 17 × 1 = $27, a 35% rise. He is still worse off than before, since he needs more money to be equally content. He just is not as much worse off as the fixed basket claims.

New goods. A brand-new product can make people better off, but it enters the basket only after a delay.

Quality change. If a phone costs 5% more but is much better, part of that extra money buys more phone, not pure inflation. Statisticians try to adjust, but it is difficult.

Outlet switching. Shoppers move toward cheaper stores or online sellers, which a measure may capture only gradually.

The BLS has changed its methods over the years to reduce these problems, including updating weights more often. For the substitution problem it also publishes a "chained" CPI that lets spending patterns shift. Check the BLS site for the current methods.

Four reasons a fixed basket can miss
Substitution Shoppers shift to cheaper items A frozen basket ignores the shift New goods New products widen choices They join the basket with a delay Quality A higher price may buy a better item Adjusting for that takes estimates Outlets Shoppers move to cheaper sellers Price sampling may lag behind Substitution Shoppers shift to cheaper items A frozen basket ignores the shift New goods New products widen choices They join the basket with a delay Quality A higher price may buy a better item Adjusting for that takes estimates Outlets Shoppers move to cheaper sellers Price sampling may lag behind

A common mistake: "the CPI is my inflation"

The CPI describes an average household in a covered population. You are not an average. If you drive a long way to work, fuel prices hit you harder. If you rent in a fast-growing city, your housing costs may rise far faster than the national figure.

A second mistake is adding percentage changes across years. Suppose inflation is 10% one year and 10% the next. Prices do not rise 20%. They rise 1.10 × 1.10 = 1.21, or 21%. A basket costing $200 goes to $220, and then to $242.

A third mistake is expecting a fall in the inflation rate to bring back old prices. It does not. For that you would need deflation, which carries its own troubles, explored in the costs of inflation and deflation.

Putting the index to work

Price indexes let you convert dollar amounts across time, the skill you practiced in real versus nominal. For example, if Priya earned $2,000 a month in year 1 and wants the same buying power in year 3:

2,000 × (104.7 ÷ 100) = 2,094

She needs $2,094. If her pay in year 3 is $2,060, she has received a raise of 3% in dollars and still lost ground, since 2,060 × (100 ÷ 104.7) is only about 1,968 in year 1 dollars.

You can also run the conversion backward. A $52.35 grocery bill in year 3 equals 52.35 × (100 ÷ 104.7) = $50.00 in year 1 prices.

You can build your own version of the index, too. List what you bought last month, note the quantities, and price the same list again a year later. Your result will be rough, since a single shopper's list is small and odd one-off purchases can swing it. Still, the exercise shows exactly where your money is feeling the squeeze, and it makes the official number much easier to read. When the two differ, ask which weights differ before you suspect anyone's arithmetic.

Contracts, tax brackets and some public benefits are tied to price indexes for this reason. The details change over time, so check current rules with the relevant agency.

Inflation is also one of the two goals that the central bank watches most closely, the other being jobs, which you will measure next in counting jobs.

Words to know

Consumer price index (CPI) a measure of how the cost of a representative household basket of goods and services changes over time.

Market basket the set of goods and services, in set amounts, whose cost an index tracks.

Weight an item's share of total basket spending, which sets how much it moves the index.

Inflation rate the percentage change in a price index from one period to another.

Disinflation a slowdown in the rate of inflation while prices are still rising.

Core inflation inflation measured without food and energy prices.

Substitution bias the overstatement that occurs when a fixed basket ignores shoppers switching to cheaper items.

Check yourself

  1. A basket costs $400 in the base year and $430 the next year. What is the new index value and the inflation rate?
  2. An index rises from 125 to 130. What is the inflation rate?
  3. An item is 30% of a basket and its price rises 10% while all other prices stay the same. How much does the index rise in percentage terms?
  4. Inflation is 5% in year one and 4% in year two. By what percent have prices risen over both years?
  5. Why does a fixed basket tend to overstate increases in the cost of living?
  6. Why might your personal inflation rate differ from the CPI?
Show the answers
  1. The index is (430 ÷ 400) × 100 = 107.5, so inflation is 7.5%.
  2. Inflation is (130 − 125) ÷ 125 = 4%.
  3. The index rises 30% × 10% = 3%.
  4. Prices rose 1.05 × 1.04 = 1.092, which is 9.2%.
  5. It ignores that people shift toward items whose prices rose less, which lowers the cost of staying about equally well off.
  6. Your spending mix and local prices can differ from those of the average household used to set the weights and collect prices.

A free self-study program written for 4Economics with AI writing tools and not reviewed line by line by a person. It is not an accredited degree and awards no credit. Check anything you rely on against a textbook or primary source. Report an error.

In this unit: Measuring the economy

  1. The Big Picture: What Macroeconomics StudiesMeet macroeconomics, the study of the whole economy, and the questions about output, jobs, prices and policy that drive this course.11 min
  2. Gross Domestic Product and the Circular FlowSee how money loops between households and firms, and how GDP can be measured by spending, by income or by value added.11 min
  3. What GDP Counts, Misses and Gets WrongLearn what GDP leaves out, from unpaid work to pollution and inequality, and how to use it wisely as a measure of well-being.10 min
  4. Real Versus Nominal: Removing the Price IllusionSeparate real changes from price changes using real GDP, the GDP deflator and inflation-adjusted wages and interest rates.11 min
  5. The Consumer Price Index and InflationBuild a price index from a shopping basket, calculate inflation step by step and learn why the consumer price index can miss the mark.11 min
  6. Counting Jobs: Unemployment and Labor Force ParticipationSort people into employed, unemployed and out of the labor force, then calculate the key job market rates and see what each one hides.11 min
  7. Types of Unemployment and the Natural RateTell apart frictional, structural and cyclical unemployment, and learn why a healthy economy still has a natural rate of joblessness.11 min

In the news