Smartphone owners spend an average of more than three hours per day using their devices. That doesn’t necessarily stop when they go on vacations or work trips outside of their home countries. But if it’s not done right, international mobile internet access can be sketchy and it can cost a lot.

Here’s everything you need to know to get affordable access to data while abroad.

Find out what you’re working with

International roaming has gotten easier and cheaper over the past few years, but some older phones may still have issues. The vast majority of smartphones in the world run on a common type of network called GSM, but some older phones from the US and other countries use a different, incompatible technology called CDMA, which could limit where they might work. (Most newer phones sold by CDMA carriers, including Verizon and Sprint in the US, are “world phones” that can use GSM networks.) When it comes to newer, faster “4G” networks, most operators use a format called LTE, which has other compatibility issues between wireless bands. But roaming often still happens on older, slower networks.

If you know your phone will work where you’re traveling, next check to see if your phone is unlocked, which would allow you to switch SIM cards to another operator. Many carriers still lock phones to their networks, especially when they subsidize the price. In the US, nearly all Verizon Wireless smartphones are sold unlocked. Some providers, such as Vodafone in the UK, also need to be told if you’re leaving the country, so make sure to check if you need to let your provider know before you leave. If you bought your phone unlocked, or have unlocked it through an unlocking service, then you’re all set.

Figure out what your provider offers

Most mobile providers have international partners and offer international calling and data plans. And while they continue to come down in price, most are pretty expensive—and some are absurd. In the US, for example, AT&T charges $30 for 120 megabytes of international data use—which could last hours or days, depending on your mobile-data frugality. Sprint is worse, charging $80 for just 85 MB of international data. WIND in Canada charges C$8 ($7) per day to lower its international data rate to C$1 per megabyte—which is still rather expensive. The worst are plans or countries that still charge very high amounts per megabyte. In the United Arab Emirates, for example, Verizon Wireless still charges $20.48 per megabyte, which is prohibitively expensive for almost all uses.

Some providers offer a flat daily rate for international use, on top of regular charges. Vodafone in the UK charges £5 ($8) extra a day when you use its phones abroad. The European Union recently slashed data maximum roaming rates allowed across the region, so if you’re traveling from one EU country to another, you can find out the maximum that your provider can charge you.

There are a few providers that have international roaming—to select countries—included at no cost in their plans. Recently, T-Mobile in the US started offering unlimited roaming to over 120 countries, with the catch that download and upload speeds are capped at slow speeds. (It’s fine for most uses, including email, maps, and social media, but it won’t work for video or VoIP calls. But you can pay more for faster speeds—$50 for 500 MB over 2 weeks.) Three in the UK offers free roaming in some other countries, such as the US, France and Australia. Japan’s SoftBank recently launched a promotion that allows customers to pay the same rates when using Sprint’s US network (which SoftBank owns.)

Buying a phone abroad

If all you want to do is make calls while you’re abroad, there are some countries where you can buy a cheap pay-as-you-go phone. In the UK, you can pick up a simple phone for just 99p ($1.50). Some of them even have some amazing Siri-like features. In most countries, however, the cheapest phones won’t be less than about $50, so it would make sense just to stick with getting a new SIM-card for your own phone, or using a Wi-Fi-calling app on your smartphone.

Buying a SIM abroad

If you’re going to be somewhere for more than a week, or plan to use a lot of data, it may be worth buying a local SIM card. At London’s Heathrow Airport, for example, you can buy a variety of SIM cards from vending machines after baggage claim.

For the best deals, you’ll be better off heading to the local high street or mega-mall. With Vodafone UK, for example, you can buy a £10 ($16) top-up and get 500 MB of data and 100 minutes that you can use for 30 days. In France, Orange sells prepaid SIM cards at its stores, and 500 MB data top-ups for €10 ($12). If you’re visiting the US, T-Mobile offers prepaid SIM cards for $10, with an option to pay by the day for unlimited data for $3 a day. In Japan, B-Mobile offers relatively inexpensive data-only service to foreign visitors.

Some providers, like Three in the UK, also offer short-term contracts that you can cancel after the first month that are equally affordable. Just don’t forget to cancel them when you leave the country. China Mobile offers a SIM that works in Hong Kong and mainland China for 90 days for HK$120 ($15).

Some countries have mobile resellers, like the UK’s Carphone Warehouse, which will have options for multiple mobile providers. Find a sales representative and ask them to help you figure out which option works best for you. If the country doesn’t have resellers, many will still have standalone stores for each mobile provider. If you’re buying a SIM for your phone, figure out which providers are compatible with your phone before you go in. If you don’t speak the language, it might be helpful to write down some basic requests, like “nano-SIM, 1 GB data”—or look for their sales pamphlets.

If you’d rather have everything sorted out before leave home, GigSky is another option. For $19.95, they’ll provide you with a SIM that lets you access data networks in most countries. But their rates are generally higher than buying a SIM from a local provider.

There are some downsides to using a foreign SIM. Most notably, unless your phone has two SIM slots, you likely won’t have access to your home number, or calls or text messages that go to it. And certain services tied to your home number, including Apple iMessage and WhatsApp, may need to be reconfigured—an annoyance at best.

Reuters/Luke MacGregor An O2 mobile store in the UK. Mobile stores are often clumped together, so make sure to shop around.

Many countries ask for a passport for identification when you buy a mobile service. In some countries, such as South Korea and South Africa, it’s difficult to purchase any mobile service without a local address or a visa that lasts longer than 90 days. If you have a friend in the country you’re visiting, ask them if you can use their address to sign up for an account. If you have no contacts, check to see if there are options to rent a phone from a local provider. Otherwise, you may have to rely on Skype and messaging apps over Wi-Fi, or whatever roaming your home provider offers.

Using your phone

Make sure to test out your new SIM card before you leave the store. Usually, you’ll need to restart your phone before the new service will start working. (Sometimes, it could take hours to activate—less ideal.) It’s a good idea to send a text or call someone just to make sure everything is working. You’ll also need to figure out the country dialing code for the country you’re in so that people back home will know how to reach you.

Penalty fares for going over data limits are severe on most carriers, so make sure to choose a plan that will cover the amount of data you’re likely to use while abroad. AT&T has a calculator to help you estimate how much data you use if you’re not sure. It’s probably best to avoid doing anything too data-heavy while abroad, like streaming music or videos, or downloading games.

Calling home will be expensive on almost any plan you purchase. You can check to see if the provider you’re using offers any international dialing plans that you can add on to your service. In the US, AT&T’s international dialing plan is an additional $5 a month. In the UK, you can add an international dialing package to a PAYG plan for £10 ($16). Alternatively, you can stick to Wi-Fi options, like Skype or Apple’s FaceTime.

There are also apps you can use to call from abroad. Roamer lets you make and receive calls from your regular number, even while you’re out of the country. Vonage also offers cheap VoIP calls through its apps for iOS and Android phones.

Other things not to forget