Great circle distance calculator

The shortest route between two points on Earth, drawn on a globe next to the constant-heading rhumb line, with haversine and ellipsoidal (Vincenty) results.

Great circle

51.5072°, -0.1275° · Europe/London

35.6850°, 139.7514° · Asia/Tokyo

Distance as the crow flies
9,585km
Miles
5,956mi
Initial bearing
32°NNE
Flight time
12 h 29 min
Time difference
+8 h
Rhumb line (constant heading)
11,301km

WGS-84 ellipsoid (Vincenty). Spherical haversine gives 9,561 km. Flight time assumes 800 km/h cruise + 30 min for taxi, climb and descent.

Great circle (shortest)Rhumb line (constant compass heading)

How the haversine formula works, step by step

Change the coordinates and press “Next step” to watch the distance being built up from four small operations.

Point 1 (default: London Heathrow)
Point 2 (default: New York JFK)
  1. Step 1. Convert degrees to radians

    φ₁ = 51.4700° × π/180 = 0.89832, φ₂ = 0.70932. Δφ = -0.18900, Δλ = -1.27974 rad.

    Trig functions work in radians; φ is latitude and λ is longitude.

  2. Step 2. Compute the haversine term a

    a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2) = 0.00890 + 0.16852 = 0.17742

  3. Step 3. Turn a into the central angle c

    c = 2 · atan2(√a, √(1−a)) = 0.86957 rad = 49.823°

  4. Step 4. Multiply by the Earth’s radius

    d = R · c = 6371.0088 km × 0.86957 = 5,540.0 km

Great circle vs rhumb line

A navigator in the age of sail often followed a rhumb line: one compass heading all the way. It is simple to steer and appears as a straight line on a Mercator chart. But a rhumb line between distant points at similar latitudes is longer than the great circle, which crosses each meridian at a slightly different angle. London to Tokyo is about 9,560 km along the great circle and about 11,300 km along the rhumb line, which is why the flight goes over Scandinavia and Siberia rather than due east.

The difference disappears for routes that run along the equator or straight north–south, and it is small for short hops. It is largest for long east–west routes at high latitudes.

The formula

a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2)
c = 2 · atan2(√a, √(1−a))
d = R · c

Here φ is latitude, λ is longitude (both in radians) and R is the Earth’s mean radius, 6,371 km (3,959 miles, or 3,440 nautical miles). For the ellipsoid version, Thaddeus Vincenty published an iterative method in 1975 that remains the standard for surveying-grade distances.

Frequently asked questions

What is a great circle?

Any circle on a sphere whose centre is the centre of the sphere, such as the equator or any line of longitude paired with its opposite. The shorter arc of the great circle through two points is the shortest path between them on the surface.

What is the haversine formula?

A formula that gives the great-circle distance between two latitude/longitude points on a sphere. It uses the haversine function, hav(θ) = sin²(θ/2), which stays numerically stable for small distances where the older spherical law of cosines loses precision.

Haversine or Vincenty: which is more accurate?

Vincenty’s formula works on the WGS-84 ellipsoid and is accurate to about half a millimetre. Haversine assumes a perfect sphere, so it can be off by up to about 0.5% (a few kilometres on intercontinental routes). CoordKit shows both.

What is a rhumb line?

A path that crosses every meridian at the same angle, so you can follow it holding one compass heading. It is a straight line on a Mercator chart but longer than the great circle, except along the equator or a meridian.

Is a great circle route the one planes actually fly?

It is the starting point. Airlines adjust for jet-stream winds, airspace restrictions and ETOPS rules for twin-engine aircraft over oceans, so the flown track can be tens or hundreds of kilometres longer.

More CoordKit tools