Thereâs no single CPI â the term refers to any type of index designed to track the prices of consumer goods, services, and household products. Suppose that we have a basket made up of the following expenses: groceries, hygiene products, travel costs, rent, etc. Basically, we can do this with anything youâd expect the average consumer to spend on.Â
Weâll note down the total cost of the items in that basket, typically using weighted averages to give more âweightâ to more important items. Then weâll note the year/month/period, too. By doing this at set intervals, we can get an idea of how the index is performing over time.
Letâs say that weâve observed the following:
Year | Basket value |
2014 | $30 |
2015 | $31 |
2016 | $32 |
2017 | $32 |
2018 | $33 |
2019 | $34 |
We could plot these values on a chart to see how the value of the basket changes year-by-year. What we see here is a steady increase. That allows us to estimate that the costs of various goods and services in the basket are rising due to inflation.
First, we want to calculate CPI per year. Â We take a base year (the one weâll be using to compare with everything else) â letâs use 2014. Then, for every row in the table, weâll perform the following calculation:
CPI = current year / base year * 100
Hereâs our updated table:
Year | Basket value | CPI |
2014 | $30 | 100 |
2015 | $31 | 103 |
2016 | $32 | 107 |
2017 | $32 | 107 |
2018 | $33 | 110 |
2019 | $34 | 113 |
Now, we can calculate inflation or deflation with the following formula:
(CPI in year two - CPI in year one) / CPI in year one * 100
For instance, we could say that inflation has risen by ~2.72% from 2018 to 2019, or by ~7% from 2014 to 2016. In the case of deflation, weâd expect a negative number.Â