Consumer Price Index (CPI) Calculator
Calculate CPI and inflation rate from a basket of goods.
Enter quantities and prices for up to three items in base and current periods.
The Consumer Price Index measures how much a fixed basket of goods and services costs over time relative to a base period. It is the most widely cited measure of consumer inflation.
The formula:
CPI = (Cost of basket in current period / Cost of basket in base period) x 100
Inflation rate = (CPI - 100) / 100 x 100% (relative to base year)
Or between two periods: inflation = (CPI_new / CPI_old - 1) x 100%
How the basket works. Statistical agencies survey households to determine what a typical consumer buys. Each item gets a weight proportional to its share of total spending. In the US CPI, housing is the largest component (~43%), followed by transportation (~16%), food (~14%), medical care (~9%), and other categories.
The Laspeyres index used here keeps quantities fixed at base-period levels. This is the standard approach and tends to slightly overstate inflation because it does not account for consumers substituting away from goods that become relatively more expensive.
What CPI misses. It does not capture quality improvements. A laptop in 2024 is vastly better than one in 2004, even if the price is similar. Hedonic adjustments try to correct for this but are imperfect. CPI also misses changes in where people shop (outlet substitution) and new goods that enter the market.
Real vs nominal values. Dividing a nominal dollar amount by (CPI/100) converts it to base-year real dollars. This is how economists compare purchasing power across time.
To adjust any past dollar figure into today’s purchasing power, multiply by the ratio of the two CPIs: adjusted value = nominal value × (CPI_current / CPI_base). A 1995 salary of $40,000 at a base-year CPI of 152.4 expressed in 2024 dollars (CPI ≈ 314) becomes 40,000 × (314 / 152.4) ≈ $82,400. This is the same calculation behind Social Security cost-of-living adjustments and government inflation-indexed bonds.
Core CPI vs headline CPI. Two flavours of the index get quoted in different contexts. Headline CPI includes everything in the basket — including food and energy, which swing month-to-month with weather, harvests, and global oil prices. Core CPI strips out food and energy to show the slower-moving underlying inflation trend. Central banks watch core CPI when setting interest rates, because the headline number can spike on temporary shocks; Social Security and similar adjustments use the headline number, because that’s what households actually pay.
Personal inflation isn’t the average. The published basket is an average household. Retirees with heavier healthcare spending or young families with heavier housing costs can experience personal inflation rates that drift noticeably from the headline number — the official figure can quietly understate the squeeze for groups whose spending mix differs from the survey’s.
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.