Technical writing

BLS CPI-U: The Inflation Dataset That Moves Markets and Sets Policy

· 14 min read· AI Analytics
Federal DataBLSInflationEconomics

On the second or third Tuesday of each month, the Bureau of Labor Statistics releases a single number that stops trading desks, triggers automated news alerts, and reshapes Federal Reserve expectations in minutes. The Consumer Price Index for All Urban Consumers — CPI-U — is the United States' primary official measure of inflation. It is also one of the longest continuous economic time series the federal government produces: monthly price data running back to January 1913, covering a defined basket of goods and services purchased by households in urban areas, which the BLS defines as 87 percent of the US population. Understanding what that number measures, how it is constructed, and where it breaks down is prerequisite knowledge for anyone working with US economic data.

What the CPI-U measures and who it covers

The CPI-U tracks price changes over time for a fixed market basket of consumer goods and services. The basket is not a theoretical construct — it is derived from the Consumer Expenditure Survey (CE Survey), a continuous household survey conducted by the Census Bureau on behalf of BLS. The CE Survey records what households actually buy: every grocery receipt, utility bill, insurance premium, and college tuition payment. BLS aggregates those spending patterns into expenditure weights, which determine how much each category contributes to the overall index.

The weights are updated every two years using two years of CE Survey data. Before 2002, updates were infrequent — sometimes a decade apart — which meant the basket could drift substantially from actual consumer behavior. The two-year update cycle introduced after 2002 keeps the weights more current, though a two-year lag still exists between when households change spending and when those changes are reflected in the index. BLS announced a shift to annual weight updates beginning in 2023, using a geometric-mean approach for upper-level aggregation, a methodological change that modestly affects index levels.

The “urban consumers” scope means the CPI-U represents people living in urbanized areas and urban clusters of 2,500 or more people, including wage earners, clerical workers, technical workers, professional workers, self-employed workers, retirees, and the unemployed. Rural households are excluded. A companion index, the CPI-W (wage earners and clerical workers), covers roughly 32 percent of the population and is used for Social Security cost-of-living adjustments; the CPI-U is the broader and more widely cited series.

Expenditure weights: what is in the basket

The CPI-U basket is organized into eight major expenditure categories, each with a weight reflecting its share of the average urban consumer's spending. As of the 2021–2022 CE Survey weights, the approximate distribution is:

  • Housing (shelter): ~36 percent. The largest single component by far. Includes rent of primary residence, owners' equivalent rent (OER), and lodging away from home. Does not include the purchase price of a house — only the housing services that the structure provides.
  • Food: ~14 percent. Split between food at home (~8.5 percent) and food away from home (~5.5 percent). Groceries, restaurant meals, and takeout each have their own sub-indexes with separate price collection procedures.
  • Transportation: ~15 percent. Includes new vehicles, used vehicles, motor fuel, auto insurance, and public transit. Used vehicle prices drove significant CPI volatility in 2021 when supply-chain disruptions hit auto production.
  • Medical care: ~7 percent. Professional services, hospital care, and prescription drugs. Note that medical spending captured here is out-of-pocket expenditure; employer-paid insurance premiums and Medicare spending are not in the CPI-U basket.
  • Energy: ~7 percent. Gasoline, electricity, natural gas, and other fuels. High volatility makes energy the largest driver of month-to-month headline CPI swings.
  • Education and communication: ~6 percent.Tuition, school books, postage, telephone services, and internet access.
  • Recreation: ~5 percent. Sporting goods, fees for clubs, televisions and audio equipment, and reading materials.
  • Apparel: ~2.5 percent. Clothing, footwear, and jewelry. The share has fallen steadily over decades as apparel import prices declined and households shifted spending toward services.

The weights matter for interpretation. A 10 percent jump in gasoline prices adds roughly 0.7 percentage points to headline CPI (10 percent × ~7 percent weight). A 10 percent jump in shelter costs adds roughly 3.6 percentage points — five times as much. Energy dominates month-to-month noise; shelter dominates the persistent trend.

Headline CPI versus core CPI

Headline CPI-U is the all-items index: every component, weighted by the CE Survey. Core CPI-U — officially “all items less food and energy” — strips out the two most volatile expenditure categories and represents approximately 79 percent of the basket.

The rationale for core is signal-to-noise. Food and energy prices are set largely in commodity markets that respond to weather, geopolitics, and supply shocks that have little to do with domestic monetary conditions. A hurricane that destroys Gulf Coast refinery capacity pushes gasoline prices up sharply; that price increase does not reflect excess demand generated by loose monetary policy, and it will reverse when refinery capacity is restored. Central banks generally cannot and should not respond to commodity supply shocks. Core CPI, by excluding food and energy, gives policymakers a measure of underlying inflation momentum that better distinguishes demand-driven from supply-driven price pressure.

The practical difference was dramatic during 2022. In June 2022, headline CPI-U hit 9.1 percent year-over-year — the highest reading since November 1981 and a 40-year record. Core CPI that same month was 5.9 percent. The 3.2 percentage point gap reflected surging gasoline prices as Russia's invasion of Ukraine disrupted global energy markets. By December 2022, as energy prices retreated, headline CPI had fallen to 6.5 percent while core remained at 5.7 percent — the gap had largely closed, revealing that the underlying demand-driven component of inflation was declining more slowly than headline suggested.

CPI-U versus the PCE deflator: why the Fed switched

The Federal Reserve's inflation target is not stated in terms of CPI-U. Since 2000, the Fed's preferred measure has been the Personal Consumption Expenditures (PCE) price index, published by the Bureau of Economic Analysis. The Fed's 2 percent inflation target is a PCE target, not a CPI target. The two indexes typically run 0.3 to 0.5 percentage points apart, with CPI-U higher.

The reasons for the divergence are methodological and conceptual. First, expenditure weights: the PCE deflator uses weights derived from the National Income and Product Accounts (NIPA), which capture all personal consumption spending including purchases made on behalf of consumers by third parties (employer health insurance, Medicare and Medicaid). CPI-U weights only out-of-pocket spending. Because healthcare is a large and fast-growing sector, PCE gives it a substantially higher weight than CPI-U does, and since healthcare price inflation has historically been high, this tends to push PCE up — but the offset is that PCE's healthcare price measurement is different, often lower, because it includes government-negotiated rates that CPI-U does not.

Second, substitution: PCE uses a chained Fisher index that accounts for the fact that consumers switch toward relatively cheaper goods when prices change. CPI-U, even with its Laspeyres-based structure modified by geometric averaging at the item level, does not fully capture upper-level substitution. When beef prices spike and consumers buy more chicken, the PCE deflator registers that shift as a moderating influence on inflation. CPI-U registers the price of the fixed basket, which includes more beef than consumers actually bought.

Third, scope: CPI-U covers urban consumers; PCE covers all US residents. The Fed prefers a measure that encompasses the entire economy it is targeting, not just the urban 87 percent.

Despite all this, CPI-U remains more financially important in practice. Social Security COLAs use CPI-W (a close cousin of CPI-U). Treasury Inflation-Protected Securities (TIPS) are indexed to CPI-U, not PCE. Countless private contracts — commercial leases, union wage agreements, alimony orders — specify CPI-U escalators. Market-based inflation expectations, implied by TIPS breakevens, are CPI-U expectations. The BLS CPI release date is the one that moves bond markets on publication morning; the BEA PCE release, three to four weeks later, is important but moves less because CPI-U has already set the prior.

Seasonal adjustment and why it matters

BLS publishes two versions of every CPI series: seasonally adjusted (SA) and not seasonally adjusted (NSA). The unadjusted series is the raw measurement; seasonal adjustment removes predictable calendar-driven price movements so that underlying trends are visible.

Food and energy have pronounced seasonal patterns. Gasoline prices typically rise in spring as refineries switch to more expensive summer-blend formulations and driving increases, then fall in autumn. Fresh vegetables are cheaper in summer harvest months and more expensive in winter. Apparel prices spike when new seasonal lines arrive and fall at end-of-season sales. Seasonal adjustment uses an X-13ARIMA-SEATS procedure to estimate and remove these effects.

For month-to-month analysis of whether inflation is accelerating or decelerating, seasonally adjusted series are standard. A January CPI print that looks low because of seasonal patterns in energy and food would mislead if taken at face value. For year-over-year analysis, seasonal effects mostly cancel out — you are comparing the same month a year apart — and either series can be used, though NSA is preferred for formal year-over-year calculations to avoid double adjustment. For applications tied to legal contracts or government programs, the unadjusted series is typically specified, because adjustments can be revised but measured prices are final for their reference period.

Series IDs and BLS API access

The BLS Public Data API provides free programmatic access to the full CPI-U history. No registration is required for basic access; a free API key raises the daily request limit from 25 to 500. The two most important aggregate series are:

  • CUUR0000SA0 — CPI-U, all items, not seasonally adjusted (headline). This is the series used for TIPS indexation, Social Security-adjacent COLAs, and most contract escalators.
  • CUUR0000SA0L1E — CPI-U, all items less food and energy (core), not seasonally adjusted. The “L1E” suffix encodes the exclusion of food (L1) and energy (E).

The series ID structure for CPI follows: survey prefix (CU), seasonal adjustment code (U for unadjusted, S for seasonally adjusted), periodicity (R for monthly), area code (0000 for US city average), item code. The full item code list is published in the BLS CPI technical documentation and covers hundreds of sub-indexes, from gasoline (series CUUS0000SETB01) to college tuition (series CUUS0000SEEB01).

Python: pulling 10 years of CPI-U and computing year-over-year inflation

The BLS v2 API accepts POST requests with a JSON payload specifying series IDs, year range, and optional calculation flags. The API caps each request at a 20-year span; for the full 1913–present history, two sequential requests are required. The snippet below pulls headline and core CPI-U for 2015–2024 and computes year-over-year percent change.

import requests
import pandas as pd

BLS_API = "https://api.bls.gov/publicAPI/v2/timeseries/data/"

# Series IDs
# CUUR0000SA0   - CPI-U, all items, not seasonally adjusted (headline)
# CUUR0000SA0L1E - CPI-U, all items less food and energy (core), not seasonally adjusted
SERIES = [
    "CUUR0000SA0",
    "CUUR0000SA0L1E",
]

def fetch_cpi(series_ids, start_year, end_year, api_key=None):
    """
    Fetch CPI-U series from the BLS v2 API.
    api_key is optional; raises rate limit from 25 to 500 requests/day.
    BLS API caps each request to a 20-year span; make two calls for the
    full history back to 1913.
    """
    payload = {
        "seriesid": series_ids,
        "startyear": str(start_year),
        "endyear": str(end_year),
        "calculations": True,
        "annualaverage": False,
    }
    if api_key:
        payload["registrationkey"] = api_key

    resp = requests.post(BLS_API, json=payload, timeout=30)
    resp.raise_for_status()
    return resp.json()

def parse_cpi(response):
    """Convert BLS JSON response to a tidy pandas DataFrame."""
    frames = []
    for series in response["Results"]["series"]:
        sid = series["seriesID"]
        rows = []
        for obs in series["data"]:
            rows.append({
                "series_id": sid,
                "year": int(obs["year"]),
                "period": obs["period"],   # M01 through M12; M13 = annual avg
                "value": float(obs["value"]),
            })
        df = pd.DataFrame(rows)
        # Drop annual averages
        df = df[df["period"] != "M13"].copy()
        df["month"] = df["period"].str.lstrip("M").astype(int)
        df["date"] = pd.to_datetime(
            df["year"].astype(str) + "-" + df["month"].astype(str) + "-01"
        )
        frames.append(df)
    return pd.concat(frames, ignore_index=True)

# Pull 10 years of data (2015 through 2024)
raw = fetch_cpi(SERIES, 2015, 2024)
df = parse_cpi(raw)

# Pivot to wide format
wide = df.pivot_table(index="date", columns="series_id", values="value")
wide.columns.name = None
wide = wide.sort_index()

# Year-over-year percent change
wide["headline_yoy"] = wide["CUUR0000SA0"].pct_change(12) * 100
wide["core_yoy"] = wide["CUUR0000SA0L1E"].pct_change(12) * 100

print(wide[["headline_yoy", "core_yoy"]].tail(24).round(2).to_string())

# Peak headline inflation in this window
peak_date = wide["headline_yoy"].idxmax()
peak_val = wide["headline_yoy"].max()
print("Peak headline YoY: " + str(round(peak_val, 2)) + "% in " + peak_date.strftime("%Y-%m"))

Two implementation notes. The BLS API returns value as a string; always cast to float before arithmetic. The most recent one to two months of data carry a footnote code P (preliminary) and may be revised in the next release; code defensively against revision when building time-series models that depend on current-month values.

The 2021–2023 inflation surge

The CPI-U surge of 2021–2023 was the most significant inflationary episode in the United States since the early 1980s. Headline CPI-U was 1.4 percent year-over-year in January 2021. By June 2022, it reached 9.1 percent — a 40-year high. The path from 1.4 to 9.1 in 17 months, and back to below 3 percent by mid-2024, generated more academic papers, congressional hearings, and central bank communications than any peacetime inflation episode in memory.

The causes were compounding. Pandemic fiscal stimulus — the three rounds of direct payments totaling $3,200 per eligible adult, plus enhanced unemployment insurance — added roughly $5 trillion in demand. Supply chains had been disrupted by factory closures, port backlogs, and shipping container shortages that cut the supply of tradable goods precisely when demand for them spiked (households shifted from services to goods during lockdowns). Used vehicle prices rose 40 percent year-over-year by mid-2021, contributing roughly 1.5 percentage points to headline CPI on their own. Energy prices, which had collapsed in 2020, rebounded and then surged further after February 2022 when Russia invaded Ukraine. Food commodity prices — wheat, cooking oils, fertilizers — rose sharply as Ukrainian and Russian exports were disrupted.

The Federal Reserve began raising the federal funds rate in March 2022, eventually reaching 5.25–5.50 percent by July 2023 — the highest level since 2001. The transmission from rate increases to CPI moderation was slower than many Fed models predicted, partly because of shelter inflation persistence, which is discussed below.

Shelter inflation persistence: the OER methodology

Shelter is the largest single component of CPI-U at approximately 36 percent, and it is also the most structurally lagged. The majority of the shelter component is measured not by actual rents paid but by Owners' Equivalent Rent (OER) — a survey-based estimate of what owner-occupied housing would rent for if it were rented on the open market. OER accounts for roughly 26 percentage points of the total 36-point shelter weight.

The methodology has two significant consequences. First, OER excludes home price appreciation entirely. When house prices rise, CPI-U does not capture it — only the rental flow value of owning changes the index. In the 2020–2022 period, median US home prices rose over 40 percent while OER lagged significantly. Second, OER is estimated from a sample of owner-occupied units surveyed by BLS field agents, who ask what the unit would rent for. Because actual market rents are not used, and because the reference sample is a slowly rotating panel of existing units rather than new leases, OER responds to market rent changes with a lag of roughly 12 to 18 months.

This lag created the well-documented “shelter persistence” problem of 2022–2024. Market rents for new leases — measured by private indexes such as Zillow's ZORI and Apartment List — peaked in early 2022 and fell throughout 2023. OER in CPI-U, because it measured average rents across all leases (new and existing), continued rising through most of 2023, keeping core CPI elevated even as real-time rent signals had already reversed. Economists and Federal Reserve staff who used private new-lease rent indexes as leading indicators correctly predicted that CPI shelter would eventually moderate; they disagreed on timing.

The Boskin Commission and methodological controversies

The CPI-U methodology has been contested since at least 1996, when the Advisory Commission to Study the Consumer Price Index — chaired by economist Michael Boskin — published its report arguing that CPI overstated true inflation by approximately 1.1 percentage points per year. The four sources of bias the commission identified remain the framework for CPI methodological debate:

  • Substitution bias: consumers switch to cheaper alternatives when prices rise; a fixed-weight Laspeyres index does not capture this, overstating the cost of living by assuming consumers keep buying the more expensive good. BLS responded by introducing geometric averaging at the item level in 1999, which partially addresses lower-level substitution. Upper-level substitution (between major categories) is still not fully accounted for in CPI-U.
  • Quality change bias: if a laptop doubles in speed and the price stays flat, the “real” price fell by half, but a simple price index records no change. BLS uses hedonic regression to quality-adjust prices for computers, televisions, apparel, and certain other goods. Critics argue hedonic adjustments are applied too selectively and too conservatively; proponents argue current adjustments are already aggressive relative to what the methodology can reliably estimate.
  • New goods bias: the index cannot capture the consumer surplus from genuinely new products until they are incorporated into the basket, by which time price declines after introduction are already past. Smartphones, streaming services, and social media were not in the CPI-U basket for years after they became significant consumer expenditures.
  • Outlet substitution bias: if consumers shift from department stores to discount retailers or from physical retail to e-commerce, they may be paying lower prices for equivalent goods. The CPI price collection methodology historically weighted outlet types by historical spending shares; more recent methodology has been updated but does not fully capture all outlet shift effects.

Following the Boskin Commission, BLS made significant methodological changes through the late 1990s and 2000s, including geometric mean aggregation, expanded hedonic adjustment, more frequent weight updates, and improvements to medical care price measurement. The commission's estimate of 1.1 points of annual bias is now considered too large by most economists, but the methodological improvements made in response are not universally incorporated into retrospective historical comparisons — a point worth noting when comparing 1970s inflation to 2022 inflation across the long CPI-U series.

How BLS release dates move financial markets

The CPI-U release is one of the most market-moving scheduled economic data releases in the United States. BLS publishes a release calendar one year in advance; the report is typically issued at 8:30 AM Eastern Time on the second or third Tuesday of the month, covering data from the prior month (the January CPI releases in mid-February). The exact release date for any month is available at bls.gov/schedule/.

The market response mechanism is well-established. US Treasury futures contracts — particularly the 2-year and 10-year notes — are the primary instruments that respond, because CPI prints directly affect Federal Reserve rate expectations. A CPI print above consensus expectations signals that the Fed may need to stay restrictive longer, pushing short-term yields up and long-term yields up (though the slope of the response depends on whether the surprise is in goods or services inflation). A below-consensus print triggers the opposite.

The equity market response depends on which component surprised. An energy-driven upside surprise tends to hit cyclical sectors (airlines, trucking, consumer discretionary) harder than defensive sectors. A core services surprise — particularly shelter or medical care — signals persistent monetary tightening and hits rate-sensitive sectors (real estate, utilities, high-multiple growth stocks) most directly. The 30 minutes following an 8:30 AM CPI release can generate equity price moves equivalent to several weeks of normal trading in rate-sensitive sectors.

The TIPS breakeven rate — the spread between nominal Treasury yields and TIPS yields of the same maturity — is the bond market's real-time forecast of average CPI-U over the bond's life. The 10-year breakeven, reported daily by the Federal Reserve Bank of St. Louis on FRED, is the closest thing to a market consensus on future CPI-U that exists. It diverges from professional forecasts when markets price in tail risks (deflation scares, inflation spikes) that survey forecasters do not put in their central estimates. During 2022, 10-year TIPS breakevens reached 3.0 percent — the highest sustained level since the index began in 2003 — signaling that bond markets expected CPI-U to average 3 percent over the next decade, a significant structural repricing of inflation risk.


For the BLS labor market data that pairs with CPI in Federal Reserve analysis: BLS JOLTS: the federal dataset that measures why workers quit →

For DOL enforcement data on wage violations that intersect with inflation-adjusted pay: Wage theft by employer: using DOL Wage and Hour Division enforcement data to find labor violations →

For Census ACS income and poverty data that provides household-level context for CPI-measured price changes: The demographic backbone: using Census ACS data to contextualize every other federal dataset →