How is CPI calculated?

The Consumer Price Index, abbreviated as CPI, is an indicator of price changes based on the prices of products and services related to the lives of residents, and is usually used as an important indicator for observing the level of inflation. From January 2011, China's CPI began to calculate the 2010 as a comparison of the base period of the price index series. cpi = (a group of fixed commodities at the current price of the value / a group of fixed commodities at the price of the base period of the value of the price of the calculation) x 100%. If the average household in a country spent $800 per month on a set of goods in 1995 and $1,000 on this set of goods in 2000, then the CPI for that country in 2000 would be (with 1995 as the base period) CPI= 1000/800 × 100% = 125%, which means a rise of (125-100)% = 25%. But it has regional differences.The proportion of each component of the CPI: food 34% recreation, education and cultural services 14% housing 13% transportation and communication 10% health care 10% clothing 9% household equipment and maintenance 6% tobacco and alcohol 4%;

Thanks for the positive feedback.