Most homeowners want to own their homes free and clear. For some, that means using a raise, inheritance, or savings to pay off their mortgage early. But this seemingly responsible move may not always be in your best financial interest.

According to financial experts, paying off your mortgage early actually comes with a cost to your bottom line. The amount you’ll save in interest likely won’t exceed what you could earn in other long-term investments, such as stocks and real estate.

For investments to make more sense than paying off a mortgage early, the annualized rate of return over a certain number of years would only need to make more than the mortgage interest. And since most people are sitting on relatively low mortgage rates, between 3.5 to 5.5 percent, beating that rate isn’t tough.

The average annualized return for the S&P 500 index over the last 90 years is roughly 10 percent. Using the cash to leverage more real estate, such as multifamily properties and single-family homes, is another long-term investment that will likely offer higher long-term yields compared with paying off your mortgage, says Richard Bowen, CPA and owner of Bowen Accounting in Bakersfield, Calif.

It’s not an easy call

It’s important to work with a financial adviser before you invest so you can fully understand the risks and benefits involved, Bowen adds. Although history tells us that these investments outpace saving on your mortgage interest rate, they can be risky.

“Sadly, the math tells us, it’s almost always better to invest in other places than in your mortgage,” Bowen says. “The thing is no one can give you a guarantee on an investment. You can put your money in the stock market and lose it. You can put your money in real estate, and it doesn’t perform as well as you expected it to.”

Maintaining some liquidity is essential

Financial experts agree that it’s important to have a portion of your net worth in liquid assets that can be converted into cash quickly such as stocks, marketable securities, mutual funds, U.S. treasuries, and bonds. A house is considered a non-liquid asset because it can take months, or longer, to sell.

Liquidity is important in economic downturns and personal emergencies. It’s an easy way to access cash when needed. If your cash is tied up in a house or retirement accounts (which can be expensive to draw from), you could end up having to borrow money in a pinch.

“If you start paying down your mortgage too fast, you risk depleting your liquidity,” warns Amanda Thomas, a client adviser at Mission Wealth. "The kind of liquidity you have is important, too. You don’t want too much cash tied up in retirement funds, because you can get slammed with fees if you have to withdraw early.”

Families should strive to have a minimum of three months after-tax wages in the bank, and low-income earners should aim for at least $1,000 saved before putting extra toward a mortgage payment.

Poor savers might be the best pay-off candidates

If someone tends to spend or has trouble keeping money in the bank, then that’s a behavior that’s not likely to change, so it’s important to plan around it, Bowen says.

“If you’re going to blow through the extra money anyway, then it’s better that you put it into your house than spend it,” Bowen says.

Paying off your mortgage early will decrease your total mortgage interest, which could save you thousands, as well as help you build equity faster.

Homeownership offers peace of mind

According to ATTOM data, 34 percent of homeowners have 100 percent equity in their homes. For many people, owning a home offers benefits that can’t be tallied on a computer. For folks nearing retirement, eliminating that monthly mortgage payment can be a mental relief when they’re facing a fixed income.

“Personally, I’m paying down my mortgage," Thomas says. "It feels good to have it paid off before retirement. It might not always make financial sense, but it offers peace of mind, and it might allow for better budgeting.”

Homeowners can also borrow against the equity in their home through home equity line of credit, or HELOC, in case of emergencies or to make home improvements. HELOC interest rates are still historically low, and if you use the funds to add on or make repairs to your home, the money is tax deductible.

The important thing is for people to identify their financial goals and to allocate their money appropriately. Although financial planning seems like an exercise in logic, it’s often ruled by emotion. People want to feel good about where there money is, and that doesn’t always line up with what a spreadsheet might recommend.