Consumer Price Index (CPI) Calculator
Enter the cost of the same market basket in two periods to calculate CPI and inflation rate.
CPI = (Current Basket Cost / Base Basket Cost) × Base Index
Inflation Rate (%) = ((Current CPI − Previous CPI) / Previous CPI) × 100
What is the Consumer Price Index?
The Consumer Price Index (CPI) is one of the most common measures of inflation. It tracks how the price of a fixed basket of goods and services changes over time. That basket usually includes items like food, housing, transportation, healthcare, and energy.
In practical terms, CPI tells you whether everyday life is getting more expensive, cheaper, or staying about the same. When CPI rises, purchasing power falls: the same amount of money buys fewer goods and services.
Core formula for CPI calculation
1) CPI level
To calculate CPI, compare the cost of the same basket in the current period with the cost in a base period:
- CPI = (Cost of basket in current year / Cost of basket in base year) × 100 (or another base index value)
- The base year is often set to 100
- If CPI is 120, prices are 20% higher than in the base year
2) Inflation rate between two periods
Once you have CPI values for two periods, inflation is:
- Inflation Rate (%) = ((CPIcurrent − CPIprevious) / CPIprevious) × 100
Example: if CPI rises from 115 to 120, inflation is about 4.35%.
How to use the calculator above
- Enter the base-year basket cost (the benchmark period).
- Enter the current-year basket cost for the exact same basket.
- Use 100 as the base index unless your class or report uses another value.
- Optionally enter a previous CPI value to calculate inflation from CPI series data.
- Click Calculate CPI to see CPI, price change, and inflation interpretation.
Worked example
Suppose your base-year basket costs $200 and the same basket now costs $230:
- CPI = (230 / 200) × 100 = 115
- Prices are 15% higher than the base year
If previous CPI was 111.5 and current CPI is 115:
- Inflation = ((115 − 111.5) / 111.5) × 100 = 3.14%
Why CPI matters
CPI is used by governments, central banks, businesses, and households:
- Monetary policy: Central banks monitor CPI to guide interest-rate decisions.
- Wage and pension adjustments: Contracts may include cost-of-living adjustments linked to CPI.
- Budget planning: Families can estimate future expenses by tracking inflation trends.
- Investment decisions: Real returns should be evaluated after inflation.
Common mistakes in CPI calculation
- Comparing different baskets across periods instead of the same basket.
- Mixing monthly and annual values without standardization.
- Using nominal price changes without considering weights in the basket.
- Confusing CPI level (index number) with inflation rate (percentage change).
Limitations of CPI
CPI is useful but not perfect. It may not reflect every household equally, because spending habits differ by age, income, and region. It can also lag behind rapid changes in consumer behavior and product quality.
Even with these limitations, CPI remains one of the most practical and widely accepted indicators for measuring inflation and tracking changes in purchasing power over time.
Quick takeaway
If you remember one thing, remember this: CPI is fundamentally a ratio of basket costs over time. Start with a clean base year, keep your basket consistent, and you can measure inflation clearly and reliably.