There's good debt, like the kind that puts a roof over your head and exercises your gray matter. There's bad debt, like the kind that feeds your expensive shoe habit at 20% annual interest rates. Then, there's the debt in between.

Retailers want you to spend a lot of money, and they make very enticing offers so you will. To get that high-definition TV or video game console into your shopping cart, they may offer to sell you big-ticket items with special financing terms.

Or maybe your credit card has an enticingly low rate -- issuers such as Bank of America (NYSE: BAC) and Citigroup (NYSE: C) run special promotional offers all the time. Even if you have plenty of money in the bank for your purchase, does it make sense to take advantage of an opportunity to pay later?

Maybe, maybe not
There's a mathematical answer to this question, but let's consider other factors first. To begin with, the people in the best position to use good financing deals are the ones who don't need them. (I probably don't need to mention this, but don't play this game if you're in debt up to your eyeballs and need every spare penny.)

Special purchase financing deals often come with strings attached. You're less likely to get snared in expensive red tape if you can buy your way out of the problem. You want to have enough money in the bank to pay off the entire purchase before the terms of your special financing expire, so you won't get stuck with a big financing bill. Understand the fine print before agreeing to anything.

Know your tolerance for debt, too. If you hate the idea, and you'll rue the day you ever agreed to finance that sleek new laptop, pay for your purchases up front. You won't have those payments hanging over your head.

When it pays
If you do have money in the bank, but you're thinking it might be more profitable to use a good credit offer, it's time to do the math. You need to figure out which will keep more money in your pocket longer -- accepting a good financing deal or withdrawing the full sum from your savings.

The answer might not be obvious. On the one hand, savings account rates are slumping. Among "high-yield" savings accounts with no minimum balances, you won't find sky-high rates. Right now, ING Direct (NYSE: ING) offers a 3.4% annual percentage yield, Capital One (NYSE: COF) pays 3.5% APY, and E*Trade (NYSE: ETFC) advertises 4.1% APY. On the other hand, retailers may try to blunt the effects of a recession with incentives to fork over your cash.

To see whether it makes more sense to borrow or spend, compare the after-tax cost of borrowing to the after-tax cost of pulling your money out of savings. You know the after-tax cost of borrowing. It's the amount the retailer or credit card wants to charge for lending you the money.

To figure the other half of the equation is a little trickier. You know the pre-tax interest rate on your savings, but to compare apples to apples, you need to calculate the after-tax rate. To do this, take your marginal tax rate and subtract it from 100%. Then multiply the result by the interest on your savings account. Compare the answer to your borrowing costs to see which will be more profitable.

Let's say you want to buy the newest, biggest TV. You have money in the bank earning 3.5% interest, but Real Deal Credit Cards will let you borrow the money at 3%. Seems like you'll make more in the long run by keeping your money in the bank, right?

But say you're in a 25% tax bracket. Plug your numbers into the formula -- (100% - 25%) x 3.5 -- and you'll find out your after-tax return on your savings is just 2.6%. So don't borrow. It will cost you more to pay the financing than you will lose by just paying with good old cash.

More credit Foolishness: