Couple shopping for car © ThinkStock, Jupiterimages

Buying a car is a little like going to see a magic show. In each situation, you expect to be tricked. With a magic show, of course, you're disappointed if you're not. When buying a car, you do everything you can to avoid it.

The sleight of hand that goes on at dealerships and with private owners is not always intentional. Everyone understands that if you're going to buy a car, you're going to lose an arm and a leg (like the female sidekick climbing into the magician's box). But nobody wants to buy a car with hidden costs and spend hundreds or thousands more than intended in finance charges, fees and mechanical problems.

Entire books are written about buying a car, so what follows isn't a complete list. But if you're in the market for a car, consider these hidden costs before signing on the dotted line.

Finance charges

You probably don't have $31,252 lying around, which was the average transaction price for a new car during the summer of 2013, according to the car-buying website truecar.com. So if you're taking out a loan for $31,000 already, keep in mind that you're likely going to spend a couple or many thousands of dollars more in interest charges.

This is why many car experts suggest getting your financing before shopping.

"I would go to the local banks to try and get your financing there first. If the dealer can beat that, great, but at least you've done your homework first," says Langley Steinert, founder of cargurus.com, a search engine that alerts users if the car they're considering is a great deal, a good one or not at all.

Fees

These will vary depending on your state and whether you're buying a new car or used car. (Used car dealers usually charge more fees.) You may be saddled with a vehicle registration fee, title fee, license fee, documentation fee, compliance fee, emissions testing fee, floor plan fee, advertising fee and dealer preparation fee. The sales tax isn't a fee or a hidden cost, but factor that in as well.

Some of these fees will sound crazy to you. The floor plan fee, for example, covers the cost of keeping the car in the dealer's inventory.

The advertising fee is tacked on because the dealership had to attract you via advertising – and you're expected to pony up. It is legitimate, but sometimes dealers will add their own advertising fee on top of the first one. You might have luck getting the second one removed.

A lot of fees are of the nickel-and-dime variety, but the destination and delivery fee punches a wallop. "D and D includes full shipping and destination costs," says Michael Caudill, an auto expert who owns Driven Public Relations, a Temecula, Calif.-based public relations firm. He says this fee can range from $500 to $1,000, depending on the manufacturer.

In other words, shipping the car from the manufacturer to the dealer costs money – and you're the one who pays. Which makes sense, but one wonders why a dealer wouldn't add that to the price of the car rather than charging it as a fee and antagonizing the customer. But according to the car resource Kelley Blue Book, the federal government requires the destination and delivery fee, and other fees, to be itemized on the sticker price. This fee is difficult to get removed.

Still, it's better to be aware of the fees early on because that may help you negotiate the price of the car ever downward.

Even if you become aware at the last minute and look through the fees while you're in the finance office, don't be afraid to insist on the removal of a fee. Some fees will be immovable, but a manager may buckle on others if you look like you're ready to flee.

Add-ons

Look out for these when you’re inside the finance manager’s office. "I always like to tell consumers that the finance manager is simply another salesperson at the dealership. They just happen to have a different title," Caudill says.

It's here, he adds, that a finance manager will suggest you get credit insurance, extended warranties and anti-theft devices.

"These are all upsells, and if the finance manager makes the sales, the dealership gets a cut," Caudill says.

And anything you buy, like credit insurance – an expensive form of insurance that will cover your car payments if you can't – will add to the cost of financing your car.

"Never, I repeat, never buy an extended warranty on a new vehicle," Caudill advises. "You're already covered bumper to bumper at three years or 36,000 miles [whichever comes first]. Wait to see how the car operates. If it's a lemon, you’ll be able to file a claim. If the car runs like a top, you can option for an extended warranty toward the end of your loan, and sometimes it may be more affordable.

"And don’t prepay oil and tire rotation fees as well," Caudill adds. "I have found them to be too expensive even when bundled."

Buying the wrong car

Particularly if you're looking for a used car, take your time and research what you're getting. Carfax.com, which sells vehicle history reports for $40 a pop (but you can look at many for free at online car-selling websites or dealerships), is a well-known tool for buying a used car, and for good reason: It can provide a history of the vehicle, so you can find out if the 12-year-old car you're considering belonged to one owner – or nine.

The report also can offer clues that might indicate the odometer was rolled back to make the car seem more dependable than it is.

"We estimate more than 1 million cars are on the road right now with an odometer rollback," Carfax spokesman Chris Basso says. "The cost of buying one of these cars is, on average, $4,000. That figure represents a combination of lost value and, perhaps more important, repair costs that the buyer will likely incur sooner than expected."

According to the Bureau of Labor Statistics, U.S. households spend an average of $2,132 a year on car repair and maintenance. Buy a lemon, and you may spend more.

Steinert says many consumers spend more than they need to by not looking for cars farther from their home – say, 100 miles away.

"Sure, it may take 90 minutes to get to a dealership farther away, but if you can save $2,000 on a car, new or used, it's probably worth it," Steinert says. "We've done a lot of analysis that you can get substantial savings by going beyond your typical ZIP code."

He also says cars are often cheaper in the city versus the countryside because more dealerships are competing with each other to get your business.

Of course, you could drive yourself insane debating the hidden costs that may or may not come with your new or new-to-you car. So eventually stop worrying, and buy a car already. Still, it's a worthy goal to avoid as many hidden costs as possible. If you can feel smart about how much you're paying for your car, that may be the best trick of all.

Click here to become a fan of MSN Money on Facebook

More from U.S. News & World Report