How to adjust for inflation with CPI data
Convert old dollars into today's with one formula, nominal times CPI now over CPI then, and see it run in SQL on median new-house prices since 1963.
Riley Hilliard10 min read
dataeconomicstutorial
To adjust a price for inflation, multiply it by the CPI of the year you want to express it in, then divide by the CPI of the year it came from: real = nominal × CPI_target / CPI_then. The median new house sold in 1963 averaged $18,050. The CPI-U averaged 30.625 that year and 313.689 in 2024, so the same house cost $184,884 in 2024 dollars.
Why does the formula work?
A price index is a ratio against a base. When the CPI goes from 30.625 to 313.689, the price of the average basket of goods rose by a factor of 313.689 / 30.625, about 10.24, or 924.3 percent. A dollar in 1963 and $10.24 in 2024 buy the same basket.
So converting a 1963 amount into 2024 dollars means multiplying it by 10.24. Written with the index values instead of the ratio, that is the formula in the first paragraph. The same formula goes backward: to see what a 2024 price would have been in 1963 money, swap the two index values.
Nothing in the formula depends on what the index equals in absolute terms. Only the ratio of two index values matters, which is why the base period (more on that below) doesn’t change the answer.
Which CPI series should you use?
For almost every personal and business question, use the Consumer Price Index for All Urban Consumers (CPI-U), all items, U.S. city average. BLS says the CPI-U covers over 90 percent of the U.S. population. Its own inflation calculator uses this series, in its not seasonally adjusted form.
The series I used is CUUR0000SA0 in BLS’s naming: not seasonally adjusted, 1982-84 = 100. In OpenData’s bls/cpi-u dataset the same rows appear as item_name = 'All items', area_name = 'U.S. city average' and seasonal_text = 'Not Seasonally Adjusted'. In OpenData, the raw view bls/cpi-u:all carries the series ID. CUUR0000SA0 there averages 30.625 for 1963 and 313.689 for 2024, the values used below.
BLS recommends unadjusted indexes when you adjust dollar amounts over time. Its questions and answers page explains that seasonally adjusted figures can be revised for up to five years after release, while the CPI-U and CPI-W series are final when issued.
The two versions differ a little in any given month. In the OpenData data for September 2026 the unadjusted index is 336.940 and the seasonally adjusted one is 336.298. For October 2026 they are 337.511 and 337.476. FRED’s CPIAUCSL, which OpenData also carries as fred/cpi, is the seasonally adjusted series, so it will give slightly different answers.
What does the calculation look like on real data?
I wanted a nominal series that people argue about, so I took FRED’s median sales price of new houses sold (MSPUS), which OpenData carries as fred/median-home-price. It is quarterly and covers new construction only, not existing homes. I averaged the four quarters of each year and converted each year to 2024 dollars. This is the query, run through OpenData’s query_sql on 2026-11-19:
WITH cpi AS (
SELECT year(date) AS y, avg(cpi_value) AS cpi
FROM "bls/cpi-u"
WHERE item_name = 'All items' AND area_name = 'U.S. city average'
AND seasonal_text = 'Not Seasonally Adjusted'
GROUP BY 1 HAVING count(*) = 12
), price AS (
SELECT year(date) AS y, avg(median_home_price) AS nominal
FROM "fred/median-home-price"
GROUP BY 1 HAVING count(*) = 4
), target AS (SELECT cpi AS t FROM cpi WHERE y = 2024)
SELECT price.y AS year,
round(price.nominal) AS nominal,
round(cpi.cpi, 3) AS cpi,
round(price.nominal * target.t / cpi.cpi) AS real_2024
FROM price JOIN cpi USING (y) CROSS JOIN target
ORDER BY year
The HAVING count(*) clauses keep only complete years. That matters here: the CPI data has no October 2025 reading, because BLS could not collect that month’s survey data during a lapse in appropriations. A 2025 average would silently be computed from eleven months, so the query drops 2025, and 2024 is the last full year for both series.
It returned 62 rows, 1963 through 2024. Six of them:
| Year | Nominal price | CPI-U annual average | In 2024 dollars |
|---|---|---|---|
| 1963 | $18,050 | 30.625 | $184,884 |
| 1980 | $64,750 | 82.408 | $246,472 |
| 2005 | $236,550 | 195.292 | $379,960 |
| 2011 | $224,900 | 224.939 | $313,634 |
| 2022 | $432,950 | 292.655 | $464,067 |
| 2024 | $418,975 | 313.689 | $418,975 |
Between 1963 and 2024 the published price multiplied by 23.2, from $18,050 to $418,975. The CPI multiplied by 10.2. After removing that, the price still rose by a factor of 2.27, from $184,884 to $418,975. That is the figure to quote if the question is how much more of everything else you give up to buy the median new house.
The inflation-adjusted line also shows moves the nominal one hides. In 2024 dollars the price peaked in 2022 at $464,067, and the 2024 value is 9.7 percent lower. As published, the 2022 to 2024 drop is 3.2 percent. From 2005 to 2011 the real price fell 17.5 percent, from $379,960 to $313,634, while the published price fell from $236,550 to $224,900.
If you’d rather check the arithmetic outside a database, here is the 1963 row in Python, using the CPI values from the query:
# CPI-U annual averages, 1982-84=100 (BLS, not seasonally adjusted)
cpi = {1963: 30.625, 2024: 313.689}
nominal_1963 = 18050 # median new-house price, 1963 average
real = nominal_1963 * cpi[2024] / cpi[1963]
print(f"${real:,.0f} in 2024 dollars")
print(f"prices rose {cpi[2024] / cpi[1963] - 1:.1%}")
It prints $184,884 in 2024 dollars and prices rose 924.3%. The spreadsheet version is the same multiplication and division: put the target CPI in a fixed cell, the CPI for each row beside its amount, and fill a formula down the column that multiplies the amount by the fixed cell and divides by the row’s CPI. Lock the target cell with $, or the reference will drift as you fill down.
Should you use a monthly or an annual average?
Match the index to how your nominal number was measured. A price recorded for one month pairs with that month’s CPI. A yearly total or a yearly average pairs with the annual average of the twelve monthly values.
My price series is quarterly values averaged into years, so I averaged the CPI over the same twelve months. If I had matched an annual price to the CPI of a single month, say December, the result would depend on where in the year that month falls.
For the target period, it depends on the question. If you want a figure that stays correct in “today’s dollars” you need the latest monthly value, and it will change each month. If you want a stable number to put in a report, convert to a complete past year and say which one. I used 2024 for that reason.
How do you choose the base year?
Pick the year your reader already thinks in. The conversion target doesn’t change the shape of any series. Every real value is the nominal value times a constant, so a different target year moves the whole line up or down together and leaves every percentage change between years alone.
That makes the choice a communication problem. “2024 dollars” is easy to picture, and the latest full year is the usual choice. BLS publishes the CPI itself with a base of 1982-84 = 100, set so that the average over those 36 months is 100, and that base is just a labeling convention. It has no special status as a target.
Two habits keep this honest. Always name the year in the chart title or axis (“in 2024 dollars”), and when you compare several series, convert all of them to the same target year before you do anything else.
Should you use CPI-U, C-CPI-U or PCE?
All three are inflation measures built from consumer prices, and they differ in how they handle substitution and what they cover.
- CPI-U is the standard. BLS’s own inflation calculator uses it, and it is final when issued, so numbers you compute today won’t shift later.
- C-CPI-U, the chained CPI, uses the same population as the CPI-U but also allows for substitution across item categories, which some people consider a closer approximation to a cost-of-living index. BLS publishes a preliminary value and revises it three times quarterly, so it isn’t final until then. Use it if you are following a specific policy that references it.
- PCE price index comes from the Bureau of Economic Analysis, not BLS, and is released monthly with personal income and outlays. BEA’s CPI-PCE comparison lists three differences: PCE uses a Fisher-Ideal formula where the CPI uses a modified Laspeyres one, the two weight items differently, and PCE covers spending by and on behalf of the personal sector, including nonprofits that serve households, while the CPI covers only households’ out-of-pocket spending.
For adjusting a price or a salary, the CPI-U is the default because anyone can reproduce it. Switch only when a contract, a statute or a comparison with Federal Reserve numbers says so.
Should you use regional or category CPI?
Use a regional or category index when the question is about one place or one kind of spending. BLS publishes the CPI-U for regions, divisions and some metro areas, plus more than 200 item categories in eight major groups, such as food and housing.
Local indexes have smaller samples and are more volatile, and BLS says to prefer national or regional ones for escalation. Adjusting a Denver rent with the national all-items index answers one question (what did a dollar buy on average) and adjusting it with a housing index answers another (how did housing costs move). Pick the one that matches the claim you’re making and say which you used.
Is CPI my own inflation rate?
No. BLS states that the CPI does not necessarily measure your own experience with price change, since it reflects the spending of an average urban household. If most of your budget goes to something that rose faster than the average basket, your inflation was higher than the index says, and the reverse is also true.
Two other limits apply to the example in this post. The CPI says nothing about whether a 2024 house is the same product as a 1963 house. The median new house is a different house each year, and this series doesn’t record how it changed. And a median is one point in a distribution; converting it to real dollars doesn’t tell you what happened to the cheapest or the most expensive homes.
For an individual decision, redo the calculation with the categories you buy.
Can an assistant run this for you?
I didn’t download either series: Claude found both through OpenData’s MCP server and ran the query above. Our post on connecting Claude to public data covers the setup. OpenChart is an Apache-2.0 library that draws a chart from a JSON spec, and it drew Fig. 1 at build time on this site. OpenData is open core: its ingestion and query library is Apache-2.0, and the hosted service and MCP server used here are not.
If you’d rather use neither, everything in this post reproduces from the public BLS and FRED series named above.
Data and dates
Prices are FRED MSPUS, queried through OpenData on 2026-11-19; the series’ latest quarter in that dataset begins 2026-07-01. The CPI is BLS CPI-U all items, U.S. city average, not seasonally adjusted, 1982-84 = 100, with the latest month in the dataset being October 2026. Only complete calendar years are used, which is why the series ends in 2024.