First we need to know how much of each good were purchased each year and what the prices were:
| 1984 | Hamburger | Jeans | Movie Ticket |
| Price | $.80 | $24 | $5 |
| Quantity | 40 | 1 | 4 |
Then find total expenditure by multiplying price times quantity and adding them:
Expenditure = (.80 x 40) + (24 x 1) + (4 x 5) = $75
$32 + $24 + $20 = $75
| 2004 | Hamburger | Jeans | Movie Ticket |
| Price | $1.2 | $30 | $7 |
| Quantity | 40 | 1 | 4 |
Assume that the market basket (the amount purchased) stays the same in 2004 as it was in 1984 and the only thing that’s changed are prices. Now what does that market basket cost in 2004? Use 1984 prices and 2004 quantities.
(The BLS assumes the same market basket each year)
($1.20 x 40) + ($30 x 1) + ($7 x 4) = $106
$48 + $30+ $28 = $106
To find the CPI in any year, divide the cost of the market basket in year t by the cost of the same market basket in the base year.
The CPI in 1984 = $75/$75 x 100 = 100 The CPI is just an index value and it is indexed to 100 in the base year, in this case 1984.
To find the CPI in 2004 take the cost of the market basket in 2004 and compare it to the same basket in 1984:
CPI in 2004 = $106/$75 x 100 = 128.0
Now we can calculate the inflation rate between 1984 and 2004:
(128 – 100) /100 = 28/100 = 28%
So prices have risen by 28% over that 20 year period. If the period was 1984 to 1985 we would say that inflation was 28% in 1985.
Now suppose that we know that the CPI in 1972 was 37.5 (where 1982 = 100) and that gasoline costs 36 cents per gallon. The CPI in 2004 is 188.9. The 36 cents is a nominal figure. In 2004 dollars, what did gasoline cost in 1972?
Price in dollars of the original year x (Price level in 2004/Price level in original year)
36 cents x (188.9/37.5) = .36 x 5.03 = $1.81
So 36 cents in 1972 is the same as $1.81 in 2004 dollars. Gasoline is about $1.95 today so it is only a 14 cents more expensive than it was 34 years ago.
—Art Woolf
February 25, 2005
https://www.uvm.edu/~awoolf/classes/spring2005/ec11/calculating_inflation.html