When traveling in Tokyo a couple of years ago, I was struck by how few tourists there were. Sure, taking advice from an English-language website or guidebook could still lead you to a place with plenty of gaijin. But I didn’t have the sense of being surrounded by fellow tourists that one sometimes gets in Rome or Paris or Barcelona.

The statistics bear this out. Barcelona gets about twice as many international tourists each year as Tokyo. But that’s only part of the story. Barcelona’s metro-area population is about 4.7 million — compared to 39.4 million for Tokyo. Relative to the size of its population, Barcelona has about 16 times more tourists.

That’s the ratio you notice when walking around a city: how many of the people around you are tourists and how many are locals. We can also study this phenomenon at the country level, where the data is slightly more comprehensive. (Our focus will be on international tourists — not, for example, New Yorkers visiting the Grand Canyon.)

Countries vary in how welcoming, accessible and attractive they are to visitors. But as a general rule, the number of tourists doesn’t scale up linearly with the number of residents. China gets roughly 10 times more tourists than tiny Bahrain but has 1,000 times Bahrain’s population. That means Bahrain has about 100 times more tourists as a share of its population.

More formally, we might define this ratio as the tourist percentage — the number of international tourists in a country on an average day throughout the year as a share of the total number of people present:

To calculate tourist percentage, you need data on a country’s population and on the number of international tourists present on an average day. The population numbers are easy to find, but figuring out the number of tourists isn’t so simple.

The World Bank collects data on the annual number of international tourist arrivals in each country. (A tourist arrival, by the World Bank’s definition, occurs whenever someone enters a country from abroad and stays overnight. I used the most recent year of data available from the World Bank — usually 2012 — although had to turn to other sources in a couple of cases that I’ll note in the text below.) The challenge is in going from annual tourist arrivals to an estimate of how many tourists are present on an average day. If we knew how long the average tourist stayed, we could calculate it as follows:

But there isn’t comprehensive data on the duration of tourist visits. In 2010, the U.S. Travel Association estimated the average length of a vacation taken by an American as 3.8 days (and falling). But foreign trips are presumably longer than average vacations — and American workers receive less time off than people in most other countries, so their vacations may be shorter. A week — seven days — probably works better as an estimate of the average international trip.

But there’s another issue: The length of an average visit presumably varies some from country to country. Compare Austria and Australia, for example, the two countries that your fourth-grade teacher admonished you not to confuse.

Austria is a small country in the middle of Europe. It’s easy to pass through Austria en route to somewhere else — on a train from Munich to Venice, for example. The World Bank wouldn’t count that particular journey as a tourist visit unless you stayed in Austria overnight. Nevertheless, a night or two spent in Vienna might be just one hop on a longer European trip. Australia, by contrast, is a giant island thousands of miles from the world’s population centers. That’s part of what makes visiting there fun: You really feel like you’ve gotten away. But you probably don’t go to Australia just for a day or two.

So to estimate the average length of a tourist visit, I used another World Bank data series on the annual amount of tourism income in each country. The ratio of tourism income to tourist arrivals ought to provide a rough proxy for the length of a journey: You’ll spend more money on a two-week vacation than a weekend holiday. The ratio will also be affected by other factors, however, such as the strength of a country’s currency and the wealth of the people who visit it.

I ran a regression on the ratio of tourism spending to tourist visits as a function of two geographic factors: the number of land borders that a country has and its area. The regression implies that more isolated countries receive more money per visit, and that larger countries receive more money than smaller ones. These factors probably do tell us something about the average length of a visit; they imply that the average trip to Australia lasts about 50 percent longer than that the average trip elsewhere, for instance. We’ve estimated that the average international trip worldwide lasts seven days, so that means an average trip to Australia would last 10 to 11 days instead.

One country requires special handling: the Vatican. Lots of people visit it — in 2013, about 5.5 million people visited the Vatican Museums while 6.6 million attended some sort of public event with the Pope, such as in St. Peter’s Square. Even assuming that there was some overlap between these groups, that’s an awful lot of tourists in a country with a population of barely more than 800 people. On the other hand, visits to the Vatican are very short; there are no hotels there, so you need to have the invitation of the Pope or someone else important to stay there overnight. I assumed an average visit of four hours instead.

The Vatican still qualifies as a huge outlier relative to the rest of the world. My method estimates that there are about five tourists there on average for every one resident, or a tourist percentage of 83 percent. Surely the tourist percentage is higher still during the hours when the Vatican Museums are open or when the Pope is hosting a major public event.

Ranking second in the world is tiny Andorra, with a tourist percentage of 29 percent. The numbers drop off quickly after that; it’s about 11 percent in Palau and Bahrain, for example, 9 percent in the Bahamas and 8 percent in Monaco.

There’s an economic lesson here: Even in places whose economies are dominated by tourism, and where it may seem like you’re completely surrounded by tourists, you’ll generally find a number of locals for every tourist. Hotels can employ one employee per guest room or even more in parts of the world where labor is cheap but tourist dollars are plentiful. Tourists also need dining, transportation and entertainment options. Meanwhile, all the people who work in the tourism industry have families and needs of their own. This is why tourism is associated with a multiplier effect; it produces secondary and tertiary sources of income and employment in addition to the revenues received directly from tourists.

By contrast, tourists can represent a vanishingly small part of the population in large countries. This next chart lists the tourist percentage for the top 25 countries in the world by GDP:

Among these high-GDP countries, Spain ranks as the most touristy. On average throughout the year, about 2 percent of the people there are tourists, I estimate. (Obviously the percentage is going to be higher at certain places and times: during high season in Ibiza, for instance.) France is next at 1.7 percent, followed by Canada, the Netherlands, Italy and the United Kingdom. Australia isn’t far behind.

In Japan, however, the tourist percentage is only 0.2 percent. And it’s lower still in some other places: just 0.05 percent in China, 0.04 percent in Brazil, and 0.01 percent in India, meaning that only about 1 in 10,000 people is an international tourist there at any given time. These countries do attract reasonable numbers of tourists — but their native populations are very large, so tourists represent a tiny fraction of the population.

Some countries outside the top 25 in GDP undoubtedly have lower tourist percentages still. Afghanistan gets an estimated 3,500 tourists per year, for example, compared with a population of 30 million. Assuming an average visit there lasts seven days, that implies a tourist ratio of 0.0002 percent, or about one tourist for every 500,000 Afghanis. However, countries with very limited tourist economies generally don’t publish reliable data on the industry, so it’s hard to know exactly which country ranks at the bottom.

Those countries probably aren’t at the top of most tourists’ bucket lists anyway. But Brazil, China, India and Japan have incredible experiences to offer. The choice is clear: If you want to get away from tourist traps, go to places where there are more locals.