In the experience of the financial adviser David Markle , people who are undisciplined about money during their careers will be similarly undisciplined in retirement. So he pushes the anti-debt message hard with his clients, hoping to curb their free-spending impulses. “I tell them, ‘If you have debt, you’re not ready to retire,’” he said.

What if they don’t have cash available to pay off their debt? Mr. Markle, who is based in Allentown, Pa., encourages clients to sell their pre-retirement homes, pay off their loans, and downsize into something more affordable.

Dr. Kotlikoff has an even more drastic-sounding suggestion. If you don’t have cash available, you should consider skipping your 401(k) and other retirement plan contributions and use the funds to pay down your home loan. “This will, on balance, raise your living standard and lower your risk in retirement,” he said.

Dr. Kotlikoff came to this conclusion after running a series of scenarios through the retirement-planning program on his website, MaxiFiPlanner.com. He recently published a case study on the site explaining his findings. The MaxiFi Planner software assumes you will be earning the 30-year Treasury bond rate on your investments, currently a little more than 2 percent.

Many financial advisers will hold their noses at Dr. Kotlikoff’s suggestion. In addition to the immediate tax savings they produce, retirement saving plans often include matching contributions from the employer. “Are you going to forgo a company match in your 401(k)?” Mr. Spero asked. “That would be crazy.”

Can debt be good?

The bigger issue, though, is that debt can be very useful. The Oregon financial planner Kyle Mast has a client who had a good year with his real estate investments and wanted to pay off a line of credit on his house. But Mr. Mast, who prefers his clients not to carry debt in most cases, told him to hold everything.

“We were able to put $50,000 into a tax-deferred account for him alone because he has his own business. This saved him $22,000 in federal, state and FICA taxes,” Mr. Mast said. When the client retires in two or three years, he can pay down his loans with money from his retirement accounts if he feels the need. His reduced income at that point ought to put him in a lower tax bracket.