Everyone's looking for safe investments these days. Unfortunately, there's a price for security: low returns. A five-year certificate of deposit pays just 1.55%, and a five-year Treasury yields barely more than that.

But one investment offers a somewhat higher return and has the added bonus of keeping your retirement expenses low: paying down your mortgage.

What's the "return" on paying off the house?
As always with paying off debt, reducing your mortgage is a guaranteed return. At the high end, the return is the rate on your mortgage -- that's if you don't itemize and therefore don't deduct mortgage interest when you file your tax return. Given that the majority of taxpayers don't itemize, and the rates on most existing mortgages range from 5% to 7%, the "return" on paying off the mortgage looks pretty good.

What's the return if you do deduct mortgage interest? Here's the simple rule of thumb: Turn your marginal tax rate (i.e., your tax bracket) into a decimal, subtract that number from 1, and then multiply the result by your mortgage rate. For example, someone in the 25% tax bracket with a 6% mortgage rate would earn an after-tax return of 4.5%. Here's how the math looks:

(1 - 0.25) x 6% = 4.5%

That's the simple version. Keep in mind that the return will vary depending on how much your itemized deductions exceed the standard deduction. And remember that the amount of interest you pay declines every year because the principal portion of mortgage payments increases each year. Clearly, it takes some spreadsheet wizardry and unearthing of mortgage papers to figure out the precise after-tax return of paying down your mortgage. Suffice it to say that it lands somewhere between our rule-of-thumb rate and your mortgage rate.

Don't forget about the tax savings
There's another benefit of paying off the mortgage before kissing off the boss: You'll have lower expenses in retirement, so you'll need less income. And in a country with progressive taxation (like the U.S.), lower income results in a smaller tax bill. It also means that less of your Social Security benefit may be subject to taxes. So you're lowering your retirement expenses in all kinds of ways.

Let's illustrate this with a hypothetical retired couple, Joe and Jane Motley, both 65 years old. They will receive \$20,000 a year from Social Security and \$10,000 from pensions, and the rest of their income will come from withdrawals from tax-deferred retirement accounts. They can get by on \$40,000 a year, not including a mortgage.

Here's how their situation looks, depending on how much they must spend annually on mortgage payments.

Annual Mortgage Payment

Required Income

Tax Bill

\$0

\$40,000

\$0

\$5,000

\$45,767

\$766

\$12,000

\$54,275

\$2,274

\$24,000

\$70,292

\$4,639 to \$6,291*

*Contingent on how much of the mortgage payment is interest, as well as the value of other itemized deductions.

If they can live on \$40,000 a year, their tax bill will come to a whopping \$0. That's because their standard deduction of \$13,000 and exemptions of \$7,000 wipe out the tax liability on their ordinary income, which makes their Social Security benefits tax-free.

However, as Joe and Jane's mortgage payment grows, so does the income they need -- along with their tax bill. It's not as simple as withdrawing \$1,000 from a traditional IRA each month to cover a \$1,000 mortgage payment, because they'll have to withdraw enough for the payment and the taxes. A retiree in the 15% tax bracket would have to withdraw \$1,176 to have enough after-tax money to pay a \$1,000 bill. That jumps to \$1,333 for someone in the 25% tax bracket.

This is a simplistic illustration. The Motleys' tax bill would be smaller if they were able to itemize, or if the extra income came from long-term capital gains, qualified dividends, or Roth IRA withdrawals, which are taxed at lower rates or are tax-free. But you can see how higher retirement income needs can lead to higher taxes.

The cost of lost opportunities
Before you start paying down your mortgage, however, you must consider what else you could do with your savings. As with every financial decision, you have to consider the opportunity costs.

If instead of paying off your mortgage you made an investment that would earn significantly more than your mortgage rate, that's the way to go -- provided you're comfortable with the added risk. Also keep in mind that contributing to a retirement account has tax advantages that would be lost if you diverted that money to the mortgage.

We all want to be financially independent in retirement. Conceptually, debt is the complete opposite. It's not impossible to owe someone money and still retire. In fact, that's the case for most retirees. According to the Securian Financial Group, only 29% of retirees are debt-free.

However, the lower the loan interest rate, the more manageable the debt is. Because most mortgage rates are relatively low, it might make sense to be in no hurry to pay it off. But if you're looking for a safe way to improve your retirement prospects -- especially after you've maxed out retirement accounts -- paying off your mortgage is a solid strategy.

Over the past decade Robert Brokamp, CFP, has helped countless people navigate the road to financial freedom through The Motley Fool Rule Your Retirement service, where this article originally appeared. You can try Rule Your Retirement or any of our newsletter services for free for 30 days.