What is the formula for CPI consumer price index? and how it is use to calculate prices?

Prices are used to calculate the Consumer Price Index; not the other way around. See

http://en.wikipedia.org/wiki/United_States_Consumer_Price_Index
for details on how it it calculated

what does the inflation formula shows?

The formula for calculating the Consumer Price Index (CPI) is:

CPI = (Cost of basket in current year / Cost of basket in base year) x 100

To understand how the CPI is used to calculate prices, we need to break down the components and steps involved:

1. Selecting the Basket of Goods: The first step in calculating the CPI is to select a representative basket of goods and services that are commonly consumed by the average consumer. This basket typically includes items like housing, food, transportation, healthcare, education, and other essential goods and services.

2. Determining the Price of Goods: The price of each item in the basket is collected through surveys and market data. These prices need to be collected consistently over time, usually on a monthly basis.

3. Calculating the Cost of the Basket: The cost of the basket of goods is determined by multiplying the price of each item by its corresponding weight, which represents its importance in the average consumer's spending.

4. Choosing a Base Year: A base year is selected as a reference point for comparison. The cost of the basket of goods and services in the base year is set to 100.

5. Calculating the CPI: To calculate the CPI for a given year, divide the cost of the basket in the current year by the cost of the basket in the base year and then multiply by 100. This allows for easy comparison of price changes over time.

For example, suppose the cost of the basket in the base year is $1,000 and in the current year is $1,200. The calculation would be:

CPI = ($1,200 / $1,000) x 100 = 120

This means that prices, on average, have increased by 20% compared to the base year.

The CPI is widely used to measure inflation and reflect changes in the cost of living for the general population. It helps governments, businesses, economists, and policy-makers make informed decisions regarding monetary policy, wage adjustments, and social security benefits.