Traveling abroad is a fun, exciting experience where you can take in history, new cultures, exotic cuisine and learn about the world. Nevertheless, when you travel, you usually can’t use the U.S. dollar. Getting foreign currency can be easy, but you should be cautious of where you exchange your dollars so you aren’t stuck with a bad exchange rate. (For more, see: The Best Places To Exchange Currency.)

How Foreign Currency Exchange Works

Foreign exchange rates are constantly fluctuating because the global economy is active twenty-four hours per day. As economies strengthen and weaken, currencies experience inflation and deflation, and trade deficits grow and shrink, the relative value between currencies moves up and down. Financial institutions, investors and speculators are constantly buying and selling large lots of currencies, which creates the current market exchange rate between two currencies. In general, currency exchange rates are quoted against the United States dollar, pound sterling, euro and Swiss franc as those are the most stable and widely used currencies for large business transactions.

When you travel abroad and want to buy something in the local currency, you typically exchange a relatively small amount of currency and pay a higher exchange rate so the currency exchange can earn a small profit. Not all currency exchanges charge the same rate, and businesses take advantage of needy travelers in areas flush with tourists to turn a profit. (For more, see: 6 Factors That Influence Exchange Rates.)

Where to Get the Worst Rate: The Airport

The first place nearly all travelers go in a new country is the airport terminal, and that is the first place where you will have an opportunity to exchange currency. Airport-based currency exchange shops know that you might need local currency to catch a bus, train, or taxi, so they make big profits offering you the worst exchange rate.

Avoid these currency exchanges if possible by getting currency in advance from a local bank or going to an in-airport bank or ATM. Also remember that many credit cards do not charge an extra foreign exchange fee, and you will get your bank’s rate if you use a card like that for a purchase.

Where to Get Bad Rates: Currency Exchange Stores

Once you get out of the airport, you may find yourself in a market, bazaar or popular tourist area. Exchange shops try to operate where you will need them and take advantage of tourists to make a profit.You will probably find better rates than the airport at a dedicated currency exchange. However, even though the rates are better, you’re still likely getting a bad deal.

Where to Get Good Rates: ATMs and Local Banks

If you want to find the best rates around, look for a local ATM or bank. Many foreign banks are happy to exchange your dollars for local currency for a better rate than you find elsewhere, or you can go to an ATM to skip the line. My bank offers foreign ATM fee refunds and charges no fees for using a foreign ATM, so if I need cash I just whip out my debit card, find the closest bank ATM – not an ATM kiosk in a mall or supermarket – and rest easy knowing I received the best rate for my dollars.

If you keep your eyes open, most major cities have banks all over the central business district, bustling neighborhoods, and even in the airport. Even if you have to pay a small ATM fee, you can easily make up for the bad exchange rate you’ll find at the airport or a currency exchange store if you get enough cash. If you follow that plan, you can enjoy your travels and focus on the fun parts rather than stressing about getting ripped off on a currency exchange.