How to Calculate CPI: Formula, Step-by-Step Examples, and the Inflation Rate
The Consumer Price Index is the world's most-watched inflation gauge. Learn the core formula, work through a three-item market basket, and turn CPI figures into an inflation rate or today's-dollar equivalent.

What the Consumer Price Index measures
The Consumer Price Index (CPI) is one of the most widely watched economic indicators in the world. Published monthly by agencies such as the U.S. Bureau of Labor Statistics (BLS), it tracks the average change over time in the prices urban consumers pay for a representative “market basket” of everyday goods and services — ranging from groceries and gasoline to housing and medical care.
Understanding how to calculate the CPI — and how to use it to derive the inflation rate — helps investors, businesses and households measure changes in purchasing power and the true cost of living.
CPI turns thousands of individual prices into one readable measure of what it costs to live.
The core CPI formula
To calculate the Consumer Price Index for a given period, economists compare the current cost of a fixed basket of goods and services to the cost of that exact same basket during a designated base period, where the CPI is set to 100.
CPI = (Cost of Market Basket in Current Period ÷ Cost of Market Basket in Base Period) × 100
- Market basket: a standardized list of items and quantities reflecting typical consumer spending habits.
- Base period: the reference year or timeframe against which all other periods are measured. Because the base period is divided by itself and multiplied by 100, the base-period CPI is always 100.
Step-by-step example: calculating CPI
Imagine a simplified household market basket consisting of three items purchased each month: 10 loaves of bread, 5 gallons of milk, and 2 movie tickets. Suppose 2024 is chosen as the base year.
| Item | Fixed quantity | 2024 price (base year) | 2024 total cost | 2026 price (current year) | 2026 total cost |
|---|---|---|---|---|---|
| Bread | 10 loaves | $3.00 | $30.00 | $3.60 | $36.00 |
| Milk | 5 gallons | $4.00 | $20.00 | $4.40 | $22.00 |
| Movie tickets | 2 tickets | $15.00 | $30.00 | $18.00 | $36.00 |
| Total basket cost | — | — | $80.00 | — | $94.00 |
Step 1 — Base-period CPI (2024): ($80.00 ÷ $80.00) × 100 = 100
Step 2 — Current-period CPI (2026): ($94.00 ÷ $80.00) × 100 = 1.175 × 100 = 117.5
A CPI of 117.5 indicates that the overall price level of this consumer basket has increased by 17.5% since the 2024 base year.
How to calculate the inflation rate using CPI
Once you have CPI figures for two different timeframes, you can calculate the inflation rate — the percentage change in the price level from one period to the next.
Inflation rate = ((CPI current − CPI previous) ÷ CPI previous) × 100
- Subtract the previous CPI from the current CPI: 117.5 − 110.0 = 7.5
- Divide by the previous CPI: 7.5 ÷ 110.0 = 0.06818
- Multiply by 100 to convert to a percentage: 0.06818 × 100 = 6.82%
Practical example
Suppose the CPI was 110.0 in 2025 and rose to 117.5 in 2026. The annual inflation rate between 2025 and 2026 is 6.82%.
If the result is negative, the economy is experiencing deflation, meaning average prices are falling.
Adjusting dollar values for inflation
CPI is also used to compare the purchasing power of money across different years. To convert a past dollar amount into today's equivalent value:
Value in today's dollars = Past dollar amount × (CPI current ÷ CPI past)
Worked example: a $50,000 salary
If a salary was $50,000 when the CPI was 100, and the CPI later rises to 117.5, that salary would need to reach $58,750 ($50,000 × 117.5 ÷ 100) simply to maintain the exact same purchasing power.
Sources and further reading
This explainer was compiled from public methodology and reference material.
- U.S. Bureau of Labor Statistics (BLS) — CPI methodology guides.
- CORE Econ — Macroeconomics.
- Pearson — Statistics reference materials.
For informational purposes only. This article is not financial advice.
Comments (0)
Loading comments…


