Inflation is one of the biggest enemies of long-term investors. But to get a handle on its true impact, you have to make sure you calculate it correctly not just month to month or year to year but over history. Let's look more closely at the correct way to measure long-term inflation.

**Why inflation matters**The inflation rate measures the change in prices. As prices rise at a faster rate, the inflation rate is higher and each dollar has less purchasing power.

Measuring the inflation rate can help you predict how prices will change in the future and help you budget accordingly. When calculating the annual inflation rate over multiple years, you must account for the effects of compounding interest, so you may not simply divide the total inflation rate by the number of years.

**The 4-step process to get inflation right**Fortunately, it's not hard to do inflation calculations. You can typically use this simple four-step process.

First, divide the price at the end of the period by the price at the start of the period. For example, if you wanted to measure in the annual inflation rate of gas over eight years and the price started at $2.10 and went up to $3.60, divide $3.60 by $2.10 to get 1.714285714.

Second, divide 1 by the number of years over which inflation takes place. In this example, divide 1 by 8 to get 0.125.

Third, raise the overall inflation rate from step 1 to the power of the result of step 2 using a calculator. Raising refers to using exponents. In this example, raise 1.714285714 to the 0.125th power to get 1.069696071. With a calculator, enter "1.714285714," push the exponent key (usually denoted with a "^" or a "x^y"), enter "0.125" and then push the equals key. When raising a number to a power less than 1, you get a number smaller than the original.

Finally, subtract 1 from the result to find the annual inflation rate. In this example, subtract 1 from 1.069696071 to find that the annual inflation rate equals 0.069696071, or about 6.97%.

This process might seem longer and more complicated than necessary. To avoid costly mistakes, though, this method will get you to the right long-term answer in evaluating inflation.

*The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.*