Conventional wisdom says that paying off debt is all but a must before retirement. With little to no job income, uncertain investment returns and finite assets, financially conservative seniors rarely want to quit their jobs before they’ve paid everything in full.

At the same time, long retirements and rising living costs have created an environment in which sizable savings are far more important than in decades past. Many Americans are already playing catch-up on their 401(k)s and IRAs, and along with the portfolio hits many experienced in the early and mid-2000s, few can afford to delay consistent contributions.

For many pre-retirees, the solution lies somewhere in the middle. While it may feel safer to focus first on debt, the best way to create financial security is to carefully consider varying interesting rates, return rates and present and future tax rates. “You’re always going to have a monthly bill,” said Michael Foguth of Foguth Financial. “If you’re just wanting to get rid of debt for psychological reasons, you have to consider you’ll always have taxes, insurance and living expenses.” In many cases, a combination of low-interest debt and higher-return investments will lead to the greatest net worth over the long haul.

Of course, not all debts should be weighed equally. “I almost always advise paying off high-interest credit cards first,” said Chip Hollingsworth, founder of the Federal Employee Benefits Assistance Agency. “You might be able to make money at seven or eight percent, but you definitely want to pay that ten percent credit card first.” According to rates compiled by Creditcards.com, the national average credit card APR was 15.07 percent as of October 2014, and even the “low interest” card average was 10.37 percent—far higher than clients should count on for a rate of return.

The same source also puts the national average credit card debt at $7,743 per household, with that average rising to over $15,000 when only taking debt-holding households into account. Suffice it to say, middle-aged workers and soon-to-retire seniors alike need to pay down these debts before they worry about anything else.

Regarding lower-rate debts, however, “If you can make more money than what your interest is, it may be better to invest,” said Hollinsworth. “In today’s world we’re in kind of a perfect storm of low interest rates.” Both 30-year and 15-year mortgage rates are still hovering under four percent according to BankRate, 60-month car loans average 4.31 percent (BankRate) and although new Stafford student loans have climbed to over four percent in recent years, the last decade has seen rates between 1.81 and 3.86 percent (Bloomberg). Given the cash flow to invest proportionally to debt, making the minimum payments may actually be a client’s best bet.

Those rates also present great opportunities for seniors with partially paid-off homes. Entering retirement with a mortgage might scare some clients, but a lower mortgage payment and a higher home equity line for renovations can be much more cost-effective than selling and renting.

As for investment options, tax-free accounts are king. “If you can save money in today’s low-tax environment, you’re making all the difference in the world with a tax-free vehicle,” said Foguth. The Roth IRA may be the most popular choice, but clients should also consider the Roth 401(k), municipal bonds and health savings accounts.

While perhaps not as useful during retirement, tax-deferred investments are still great options, particularly for people who need to pay off large debts they save. For instance, someone who needs to pay down a large, non-deductible credit card bill might avoid a higher tax bracket by also contributing to a tax-deferred, deductible 401(k) or IRA. The deductibility of student loan and mortgage interest likewise allows clients to strike a better balance between debt and savings.

Ultimately, the biggest hurdle in improving your clients’ retirement prospects could be their hesitancy to live with debt – not the debt itself. “You’ve got to educate your clients first,” said Foguth. “I always say the proof is in the numbers. Project everything out for them.” As scary as it may seem to entire retirement with loans, the prospect of missing out on investment income and running out of money is even more frightening.