The article “Should You Invest or Pay Down Debt?” was originally published on MoneySense on January 26, 2016.

Here’s what investors nearing retirement should consider

Q: I have the following debt:

Mortgage – $60,000 @ 2.5% variable rate

Line of credit – $20,000 @ 5.7% variable rate

Car loan – $24,000 @ 3.75%

My question is this:

If I was to receive an unexpected infusion of dollars, am I better off to pay off all this debt or invest the money?

I am 62 years old and the thought of being debt free is very appealing, but also want to make the best financial decision for the long run.

 –David

A: Paying down debt and investing are good financial choices. Both will increase your net worth and accelerate your financial independence. The question of whether you should do one or the other is a personal one, David.

If you reduce your debt, you have a guaranteed rate of return equal to the rate of interest you are avoiding. For example, paying off the $20,000 line of credit will “save” you having to pay interest of 5.7% and “earn” you a 5.7% rate of return on your “investment.” Consider it like buying a 5.7% GIC.

If you could otherwise invest the money in a taxable, non-registered account, you would have to be able to earn more than 5.7% to be as well off. This is because an investment return in a taxable account is, well, taxable. So depending on the type of investment and your tax bracket, you may need to earn a high single digit or low double digit return. For example, if you were buying a GIC and you had an income of $75,000 in Alberta, you would need to earn 8.38% before tax due to your 32% tax bracket to be left with a net return of 5.7%.

If you could otherwise invest the money in a TFSA, tax would not be a consideration. You would need to earn an identical 5.7% rate of return to be in the same position as paying off the line of credit.

If you could otherwise invest the money in an RRSP, tax would be a consideration. You would receive an upfront tax refund, making your required rate of return threshold in order to be better off than paying down the line of credit less than 5.7%. The RRSP withdrawal would be taxable someday down the road and figuring out your exact rate of return threshold becomes a real complicated exercise dependent on a bunch of other factors. But suffice to say your target return to be better off than paying down debt may be less than 5.7%.

If you are a conservative investor, it may be difficult to invest the money at a high enough rate of return to make investing the better option. A conservative investor may therefore have more of a bias towards debt repayment. If paying down debt, start with the highest interest rate debt first, David.

If you are an aggressive investor, it will be that much easier to invest the money and be better off in the long run versus debt repayment. You might even consider doing both. That is, investing the money in a TFSA with the intention of taking a withdrawal at a point when your investments are up in value to make an even larger lump-sum payment against your debt.

I think that the ultimate deciding factor needs to be somewhat non-financial as well, David. There is a certain “rate of return” that comes from making what you perceive as the right decision. In other words, if you invest the money and markets take a dip, the stress of having not paid off your debt can make the decision the wrong one. If having debt going into retirement is a source of stress, it may be that even a spectacular return on the invested windfall may still leave you feeling disappointed financially.

As such, this may ultimately end up being a case of choosing between two good options and the best choice ends up being your personal best option.

As retirement planners, we try to help model out future income, expenses, assets and liabilities to demonstrate for someone the potential future results of today’s financial decisions. This can provide educated, mathematical answers to financial questions that are personalized, rather than a rule of thumb.

But if you’re looking for a rule of thumb, David, I think that going into retirement and being forced to draw down on your investments to keep up with debt payments can be stressful and counterintuitive. In a perfect world, you would aim to be debt-free by retirement and have accumulated sufficient investments to fund your retirement needs as well.

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.