Inflation can be scary, but your retirement doesn't have to suffer because of it.

Experts tell you to boost your retirement contributions for a variety of reasons -- for example, there can be great tax benefits associated with retirement savings, Americans are living longer lives, and there is a real chance that Social Security benefits will be reduced in the coming decades. While this is all solid advice, there's one more thing that all American investors should be worried about -- the effect of inflation on your retirement savings. Here's how inflation can wreak havoc on your savings, and what you can do about it now.

Just how bad could inflation be, really?
Historically, inflation has averaged around 3% per year, meaning something that costs a dollar one year can be expected to cost $1.03 the following year. Sometimes the inflation rate is lower, like it has been in recent years, and sometimes it has been much higher, like in the late 1970's and early 1980's. So although we have no way of accurately predicting the future, for the purposes of this discussion we'll assume that this long-term 3% average will hold true.

While 3% annual inflation may sound relatively harmless at first, you may be surprised to learn its long-term effects.

For example, let's say that you are 35 years old, and your goal is to retire at age 62 with $1 million in your 401(k) and other investment accounts. And, let's say you save and invest wisely and end up meeting your goal. Based on the oft-cited "4% rule" of retirement savings, you can expect to be able withdraw $40,000 of your nest egg per year after retirement, which could be a reasonable amount of money to live on when you factor in Social Security.

However, a 3% inflation rate will erode the value of that money. A 3% inflation rate means something that costs $100 today will cost about $222 by the time our 35-year-old saver is ready to retire. Put another way, that million-dollar nest egg will only be worth about $450,000 in terms of today's dollars. That $40,000 per year you plan to draw from your account will only have about $18,000 in purchasing power. So, a million-dollar nest egg might not be enough to live on, after all.

Furthermore, bear in mind that inflation will continue in the years after you retire. A million dollars today will be worth just $265,000 by the time our 35 year old reaches age 80, and just $228,000 at age 85.

Here's how 3% inflation could erode the value of a dollar over the next 50 years

All of a sudden, that million-dollar nest egg doesn't seem like the symbol of financial freedom it may sound like.

What you can do about it
If you're worried about inflation taking a bite out of your retirement savings -- you should be. Fortunately, there are some steps you can take to protect yourself.

The most obvious answer is to increase your rate of retirement savings. Most people generally contribute the percentage of their salary to their 401(k) that will be matched by the employer, which is generally in the 4%-6% neighborhood. I usually recommend trying to increase your contributions to 10% of your salary. Sure, your employer won't put in any more, but it can still make a big difference in the long run.

Consider this example of how much more you could get by increasing your 401(k) contributions. These figures assume an annual salary of $50,000 and 2% annual raises, so adjust these up or down for your particular situation.

If you contribute... And your employer contributes... You could have this much in 35 years...
4% (of your salary) 4% $689,267
5% 4% $775,425
6% 4% $861,584
8% 4% $1,033,900
10% 4% $1,206,217

Assumes 8% annual average investment returns

You don't need to get there right away. Try increasing your contributions by 1% of your salary each year until you hit 10%. Or, just increase your contributions whenever you get a raise, so you won't even notice the change in your paychecks.

Of course, if you want a little more control over your retirement, consider contributing to an IRA in addition to your employer's plan. For the 2015 tax year, you can put in up to $5,500 ($6,500 if you're over 50 years old), and you can use it to buy pretty much any stocks, bonds, or mutual funds you want.

Speaking of which, the other main way you can protect yourself is with inflation-friendly investments.

Fortunately, most stocks tend to keep up with inflation. After all, if a company sells a product or service, it makes more money as prices rise, all other factors being equal. Look for companies with consistent earnings histories, low debt, and that sell products or services people need. For example, Johnson & Johnson is one of my favorite inflation-protection stocks -- it consistently grows its earnings, has a relatively low level of debt, and its products (pharmaceuticals and household items) are needed by consumers during any economic environment.

Fixed-income investments, on the other hand, don't do such a good job of keeping up with inflation. Currently, the inflation rate is about 2%, so if you own a Treasury bond paying 3.5%, your "real return," meaning after accounting for loss of purchasing power, is 1.5%. However, if inflation rises to 3%, you're really only getting a return of 0.5% per year by holding onto that bond.

One exception is TIPS, which stands for Treasury Inflation Protected Securities. These are just as safe as Treasuries, and pay fixed interest rates, but the principle value of the bonds rises with inflation, and as a result, so do the interest payments. For a more thorough discussion of TIPS, read this article, but if you prefer to keep a substantial amount of fixed-income securities in your portfolio, TIPS can help you keep up with inflation.

Finally, this should go without saying, but keeping large sums of money in cash or money market accounts is a virtual guarantee that you'll lose out to inflation over the long run.

Don't panic, but prepare for the effects
My purpose here isn't to scare you -- it's to make you aware of the reality of inflation and what it can do if you ignore it. However, by boosting your savings and investing in ways that allow you to benefit from inflation, you can still end up with enough in savings to provide your dream retirement.