Nearly half the world’s land drains into a river that crosses a border. I mapped the 313 shared basins and the countries in each, measured the great rivers on one map, and found that the longest river in the world depends on who is holding the ruler.
Rivers are indifferent to borders. A raindrop on the Ethiopian highlands can end up in the Mediterranean after crossing Sudan and Egypt; the Danube rises in the Black Forest and flows past Vienna, Bratislava, Budapest and Belgrade before it reaches the Black Sea. All the land that drains to one river is its basin, and when a basin spans more than one country, what happens upstream reaches everyone below.
Researchers at Oregon State University keep the register of these shared basins in the Transboundary Freshwater Dispute Database. Its latest version lists 313 of them. Put together, they drain 47% of the world’s land outside Antarctica, and in 2022 they were home to 3.6 billion people, 45% of everyone alive.

Mostly two neighbours, and then the Danube
Most shared basins are modest affairs: 235 of the 313 are shared by just two countries, often a short river that crosses a long border. Only 18 are shared by five or more. At the top is the Danube, whose basin reaches into 19 countries. The Nile and the Niger are shared by 11 each, the Congo by 10, and the Rhine and Meuse by 9.

Counting countries flatters some basins. Several of the Danube’s nineteen hold a sliver at the edge, and even Romania, the biggest piece, has only 29% of it. Elsewhere one country dominates: Brazil holds 63% of the Amazon basin, and the Democratic Republic of the Congo 62% of the Congo’s.

For 32 countries, at least 99% of the land lies in a shared basin. Hungary, Paraguay, Rwanda and Laos are, hydrologically, entirely joined to their neighbours. And the most crowded basins are Asian: the Ganges, Brahmaputra and Meghna basin holds 849 million people, more than the Nile (291 million) and the Indus (245 million) put together.
How long is a river?
The pub quiz answer is the Nile, and if you have been to a different pub, the Amazon. The honest answer is that it depends, because measuring a river means making three decisions that nobody has agreed on. Where is the source, when a river has many headwaters? Where is the mouth, when it meets the sea through an estuary or a delta? And how closely do you follow the bends?
To compare like with like, I measured every river system on one map, the Natural Earth 1:10 million river lines, joining them into a network and following each system from its mouth back to its most distant source. On that map the Nile comes first at 6,151 km, then the Yangtze (5,320 km), the Amazon (5,230 km) and the Mississippi-Missouri (5,125 km).

Every one of those numbers is shorter than the one in an atlas. Britannica gives the Nile as about 6,650 km and the Amazon as 6,400 km. My map lengths are 92% and 82% of those. That is not an error so much as the nature of the thing. A map at 1:10 million has smoothed away the smaller bends, and the coarser the map, the shorter the river. On Natural Earth’s 1:50 million lines the same paths lose about a tenth of their length again, and if I keep simplifying the lines they keep shrinking, with no point at which they settle on a true length.

Sources and mouths matter just as much. Natural Earth’s Amazon follows the Ucayali up into the Andes of southern Peru, close to where most accounts place its source, but its coastline opens into the Amazon’s enormous estuary well before the open sea, so the river ends early. The long-running argument over whether the Amazon beats the Nile turns largely on that estuary, and on whether it counts the channel past the Pará. The Nile, meanwhile, is measured up the White Nile and Lake Victoria to the headwaters of the Kagera in Burundi. Follow the Blue Nile to Ethiopia instead, which carries most of the water, and the Nile system is 4,708 km on the same map.

The Nile and the Amazon are close enough that the choices, not the rivers, decide which is longer.
A river’s own course crosses fewer countries than its basin. On the same map the Danube flows through or along 9 countries, the Mekong and the Rhine 6 each. The usual count for the Danube is ten, and the one it misses is a lovely illustration of map scale: Moldova’s stretch of Danube bank is so short that on Natural Earth’s map its border stops 1.7 km short of the river.
Living downstream
Sharing a basin matters most at the bottom of it. The UN Food and Agriculture Organization’s AQUASTAT database estimates how much of each country’s renewable water comes from outside its borders, in rivers that flow in and groundwater that seeps across. For 38 of the 191 countries with a figure, it is more than half. Egypt (97%) and Sudan (96%) live on the Nile, Turkmenistan (97%) on the Amu Darya, Bangladesh (91%) at the foot of the Ganges and Brahmaputra, and Hungary (94%) and the Netherlands (88%) at the lower ends of the Danube and the Rhine.

The top of that list is two countries without rivers at all: Kuwait and Bahrain, whose small natural supply is counted as groundwater from outside. After them come the deltas and dry lowlands at the ends of long rivers. None of this says whether neighbours cooperate or quarrel over their water; the same database also records hundreds of treaties, which is another story.
How I did this
The basins come from the Transboundary Freshwater Dispute Database: its 2024 register of 313 basins with their countries and population, and its 2018 maps of 310 of them, split by country. I count sovereign countries and leave out the disputed areas the database also lists, such as Abyei and Aksai Chin. The rivers are Natural Earth’s 1:10 million river lines, which I joined into a network, with canals and two channels that link separate rivers left out. Each system’s length runs from its mouth at the sea, or at a terminal lake such as the Aral Sea, to its most distant source. The water figures are AQUASTAT’s dependency ratio for 2013 to 2017, from a 2017 download. The paper sets out every step and every caveat.
These are map lengths, consistently measured, not survey lengths, and the published lengths are there only to show how far apart the two can be. A shared basin is a fact of geography, not a measure of friendship or conflict.
Notes and sources
- Transboundary Freshwater Dispute Database, Oregon State University: International River Basins register (2024) and spatial update (2018; McCracken and Wolf, 2019, International Journal of Water Resources Development). Used with credit for non-commercial research.
- Natural Earth 1:10m and 1:50m rivers and lake centrelines, lakes, land and countries. Public domain.
- FAO AQUASTAT, dependency ratio, values for 2013 to 2017. CC BY-NC-SA 3.0 IGO.
- World Bank, World Development Indicators, total population. CC BY 4.0.
- Published lengths: Encyclopaedia Britannica, Nile River, Amazon River and Yangtze River.
- I wrote the text, with drafting and editing assistance from Claude (Anthropic), which also helped prepare the analysis code. I reviewed and checked all text and results.

