Retirement is an exciting chapter in life, but it requires years of careful planning. Even seemingly small mistakes or misunderstandings can throw a wrench in your plans, potentially costing you thousands of dollars.

If you're nearing retirement age, there's one particularly dangerous mistake that's easy to overlook: having an inappropriate asset allocation.

Person with a serious expression looking out a window.

Image source: Getty Images.

What is asset allocation in retirement?

Your retirement portfolio is likely made up of many different investments, and most people own a mix of stocks and bonds. How those investments are divided up within your portfolio is your asset allocation.

As you age, it's important to adjust your asset allocation so that you have the appropriate balance of risk and reward.

When you're younger and still have decades left of your career, you can afford to take on more risk with a higher proportion of stocks versus bonds. Stocks are more volatile in the short term, but as long as you have a few years to allow your investments to recover, they'll generally go on to earn far higher returns than bonds.

Once you start nearing retirement, though, your portfolio should lean more heavily toward the conservative side. While bonds often earn lower returns than stocks, they're also less affected by stock market volatility. If you're heavily invested in stocks and the market takes a sudden turn for the worse, your retirement fund could plummet right as you're ready to start withdrawing that money.

Why it's still wise to invest some money in stocks

If you're worried about a stock market crash or recession, it can be tempting to throw all of your money into bonds and avoid investing in stocks altogether. While that approach sounds safer on the surface, it can also be costly.

Investing at least a portion of your portfolio in stocks can help you earn significantly more than if you were to invest solely in bonds.

For example, say that by investing conservatively in investments like bonds, you could earn an average rate of return of 5% per year. On the other hand, say that by investing in a mix of stocks and bonds, you could earn average returns of 8% per year -- slightly below the stock market's historic average of 10% per year.

If you're investing $100 per month, here's approximately what you could accumulate in both scenarios:

Number of Years Total Portfolio Value: 5% Avg. Annual Return Total Portfolio Value: 8% Avg. Annual Return
15 $26,000 $33,000
20 $40,000 $55,000
25 $57,000 $88,000
30 $80,000 $136,000
35 $108,000 $207,000

Data source: Author's calculations via investor.gov.

Investing too heavily in stocks can put your retirement fund at greater risk during a bear market or recession, but investing too heavily in bonds can seriously limit your earning potential.

There's no one-size-fits-all answer to what the ideal asset allocation should look like. However, a common guideline is to subtract your age from 110, and the result is the percentage of your portfolio to allocate to stocks. So if you're 65 years old, you might allocate 45% of your retirement fund to stocks and the remaining 55% to bonds.

Again, this is only a guideline, not a rule. If you're more risk-averse and comfortable with potentially lower average returns, you might push your portfolio more toward the conservative side. Or if you have other sources of income and can afford to take on more risk with your retirement investments, you might lean slightly more toward stocks to increase your long-term earning potential.

Your asset allocation will depend somewhat on your personal preference, but it's still important to be intentional about it. By finding the right balance of stocks and bonds, you can better protect your financial future.