(MONEY Magazine) – ALL RIGHT, SO IT'S NOT A MULTIMILLION-dollar lottery prize, but the year-end bonus you're expecting next month (or the tax refund you'll be getting next spring) does open up some intriguing possibilities. What'll it be? Invest the money? Pay off that nagging car loan? Or spend a week or two on the beach in Maui instead?

We have no opinion on Maui, but if the choice is between investing and paying down debt, the second is sometimes the smarter option. Unless your investment guarantees you a higher after-tax return than the interest rate on your loan, you will often come out ahead by putting your spare cash into reducing debt.

Start by eliminating the most expensive debts you have. "First pay off your credit cards, whose interest rates can reach 19% or higher," says Keith Gumbinger, vice president of HSH Associates, a Butler, N.J. firm that collects interest-rate data. "Pay off tax-deductible loans last."

Here are the five most common types of loans, listed in the general order in which they should be retired. Interest is tax deductible only where indicated.

Car loans. Though automakers occasionally offer 0% financing deals as a way to move cars off the lots, most car loans carry stiff interest rates (around 9.4% on average today). If you have that kind of punishing car loan, put it high on your payback list.

Student loans. Today's student loans also have surprisingly high rates--typically between 8% and 10%--so if you have one, consider paying it off pronto. Better yet: See if you can get your next employer to help you pay the loan back as part of a hiring package. Some companies will, especially if you're a sizzling prospect in a hot field like management consulting.

Home-equity lines of credit. Like home-equity loans (see page 58), home-equity lines of credit are tax deductible. But unlike home-equity loans, they usually have a variable interest rate. So keep an eye on rates. If, at some future point, you see a big rate rise down the road, paying off early could be a timely move.

Life insurance loans. Some old cash-value policies that are still in force offer low fixed-rate loans at 5% or less. More recent policies carry higher rates (current average: about 7.5%). If you have an old insurance policy and a bargain-rate loan, there's no reason to be in a hurry to pay it off, as much as the insurance company might want you to. Just know that if you should die while the loan is in force, your death benefit will be reduced by the amount you owe.

Home mortgages and home-equity loans. Because the interest you pay on these loans is generally tax deductible, figuring out when to pay them off ahead of schedule is a little more complicated. You have to compare their after-tax cost to the after-tax rate you could be earning on your money if you invested it instead. For example, if you are in the 28% tax bracket and you have a 30-year fixed-rate mortgage at 8%, the tax break you get on interest payments reduces the real cost of the loan to as little as 5.8%. If you're reasonably certain you can beat 5.8% after taxes, you're better off investing the money.

For more advice on debt and getting out from under it, see "Five Shortcuts to Your Top Financial Goals" on page 92 and "Facing 20 Years of Debt" on page 108.

--Elif Sinanoglu