Quite often on The Simple Dollar, I’ll mention the advantages of getting your debt paid down. For most debts, paying them down is the best thing you can do with your money, provided that you have a small emergency fund set up to protect yourself against the unforeseen and at least some retirement savings.

As soon as I mention this, however, a number of commenters will show up and claim that debt is great as a leverage tool, that it’s free money if you can reinvest it and earn more than the interest rate.

Here’s the way I look at it: if you’ve already incurred the debt, an extra debt repayment is an investment an after-tax and almost risk-free return equal to the interest rate on your debt.

Here’s an example. Let’s say I have a home mortgage at 6%. If I make an extra mortgage payment on that debt, every extra dollar I invest will return 6% after taxes to me over the life of the loan. Similarly, an extra payment on a 13.9% credit card debt will return 13.9% after taxes to me over the life of the loan.

This is not to suggest that debt itself is a good thing. You’re far better off saving up money for big purchases in advance than you are taking out debt to buy the items. For example, if you know you’re going to buy a $10,000 car in two years, your best move is to start putting $400 a month into a savings account right now, which will add up to nearly the cash value of the car. Otherwise, you’ll be saddled with a $10,000 loan, which will equate to approximately $250 a month payments for four years – far more money spent than if you’d saved in advance.

Let’s look at comparable investments. The only investment available to most people where you can put in after-tax money and not have to pay taxes on the return is

a Roth IRA, but it has the restriction that you can’t take your earnings out until you’re 59 1/2. Also, some municipal bonds earn tax-free income, but they generally have low rates of return – 3% or so.

Almost every other investment vehicle requires you to pay capital gains tax. Money in a savings account? You’ll be paying short term capital gains taxes on that – basically, your normal income tax rate. Money in an investment? You’ll pay short term capital gains on any dividends you get and also on any investments that you sell within a year – you’ll pay long term capital gains tax on ones you sell after owning them for more than one year (that’s 15% for most people).

Even worse, returns on most investments aren’t guaranteed. Almost every investment option that earns over 5% does not have a guaranteed return – they’re usually based on the fluctuations of the bond market, the stock market, the real estate market, or so on. Because of that, by owning the investment, you’re taking on risk that you wouldn’t have by repaying your debt.

Let’s look at an example. Let’s say I have a debt on a big furniture purchase that’s sitting there at 7%. Every extra payment you make on that debt is the equivalent of a 7% investment with no risk.

If you’re in the 28% tax bracket, in order to beat the debt repayment in a savings account, you’d have to find one earning 9.72%. Even an investment earning only long-term capital gains tax, you’d have to find a riskless investment that earned you 8.24% annually – not going to happen.

You shouldn’t pay down your mortgage or your student loans because of the tax benefits! Yes, some debts have tax benefits and those should be looked at carefully – but not overinflated. On student loans, you can deduct the paid interest each year, but all extra payments will do is reduce the amount of interest you pay in future years, just slightly reducing your deduction there. On home loans, most people look at the deductible amount of their interest, but they neglect to look at the fact that they can deduct a good chunk of that anyway via the standard deduction – their actual extra deduction due to their house is often much smaller than they might think.

It is never a mistake to pay down debt. Sure, one can formulate situations where you might earn a bit more by doing credit card balance transfers or only paying the minimum on a very low interest debt, but those situations are few and far between, have other risks (such as unexpected changes to terms and conditions and a mis-step in managing the accounts) and don’t earn you a whole lot.

In my view, debt repayment should come fourth on your financial to-do list. First, spend less than you earn every month and master it – stop building more debt right now. Second, get yourself an emergency fund – preferably a couple months’ worth of living expenses for each dependent – and keep it in a very liquid place so you can get it when you need it. Third, save for retirement. Fourth, get rid of your debts – at least those over 5% or so.

Follow that game plan with all the passion you can muster. If you can check off all four of these, then it’s time to start looking at investing and other options. That’s how I’m rolling – I’m deep into step four and already looking ahead at a bright future without debt.