The article “Paying Off Debt With Investment Income” was originally published on MoneySense on December 13, 2016.

Shawn can pay off his mortgage with his stock investments. The question is: Should he?

Q: I have a mortgage and pay 3.5 percent and make monthly payments. Mortgage owing is $118,000. I currently have $125,000 in stocks that I can use to pay off this. I get a regular quarterly dividend that rolls right in to buy more stocks. I also understand that I would pay tax on half. This is also a rental property and rent is $1,300 a month.

—Shawn

A: Most Canadians have both debt and investments at any given time. So the question of what to do with incoming cash flow – pay off debt or invest – is common. When you have investments that you can otherwise use to pay off your debt, it’s kind of like borrowing to invest, even if you didn’t borrow the money to make the investments specifically. That is, you could pay off the debt, but choose not to.

Historically, Shawn, borrowing to invest may have paid off. I say may because it depends. Average Canadian 5-year fixed mortgage rates over the past 10, 20 and 30 years for the year ending December 31, 2015, were 4.94%, 5.91% and 7.51% respectively according to the Bank of Canada. By comparison, 10, 20 and 30-year returns for the Toronto Stock Exchange were 6.06%, 9.09% and 9.06%. For the S&P 500 in the U.S., converted to Canadian dollars, returns were 10.55%, 9.77% and 11.59%.

So at first glance, borrowing to invest in North American stocks would have been a winning proposition costing 7.51% over the past 30 years to earn a return of 10.33% on a 50/50 North American stock portfolio.

However, most investors don’t invest 100% in stocks, so including exposure to lower yielding bonds would have dragged down returns. Especially right now, with bond yields at historic lows, balanced portfolio returns are that much leaner.

Furthermore, most investors don’t earn the same returns as the market, due to a combination of fees (commissions, mutual fund MERs and portfolio management fees) and poor market timing (buying high and selling low). In fact, a U.S. study by Dalbar Inc. showed that for the 20 years ending December 31, 2015, U.S. equity fund investors earned only 5.19%, compared to the S&P 500 return of 9.85% (these returns are in U.S. dollars, compared to the Canadian dollar returns previously referenced). So the average stock investor captured only half of stock market returns in the past 20 years.

On that basis, Shawn, keeping your stocks instead of paying off your mortgage may or may not be the best thing to do. Assuming you are managing your portfolio, your fees may be modest. And given how low mortgage rates are currently, it’s likely a low threshold for your stocks to beat to come out ahead. If you can avoid behavioural biases like selling your stocks if and when they inevitably dip as stock markets ebb and flow, now may be amongst the best times to use leverage.

You mention that you “would pay tax on half,” in the context of selling your stocks. I assume you are referring to the capital gains you have earned on your stocks. Capital gains are 50% taxable and 50% tax-free. Tax is payable at your marginal tax rate. So if you are in a 30% tax bracket, you would pay 15% tax on a capital gain.

If you bought your $125,000 in stocks for $100,000, your capital gain would be $25,000; your taxable capital gain would be $12,500; and your tax payable would be $3,750. This is a rudimentary calculation, as large capital gains often push you into a higher tax bracket, but you get the idea, Shawn.

While we are on the topic of tax, something for you to consider is the tax efficiency of your stock returns. You mentioned the mortgage is on a rental property and assuming you borrowed the money to buy the rental property as opposed to borrowing against the rental property to buy the stocks, the tax deductibility of the interest is not impacted by what you do with your stocks. That is, you can sell or transfer your stocks without negating the deductibility of the mortgage interest.

Most Canadians have unused RRSP or TFSA room, or their spouse does, so consider whether your $125,000 in non-registered stocks are in the best place. A sale to fund an RRSP or TFSA contribution or a transfer to your RRSP or TFSA may be the best way to keep your stocks and your mortgage and benefit from some leverage. At least that way, you’re getting a tax deduction for an RRSP contribution or tax-deferred or tax-free growth on the stocks in your RRSP or TFSA.

Keep in mind that you would incur capital gains and the resulting tax from selling or transferring investments to your RRSP or TFSA, but hopefully the short-term cost of the tax is well offset by the long-term tax benefits of a tax shelter.

In summary, Shawn, now may be amongst the best times to use leverage strategically. But the net benefit may be next to nothing if fees or bad investment behaviours negate any premium between your stock returns and mortgage interest rate. If nothing else, consider whether your stocks could be put to better use in a tax shelter. And make sure you don’t need your stocks anytime soon, because if you have a short-term investment timeframe, you increase the odds of having to sell them when they’re lower than they are today. In which case, you might as well just pay off the mortgage now while North American stocks are flirting with all-time highs.

Jason Heath is a fee-only, advice-only Certified Financial Planner (CFP) at Objective Financial Partners Inc. in Toronto, Ontario. He does not sell any financial products whatsoever.