# How do I calculate the CPI?

Computes a consumer price index from the cost of a basket of goods, and the inflation between two CPI values, typed or the BLS CPI-U yearly averages since 1913.

- Page: https://www.acalculator.org/finance/cpi-calculator
- JSON spec: https://www.acalculator.org/finance/cpi-calculator.json
- Version: 27bf17412d01

## Default answer

Example with the default inputs (I know Basket costs, Cost of the basket in the base period $107.00, Cost of the same basket now $117.50): The price change between the two periods is 9.81%.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| from | I know | The cost of a basket of goods in two periods, two CPI values, or two years to look up in the BLS CPI-U table. |
| base | Cost of the basket in the base period | What the basket of goods and services cost in the base period, which gets an index of 100. |
| now | Cost of the same basket now | What the same basket costs in the period you want the index for. |
| cpi1 | Earlier CPI | The index value in the earlier period, for example 112.5. |
| cpi2 | Later CPI | The index value in the later period, on the same base as the earlier one. |
| y1 | Start year | A year from 1913 to 2025: its BLS CPI-U yearly average is the earlier CPI. |
| y2 | End year | A year from 1913 to 2025: its BLS CPI-U yearly average is the later CPI. |
| amount | Amount in the start period (optional) | A price or sum of money in the earlier period, to see what it equals at the later prices. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| cpi | Consumer price index (CPI) | Cost of the basket now ÷ cost in the base period × 100. |
| inflation | Inflation (price change) | (Later CPI or cost − earlier) ÷ earlier × 100. |
| value | Amount at the later prices | The amount × later CPI ÷ earlier CPI. |
| startCpi | CPI-U in the start year | The BLS yearly average, 1982-84 = 100. |
| endCpi | CPI-U in the end year | The BLS yearly average, 1982-84 = 100. |
| yearly | Average inflation a year | The yearly rate that compounds to the price change from the earlier year to the later one, whichever is typed first. |

## Method

CPI = cost of the basket now ÷ cost in the base period × 100. Price change = (later CPI − earlier CPI) ÷ earlier CPI × 100. Amount at later prices = amount × later CPI ÷ earlier CPI. Average yearly rate = (CPI of the later year ÷ CPI of the earlier year)^(1 ÷ years between them) − 1, the same whichever year is typed first.

## Assumptions

- The basket holds the same goods and services in the same amounts in both periods; only prices change.
- Both CPI values use the same base, such as the CPI-U with 1982-84 = 100.
- The years are BLS CPI-U yearly averages (all items, US city average, not seasonally adjusted) from 1913 to 2025.
- Arithmetic is exact on the decimals you type; the CPI shows to 3 decimals, percents to 2 and money to the cent, halves up.

## Worked examples

1. from = basket, base = $107.00, now = $117.50 gives cpi = 109.813, inflation = 9.81%. Source: OpenStax, Principles of Macroeconomics 3e, 9.1 Tracking Inflation, Tables 9.2 and 9.3 (a basket costs $100, $106.50, $107 and $117.50 in four periods; with period 3 as the base year, index = spending ÷ 107 × 100: 93.4, 99.5, 100, 109.8; inflation from period 1 to 2 is 6.5%). https://openstax.org/books/principles-macroeconomics-3e/pages/9-1-tracking-inflation.
2. from = basket, base = $100.00, now = $106.50 gives cpi = 106.5, inflation = 6.5%. Source: OpenStax, Principles of Macroeconomics 3e, 9.1 Tracking Inflation, Tables 9.2 and 9.3 (a basket costs $100, $106.50, $107 and $117.50 in four periods; with period 3 as the base year, index = spending ÷ 107 × 100: 93.4, 99.5, 100, 109.8; inflation from period 1 to 2 is 6.5%). https://openstax.org/books/principles-macroeconomics-3e/pages/9-1-tracking-inflation.
3. from = index, cpi1 = 112.5, cpi2 = 121.5 gives inflation = 8%. Source: U.S. Bureau of Labor Statistics, Consumer Price Index Frequently Asked Questions (percent change = change in index points ÷ starting index × 100: Item A 112.500 to 121.500 is 8.0%, Item C 110.000 to 128.000 is 16.4%). https://www.bls.gov/cpi/questions-and-answers.htm: 9.0 ÷ 112.500 × 100 = 8.0.
4. from = index, cpi1 = 110, cpi2 = 128, amount = $100.00 gives inflation = 16.36%, value = $116.36. Source: U.S. Bureau of Labor Statistics, Consumer Price Index Frequently Asked Questions (percent change = change in index points ÷ starting index × 100: Item A 112.500 to 121.500 is 8.0%, Item C 110.000 to 128.000 is 16.4%). https://www.bls.gov/cpi/questions-and-answers.htm: 18.0 ÷ 110.000 × 100 = 16.4 (exact 16.3636…).
5. from = year, y1 = 2000, y2 = 2025, amount = $100.00 gives startCpi = 172.2, endCpi = 321.943, inflation = 86.96%, value = $186.96, yearly = 2.53%. Source: U.S. Bureau of Labor Statistics, CPI-U, US city average, all items, 1982-84=100, series CUUR0000SA0, yearly averages (2000: 172.2; 2025: 321.943; 1913: 9.9). https://data.bls.gov/timeseries/CUUR0000SA0.
6. from = year, y1 = 2025, y2 = 2000, amount = $1,000.00 gives inflation = −46.51%, value = $534.88, yearly = 2.53%. Source: U.S. Bureau of Labor Statistics, CPI-U, US city average, all items, 1982-84=100, series CUUR0000SA0, yearly averages (2000: 172.2; 2025: 321.943; 1913: 9.9). https://data.bls.gov/timeseries/CUUR0000SA0.
7. from = year, y1 = 1913, y2 = 2025, amount = $1.00 gives value = $32.52, yearly = 3.16%. Source: U.S. Bureau of Labor Statistics, CPI-U, US city average, all items, 1982-84=100, series CUUR0000SA0, yearly averages (2000: 172.2; 2025: 321.943; 1913: 9.9). https://data.bls.gov/timeseries/CUUR0000SA0.

## FAQ

### How do I calculate the CPI?

Price the same basket of goods and services in a base period and in the period you want. Divide the cost now by the cost in the base period and multiply by 100. A basket that cost $107 in the base period and $117.50 now has a CPI of 117.50 ÷ 107 × 100 = 109.81.

### How do I calculate inflation from the CPI?

Subtract the earlier CPI from the later one, divide by the earlier CPI and multiply by 100. A CPI that rises from 110.000 to 128.000 has risen 18 points, which is 18 ÷ 110 × 100 = 16.36%.

### What does a CPI of 110 mean?

Prices are 10% higher than in the base period, which has an index of 100. The official CPI-U uses 1982-84 = 100, so a CPI-U of 321.943 (the 2025 average) means prices were about 3.2 times their 1982-84 level.

### Why use percent changes and not index points?

A rise of 18 points is a bigger change from 110 than from 225. BLS shows both: 225.000 to 243.000 is 8.0% and 110.000 to 128.000 is 16.4%, though both rose 18 points. Percent changes compare across different starting levels.

### What is a dollar from one year worth in another?

Multiply the amount by the later year’s CPI and divide by the earlier year’s. With the BLS CPI-U yearly averages, $100 in 2000 (CPI 172.2) equals 100 × 321.943 ÷ 172.2 = $186.96 in 2025.

### Which CPI does the year table use?

The CPI for All Urban Consumers (CPI-U), all items, US city average, not seasonally adjusted, 1982-84 = 100: the one BLS reports as the CPI. Each value is the yearly average of the monthly indexes. For a single month, use the inflation calculator, which has every month since 1913.

## Sources

- OpenStax, Principles of Macroeconomics 3e, 9.1 Tracking Inflation: a basket of goods priced in four periods ($100, $106.50, $107 and $117.50), index numbers with period 3 as the base year (93.4, 99.5, 100.0 and 109.8), and percentage change = (level in new year − level in previous year) ÷ level in previous year. https://openstax.org/books/principles-macroeconomics-3e/pages/9-1-tracking-inflation (retrieved 2026-10-19)
- U.S. Bureau of Labor Statistics, Consumer Price Index Frequently Asked Questions: most CPI series have a 1982-84 = 100 reference base, an index of 110 means a 10% increase since the reference period, and percent change = change in index points ÷ starting index × 100 (Items A, B and C). https://www.bls.gov/cpi/questions-and-answers.htm (retrieved 2026-10-19)
- U.S. Bureau of Labor Statistics, Handbook of Methods, Consumer Price Index: Calculation: the CPI measures the average change over time in the prices paid by consumers for a representative basket; yearly average indexes use 12 successive months of CPI values. https://www.bls.gov/opub/hom/cpi/calculation.htm (retrieved 2026-10-19)
- U.S. Bureau of Labor Statistics, CPI for All Urban Consumers (CPI-U), series CUUR0000SA0, U.S. city average, all items, not seasonally adjusted, 1982-84=100, yearly averages 1913 to 2025 (October 2025 not collected during the 2025 lapse in appropriations). https://data.bls.gov/timeseries/CUUR0000SA0 (retrieved 2026-10-19)
- U.S. Bureau of Labor Statistics, Schedule of Releases for the Consumer Price Index: the December 2026 CPI, with the 2026 yearly average, comes out on January 13, 2027. https://www.bls.gov/schedule/news_release/cpi.htm (retrieved 2026-10-19)
