We compute the CPI by fixing a basket of goods in the base year and the year of interest, keeping quantities fixed while reflecting price changes. Then we compute a ratio of the total value of the baskets to find the CPI.