Have you ever ended up with a much higher hotel bill than you expected? Unless you went crazy with the room service or the minibar, that extra charge is probably the hotel tax kicking in. Hotel taxes vary from state to state, and some localities add their own hotel tax on top of the state tax. But wait, there's more: In most states you'll pay sales tax on your hotel room, and some hotels tack other extra fees onto the back end of your transaction. Until this practice changes, a little research is the best way to avoid any last-minute surprises on your hotel bill.

Finding Those Pesky Taxes

Whether you call them lodging taxes, tourist taxes, room taxes or hotel taxes, that extra percentage the state collects falls into the more general category of "occupancy taxes or fees." Depending on where you travel, you may also see these fees assessed on peer-to-peer lodging systems like AirBnB.

Often, you can spot occupancy taxes if you just watch the fine print as you finalize your hotel room booking; then you'll be aware that it's coming down the pike so you're not disappointed when a previously sweet price goes slightly sour. You can also look up any state's occupancy tax on that state's website or at the website for the National Conference of State Legislatures. Remember, some communities may assess local occupancy taxes too; you'll usually find those listed on the website for the local chamber of commerce.

Calculating Occupancy Taxes

If you want to calculate the amount of a hotel tax for yourself, the process is simple. First, convert the percentage of the hotel tax to a decimal by adding a zero in front of the number – not behind it – and then shifting the decimal point two spaces to the left. So if the hotel tax where you're visiting is 5.5 percent, you'd add the zero in front – 05.5 – then end up with .055 after you shift the decimal point.

Now, multiply that decimal by the pretax cost of the room to find out how much the hotel tax will add to your bill. So if the room costs $169 before tax at a rate of 0.055, your hotel tax will add 169 x 0.055 = $9.295, or an extra $9.30 per night.

What About Other Fees?

It's not unheard of to end up in a hotel that assesses both state and local occupancy taxes, as well as a state or local sales tax. But calculating all of that isn't as awful as it sounds. Because all the taxes are being assessed on the same amount – the base price of the hotel room – you can add them all together to get one percentage for the total tax you'll pay.

So if the state hotel tax is 7 percent, the local hotel tax is 5 percent and you're also paying a state sales tax of 3 percent on the room, your total tax load will be 7 percent + 5 percent + 3 percent = 15 percent. Now, do the calculation described above to calculate what that'll cost you. (On a $169 room that ends up being $169 x 0.15 = $25.35 extra per night is added.)

Read the Fine Print

There's one more depressing thing you should know about hotels: Sometimes they tack their very own fees on top of the taxes you're already paying. These are often called resort fees, and were once used for the upkeep of high-end resorts. But nowadays, you may see this fee tacked on for relative mundanities like shuttle service, WiFi, access to the fitness room or the newspaper at your door.

In a few sneaky cases, the fine print on your hotel booking might even say that those fees won't be assessed until you check out, so they really do come as a complete surprise. Give yourself a hand by reading the fine print every time you book a room – yes it's a pain, but it's worth it to avoid surprises – and calling the hotel to ask for a written or emailed quote of exactly what you'll pay for the room once all taxes and fees are included.

The good news is that you have a chance to negotiate those fees down. Sometimes, just asking for them to be reduced is enough, especially if you're traveling when business is slow and the hotel really wants your booking. If you're traveling during peak season, the hotel would have no problem selling your room to someone else – but you might still get the extra fees waived if you make it clear that you won't be using whatever services they're supposed to cover. Oh, and if the staff says they can't make this kind of change, talk to a manager; they can.