# Calculating Consumer Price Index (CPI)

The Consumer Price Index (CPI) is an indicator that measures the average change in prices paid by consumers for a representative basket of goods and services over a set period of time. It is widely used as a measure of inflation, which in turn is a key indicator to describe economic performance and to guide macroeconomic policy. Calculating Consumer Price Index (and the inflation rate) follows a four step process: 1) Fixing the market basket, 2) calculating the basket’s cost 3) computing the index 4) computing the inflation rate. We will look at all four steps in more detail below.

## 1) Fixing the Market Basket

The CPI market basket represents all goods and services that are purchased for consumption by a specific reference population (e.g. the urban population within the US). It includes items from more than 200 categories and eight major groups: Food and Beverages, Housing, Apparel, Transportation, Medical Care, Recreation, Education and Communication, and Other Goods And Services.

The basket is developed over a two-year period from surveys and diaries that collect detailed information from households (families and individuals) regarding their day-to-day consumption expenses. In the US, about 7’000 families from around the country provide this data each quarter. In addition to that, another 7’000 families list everything they buy in a diary for two weeks to collect information on frequently purchased items. This data is then thoroughly analyzed to determine the weight and importance of the various items and categories in the basket.

To give a simple example, let’s assume that the typical consumers in an economy buy a basket of only two goods; ice cream and candy bars. By conducting surveys, we find out that on average every consumer buys 4 ice cream cones and 8 candy bars. With this information we can now fix our market basket to 4 ice cream cones and 8 candy bars.

## 2) Calculating the Basket’s Cost

Once the basket is fixed, the next step in calculating Consumer Price Index is to find the current and previous prices of all goods and services. This allows us to calculate the price of the entire basket at any point in time. The important thing to note here is that the market basket remains fixed, i.e. neither goods or services nor their quantity changes. Hence, the only variable is price, which allows us to isolate the effects of price changes over the years.

Revisiting our example, we now have to find the prices of ice cream and candy bars. In 2017, an ice cream cone costs USD 2 and a candy bar sells at USD 1. Hence, the basket’s cost adds up to USD 16 (4 ice cream cones x USD 2 + 8 candy bars x USD 1). Back in 2016, consumers only had to pay USD 1.90 for an ice cream cone and USD 0.80 for a candy bar, which results in a basket cost of USD 14 (4 ice cream cones x USD 1.90 + 8 candy bars x USD 0.8). We can already see that the price level has increased from 2016 to 2017.

## 3) Computing the Index

Next, to actually calculate the Consumer Price Index we need to define a base year. The base year serves as the benchmark against which all other years are compared. It can be designated freely, although for the sake of comparability it is common practice to keep the same base year for a few years before moving on to a new one. The worldbank currently reports CPI data with base year 2010.

The index is then calculated by dividing the price of the basket of goods and services in a given year (t) by the price of the same basket in the base year (b). This ratio is then multiplied by 100, which results in the Consumer Price Index.

In the base year, CPI always adds up to 100. This becomes obvious if we look at our example. To calculate CPI in 2016, we have to divide USD 14 by USD 14 and multiply the result by 100 (i.e. [14/14]x100). Of course, the result is 100. Using the same formula, the CPI in 2017 is 114,3, i.e. (16/14)x100=114,3. Thus we can say that the Consumer Price Index has increased from 100 in 2016 to 114,3 in 2017.

## 4) Computing the Inflation Rate

Lastly, the calculated CPI can be used to compute the inflation rate. More specifically, the inflation rate is the percentage change in the price index from one period to the preceding one. To calculate it, we can use the following formula.

In our example, the inflation rate in 2016 is 14,3% (i.e. ([114,3-100]/100)x100). Hence, with this formula we can calculate the inflation rate for any given year as long as the CPI of that and the preceding year is available.

## In a Nutshell

The Consumer Price Index (CPI) is an indicator that measures the average change in prices paid by consumers for goods and services over a set period of time. It is widely used as a measure of inflation. Calculating Consumer Price Index (and the inflation rate) follows a four step process: 1) Fixing the market basket, 2) calculating the basket’s cost 3) computing the index 4) computing the inflation rate.