There are two ways to measure inflation within an economy. The Consumer Price Index, and the GDP deflator.
The Consumer price index measures the value of a basket of goods across multiple years with the base year basket of goods being valued at 100 and another year being valued at the percentage increase of the total basket of goods from the base year. So if a basket of goods cost $10
in 2009 (The US current base year) and $11
in 2016 the CPI for 2009 would be 100 and the CPI for 2016 would be 110.
The GDP deflator is calculated by calculating (Nominal GDP / Real GDP)*100. Where nominal GDP is simply the total value of goods produced in an economy in a given year and real GDP is the value of those goods produced in an economy in a given year at the price level of a base year (also 2009 in the US).
These methods give different values. CPI is a better measure for how inflation effects consumers assuming the bundle basket of goods is what is assumed the average consumer consumes and GDP deflator is a better measure of how inflation affects the overall economy and industry since it applies to all goods that are produced and not a somewhat arbitrary bundle basket of goods.
Despite the differences they both are highly correlated with eachother and provide a decent measure of inflation over time as you can see by this graph: