measurement

How Inflation Is Calculated: CPI, the Basket, and the Math

By Hugo Miggels · Published July 1, 2026 · Updated July 7, 2026

The inflation rate is one number describing hundreds of millions of prices, and it exists because several hundred government data collectors spend every month recording what things actually cost: a specific box of cereal at a specific grocery store in Denver, a men’s haircut in Atlanta, the rent on a two-bedroom apartment in Chicago. The Bureau of Labor Statistics turns roughly 80,000 of these price quotes into the Consumer Price Index, and the CPI’s rate of change becomes the figure in every headline, every Social Security adjustment, and every “what is $100 from 1990 worth today” calculation, including the ones on this site.

Here is the full pipeline, from a price tag to the inflation rate, including the genuinely hard parts the BLS has to solve along the way.

Step 1: Collect the prices

BLS field staff, known inside the agency as economic assistants, visit and call thousands of stores, service providers, medical offices, and websites each month, always pricing the same precisely specified item at the same outlet: not “bread” but a particular brand, loaf size, and variety. That specificity is the whole game. If the item priced this month differs from last month’s, you can no longer tell whether the price moved or the product did.

Rents get their own survey, with tens of thousands of rental units tracked over time, because housing is the largest thing American households buy and, as we’ll see, the trickiest to measure.

Step 2: Decide what counts, and how much (the basket)

Not all prices matter equally. A doubling in the price of gasoline changes your life; a doubling in the price of shoelaces does not. So the CPI weights every category by its share of actual household spending, measured by the Consumer Expenditure Surveys, a separate BLS program that asks tens of thousands of households to log what they buy.

The resulting “market basket” spans eight major groups: food and beverages, housing, apparel, transportation, medical care, recreation, education and communication, and other goods and services. The relative importance figures shift a little every year, but the shape is stable: shelter alone is roughly a third of the index, which is why rent trends dominate the inflation number in most years. Since 2023 the weights have been updated annually (previously every two years), so the basket tracks changing habits (more streaming, less cable) with only a short lag.

Step 3: Turn prices into an index

Each item’s current price is compared with its price in a base period, and those price relatives are averaged using the weights. The published CPI-U sets its base period, 1982–84, equal to 100. The 2025 annual average of 321.9 therefore reads directly as: prices have roughly tripled and a quarter since the early 1980s.

Two levels of averaging happen, and the distinction matters:

A separate variant, the Chained CPI (C-CPI-U), does allow substitution across categories and consequently runs a bit lower over time, which is exactly why Congress chose it for indexing federal tax brackets starting in 2018: slower-growing brackets raise slightly more revenue.

Step 4: Turn the index into “the inflation rate”

The inflation rate is nothing more than the percentage change in the index between two dates. But which two dates is a detail that trips people up, because three different conventions are in daily use:

The dollar-conversion math is the same ratio applied to an amount. The CPI averaged 130.7 in 1990 and 321.9 in 2025, so $100 in 1990 spent like 100 × (321.9 ÷ 130.7) ≈ $246 in 2025. You can run any pair of years through the calculator yourself, and our methodology page documents every formula this site uses, including the geometric-mean annual rate.

The hard problems

Everything above is bookkeeping. The BLS’s real methodological work goes into three problems that have no perfect answer.

Quality change and “hedonics”

If this year’s $800 phone is meaningfully better than last year’s $800 phone, the price of computing power fell even though the sticker didn’t move. For goods that improve rapidly, such as electronics, appliances, and some apparel, the BLS uses hedonic regression, which statistically prices out each feature (screen size, memory, energy efficiency) so that only true price change enters the index. Critics argue hedonics can overstate or understate the adjustment; either way, ignoring quality change entirely would clearly overstate inflation, and this is the least-bad tool anyone has found.

Housing you own

A homeowner’s “cost of living” in their house isn’t the house’s market price; that’s an asset, like a stock. What the CPI measures instead is owners’ equivalent rent (OER): the amount the home would rent for, estimated from actual rents of comparable rental units. OER is the single largest component of the CPI, around a quarter of the whole index, and because leases renew slowly it moves with a lag of roughly a year behind advertised market rents. That lag is why official shelter inflation kept climbing through 2023 after the pandemic rent spike had already cooled in listings data.

Vanishing products

Items get discontinued mid-sample constantly. When a priced item disappears, the BLS substitutes the closest replacement and splices the series, adjusting for any quality difference. New categories of spending (smartphones, streaming) enter through the weight updates.

Seasonal adjustment: which number is which

Prices have rhythms: gas rises in summer, clothing goes on sale in January. The BLS strips these repeating patterns from the monthly figures using its X-13ARIMA-SEATS model so a normal August gas increase doesn’t masquerade as fresh inflation. The 12-month headline rate, by contrast, is not seasonally adjusted, since comparing August to August cancels the season automatically. Contracts, TIPS, and I Bonds all use the unadjusted series, and so does everything on this site.

One CPI, several flavors

The CPI is also not the only inflation measure in town: the Federal Reserve actually targets a different index. How the two differ, and why they disagree by a few tenths of a point in most years, is the subject of CPI vs. PCE.

What the CPI is not

Two honest caveats keep the number in perspective. The CPI is a national urban average: your personal inflation rate depends on whether you rent or own, drive or don’t, and where you live. And over very long spans it is an approximation by construction: methods, baskets, and collection have all changed since the series began in 1913, so a century-long conversion is faithful to the official record without making a 1913 basket of goods truly comparable to a modern one. For exactly what this site does with the data, and where it can mislead, see the methodology.