Straight-line distance calculator

The direct distance between two cities — as the crow flies — in kilometres, miles and nautical miles, computed with the haversine formula from city coordinates. For trip planning, follow the links to the real road distance and drive time.

Straight line
Miles
Nautical miles

City list: the 170 largest cities in Germany and Europe from our dataset (OpenStreetMap/GeoNames).

Quick answer: The straight-line ("as the crow flies") distance is the shortest path between two points on the Earth's surface, computed with the haversine formula. Roads are typically 20–40 % longer — Berlin to Hamburg is 256 km in a straight line but 290 km by road.

Straight line vs. road: real examples

RouteStraight lineBy roadDetour
Berlin – Hamburg256 km290 km+13 %
Cologne – Munich456 km575 km+26 %
Munich – Zurich242 km314 km+30 %
Hamburg – Copenhagen289 km469 km+62 %

The detour factor depends on terrain: flat plains ~1.15, Alpine routes ~1.3, and wherever water forces a detour (Hamburg–Copenhagen via the Belt bridges) well above 1.5.

How the haversine formula works

Treating the Earth as a sphere of radius 6,371 km, the haversine formula computes the great-circle arc between two coordinate pairs:

d = 2r · arcsin(√(sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2)))

The error versus the true ellipsoid is under 0.5 % — a few hundred metres for typical city pairs. Different sites disagree slightly because they also pick different reference points for a city (town hall, centre, centroid); we use GeoNames city coordinates.

Where straight-line distance actually matters

For trip planning, always switch to the road figure — every city-pair page shows both, e.g.Berlin–Hamburg: 256 km straight line vs 290 km by road.

Why planes don't fly the straight line either

Aircraft follow airways and waypoints, dodge weather and restricted airspace, and loop around airports on departure and approach — adding 5–15 % on short-haul. On long-haul the great circle wins visibly: Frankfurt–Tokyo routes arc far "north" on a flat map because on the globe that IS the shortest path. This calculator computes on the sphere, so its numbers are correct for any distance.

Frequently asked questions

How is straight-line distance calculated?

With the haversine formula: from the coordinates of both places (latitude and longitude), it computes the great-circle arc across the Earth's surface — the shortest possible path. That's exactly what this calculator does.

What's the difference between straight-line and driving distance?

The straight line ignores roads; the driving route follows them and is typically 20–40 % longer. Berlin–Hamburg: 256 km as the crow flies, but 290 km by road.

Can I measure straight-line distance in Google Maps?

Yes: right-click the start point → “Measure distance” → click the destination. For city pairs this calculator is faster — and we link straight to the real road distance with driving time.

How many kilometres is a nautical mile?

Exactly 1.852 km. The calculator shows results in kilometres, statute miles (1.609 km) and nautical miles.

More calculators

Driving Time CalculatorSpeed CalculatorTaxi Fare CalculatorTrip Cost CalculatorAll calculators →