Running out of money in the middle of retirement is a nightmare scenario. While Social Security benefits and Medicaid can help, they won't provide enough income for a comfortable living situation. That's why it's important to protect yourself from the three most likely reasons for running out of retirement savings.

1. Not saving enough

Americans tend to be terrible at saving money. In fact, we're more likely to spend more money than we have. If you want to enjoy your golden years instead of spending them as a Walmart greeter, you'll need to buck this trend and make room in your budget for ample retirement contributions.

When you're trying to free up some money in your budget for retirement savings, you have two primary options: increase your income or reduce your expenses. Options for increasing your income include getting a raise, getting a part-time job on the side, and setting up passive income streams. Options for reducing your expenses include canceling things you're not using (hello gym membership), temporarily getting rid of luxuries (i.e., eating at home every night for a month), switching your subscriptions to a less costly plan (maybe changing to a simpler and cheaper cellphone plan), etc.

Your best course of action is to come up with a list of retirement expenses based on your plans, figure out how much income you'll need to cover those expenses plus a bit extra for emergencies, and use that information to determine how much you need to save for retirement. If you don't want to take the time to come up with a custom plan, your next best bet is to save 15% of your income. If you can hit a 15% contribution level, you should end up with enough retirement savings to fund a comfortable retirement -- assuming you don't wait to start saving until you're around 50 or older, in which case you'll need to save more aggressively.

Frustrated older man working on computer

Image source: Getty Images.

2. Poor investment decisions

Assuming you followed the advice in the first section and are now saving a respectable amount of money for retirement, the next step is to figure out what to do with that money. Putting it in a bank savings account is a nonstarter: You'll never earn sufficient returns from such an account to finance your retirement. Using a standard brokerage account is nearly as bad, because the taxes you'll pay on dividends, interest, and capital gains will erode your returns.

That's why it's crucial to use a retirement savings account such as a 401(k) or IRA for your retirement savings. Both of these account types will shield your assets from the various investment taxes.

Once you've set up your retirement savings account and are funding it, you need to decide how to invest your money. If you're at least a couple of decades from retirement, you can use the asset allocation formula of 110 minus your age to figure out what percentage of your money should be invested in stocks, and then put the remainder in bonds. For example, a 35-year-old saver would have 75% of her retirement savings in stocks (110 minus 35) and 25% in bonds.

If you've waited to start saving until later in life and can't afford to contribute more than 15% of your income, you'll need to take some risks to juice your portfolio's returns and get caught up. That means keeping a higher percentage of your retirement savings in stocks than the aforementioned formula would suggest. For example, if you wait to start saving until you're 45, instead of keeping 65% of your retirement savings money in stocks, you might invest 75% of your retirement portfolio in stocks (or even more, if you have a high risk tolerance). Having a higher percentage of your money in stocks means you'll be exposed to higher volatility (i.e., the value of your portfolio is more likely to seesaw up and down wildly), but you'll also have a shot at higher returns.

As far as specific investments go, your wisest course of action is to put your stock money in an S&P 500 index fund and your bond money in an intermediate-term bond index fund.

3. Unexpected expenses

Remember that bit about coming up with a list of retirement expenses in the first section? If your list is incomplete or you're overly optimistic about how much things will cost, you might find that your retirement income is insufficient once you actually retire. Or you might get hit with a one-time major expense such as a serious health problem that will drain your savings beyond your ability to recover.

Without a crystal ball, it's impossible to know exactly what your future expenses will be. That's why it's important to pad your retirement income estimate by at least 10%. This extra 10% will allow you to indulge yourself a bit in good times and will provide the money to pay emergency expenses during bad times.

For example, let's say you make a list of your current expenses, compare them with your retirement plans, and come up with an estimate of $4,000 per month in retirement expenses. Your Social Security statement says you'll receive about $1,200 per month in benefits, so it would seem that you need enough retirement savings to provide you with an additional $2,800 per month (your expenses minus your Social Security benefit). However, what you really need from your retirement savings is at least $3,200 per month: that $4,000 expense estimate, plus an additional 10%, means you'll need a total of $4,400 in retirement income.

It's also a good idea to prepare for emergencies by getting insurance coverage. Medicare will provide for your basic healthcare needs, but be prepared to pay premiums for either a Medigap or Medicare Advantage plan to cover healthcare expenses that aren't included in basic Medicare. And a long-term care insurance policy can save you a fortune if you end up needing said care -- which about 70% of retirees will, according to the U.S. Department of Health and Human Services. Another advantage of these insurance policies is that it's much easier to budget for an insurance premium than it is to budget for an emergency.

Saving enough money to cover all these expenses means you'll probably have to work harder now, but at least you'll know that your retirement is secure as a result.

The Motley Fool has a disclosure policy.