Consumer Price Index (CPI) calculations are restricted to the consumers' purchasing behavior only in the context of price increases of goods and services from one period of time to another. CPI does not take into account the Producer Price Index, or PPI. The PPI is a measure of the average change over time in the selling prices received by domestic producers for their output. An upside to having so many indices to measure inflation is that each one (i.e., GDP Deflator GDP price index, CPI, and PPI) serves as a measure of the same inflationary tendencies but measures it in a slightly different way.
Watch the following video, from Kahn Academy, to learn more about the Consumer Price Index (CPI).