Should You Pay Off Your Mortgage While Markets Hit Record Highs?

Out of 252 available trading days in 2024, the S&P 500 Index notched 57 new all-time highs, with the most recent record close at 6,090.27. This record-breaking market performance has left many investors sitting on massive unrealized gains, prompting the question of whether or not now is the time to sell and lock in some of those profits.

While the question itself is obviously straightforward, the answer is not. As markets continue to power higher, it can be challenging to find attractive opportunities to redeploy the cash from a sale. But for investors who have a more moderate to conservative risk tolerance, a possible solution is to pay off their home mortgage using the proceeds from some of those highly appreciated stocks or other investments.

Deciding whether to use stock market gains to pay off a home mortgage involves weighing several factors, including the opportunity cost of selling investments, the immediate tax implications, and the potential long-term returns from keeping those funds invested. However, the emotional and financial benefits of eliminating your largest monthly expense, particularly for those approaching retirement, must be balanced against the possibility of forfeiting future growth in a rising market.

For instance, paying down a mortgage with a fixed annual percentage rate of 4% is equivalent to earning a 4% risk-free return on those same dollars. However, with the average annual return of the S&P 500 index at more than 10% over the last 30 years—the length of most home mortgages—it is reasonable to expect that your investments could outperform this risk-free rate, even after taxes and any fees.

The decision to pay off your mortgage with investments should also account for the tax implications. Investments sold within a taxable brokerage account generally incur capital gains tax, but these rates are often lower than ordinary income tax rates. For long-term holdings, the capital gains rate is capped at 20% for most investors, making this a more tax-efficient way to generate liquidity than typically perceived.

For workers with a substantial portion of their net worth tied to the stock of the company they work for, this strategy offers an additional advantage: diversification. If your portfolio is dominated by your employer's stock, cashing out some of those shares to pay off your mortgage can decrease your reliance on the company's fortunes. This also reduces the risk of a double hit to your portfolio should the stock price fall substantially, wavering your job stability simultaneously.

For instance, consider a senior level software engineer who has accumulated $750,000 in company stock through equity grants, bonuses, and a discounted purchase plan. If their remaining mortgage balance is $250,000 with a fixed 4% interest rate, selling a portion of their stock at a market high to pay off the loan not only eliminates the mortgage but also cuts their concentrated exposure to their employer’s fortunes.

Often, some of the best moves investors can make seem counterintuitive. For example, selling some of your best performing shares to purchase additional shares of your worst performers—otherwise known as rebalancing—has been proven to yield better long-term results in a diversified portfolio. And when stock market valuations are at all-time highs, the potential opportunity cost of selling some shares is arguably lower.

While markets certainly can keep climbing, lofty valuations often signal increased volatility ahead. When stock valuations reach their cyclical peak, the likelihood of achieving substantial incremental gains decreases relative to the potential downside risk.

For instance, if a stock has risen sharply to trade at 30 or 40 times its forward earnings—well above historical average—the probability that it continues its meteoric rise without a significant pullback is lower. Locking in “paper” gains to achieve the tangible benefit of owning your home outright can be a sensible move for risk-averse individuals, particularly as they approach retirement and seek to stabilize their financial picture.

With that said, it is critical to ensure this strategy aligns with your broader financial goals. If paying off your mortgage leaves you with insufficient liquidity for emergencies or disrupts your retirement savings plan, it may not be the right move.

The calculus also changes significantly if you need to liquidate funds from a tax-deferred retirement account, such as a 401(k) or traditional IRA, to pay off your mortgage. Withdrawals from these accounts are typically taxed as ordinary income, which could push you into a higher tax bracket depending on the amount. For example, cashing out $250,000 to eliminate a mortgage early could result in a hefty tax bill, undercutting any financial benefits you stand to gain from the strategy.

Beyond the numbers, there is a psychological benefit to being mortgage-free. Eliminating major debts can provide peace of mind and a sense of accomplishment. Additionally, it can free up cash flow, allowing you to redirect funds toward other priorities like retirement savings or travel. Ultimately, the decision to pay off your mortgage with stock market gains comes down to a balance of financial pragmatism and personal values, choosing the path that best aligns with your own personal risk tolerance, lifestyle goals, and long-term plans.

Related: Before You Accept an Early Retirement Offer, Consider These Essentials