FUN, adventure, the aphrodisiac effect of a foreign accent—these are why 4.3m university students study abroad. Oh yes, and the need to prepare oneself for a global career. Worldwide, the number of migrants with mortar boards has more than doubled since 2000. And the number of foreign students at universities in America has risen by 40% over the past decade to a high of 819,644 in the 2012/13 academic year, says a new report from the Institute of International Education (IIE). Over the decade to 2011/12 the number of Americans studying abroad has risen by 76%, to 283,000 (see chart). Students from China are the largest foreign contingent on American campuses—more than a quarter of the total and up by more than a fifth in a single year. Students from India and South Korea come next, but their numbers are declining, partly because more are heading to China to study, and partly because America has made it harder for foreigners to get work visas after they graduate. The dip in the number of Indians and Koreans at American universities is smaller, however, than the increase in the number of Brazilians and Saudis. The latter now make up the fourth-largest group of foreign students in America.

Ben Wildavsky, author of “The Great Brain Race”, says the global education marketplace is becoming more competitive. America is still the favourite destination for foreign students, but its market share fell from 23% in 2000 to 17% in 2011. Colleges in other countries have made themselves more attractive. Many now offer courses in English, regardless of the native tongue. They are also recruiting hard.

The competition is hardly zero-sum—Mr Wildavsky writes of a “free trade in minds” with the benefits widely shared. Colleges love foreign students because they tend to pay full fees. The IIE estimates that they contributed $24 billion to the American economy in the most recent academic year. The indirect benefits are probably greater: clever minds, wherever they are from, tend to produce clever research.

America is not trying to poach foreign brainpower, says the State Department. Rather, it wants to send foreign students home with fond memories and useful skills. Employers, by contrast, would like them to stay. But many are kicked out as soon as they graduate. As Barack Obama lamented last month, “It’s not smart to invite some of the brightest minds from around the world to study here and then not let them start businesses here.”

Foreign students tend to study in fields where America has skills shortages, like engineering, maths and science. Take Jared Ye, who came to America from Shenzhen and studied applied maths and economics at Rice University. He is now pursuing a PhD at Cornell University. “I have no plans to go back to China soon,” he says; on graduation he wants to work in America. About two-thirds of foreigners who earn doctorates remain in the country.

American students seem to take a more laid-back approach to foreign study than their Asian peers. Just 9% of them study abroad as undergraduates. After increasing for years, the numbers are levelling off. Those who do venture out tend to choose agreeable destinations such as Britain (12.2%), Italy (10.5%), Spain (9.3%) or France (6.1%), rather than strategically important ones such as China (5.3%). India does not even make the top ten, and the Middle East outside Israel is about as popular as spring break in North Dakota.

Allan Goodman, the president of IIE, thinks more Americans should study abroad. Passports should be as ubiquitous as student IDs, he says. Foreign colleges offer lower fees, lower drinking ages and cross-cultural experience. However, few have the prestige of the Ivy League.