Skip to content

Browser tool

Great-circle distance

The shortest distance between two points on the Earth’s surface, from their latitude and longitude, with the route drawn on a globe. Enter decimal degrees or degrees, minutes and seconds.

Points

Decimal degrees (41.0082) or degrees, minutes and seconds (41°00′29.5″N). Paste “latitude, longitude” into either field of a point to fill both.

Point A
Point B

Great-circle distance

Unit

8,069.8km

5,014.4 mi · 4,357.4 nmi

Initial bearing
309.3°, northwestleaving A
Final bearing
230.4°, southwestarriving at B
Midpoint
54.2545° N22.6744° W54°15′16.1″ N22°40′27.8″ W
Central angle
72.57°1.2667 rad
WGS-84 ellipsoid
8,090.1 km0.25% shorter on the sphereVincenty’s method
    The globe seen from far away, from an angle that shows the curve of the route. Solid line: the route from A to B. Dashed: the rest of its great circle. Dot: the midpoint.

    How it is calculated

    The haversine formula

    The Earth is taken as a sphere of radius R = 6,371.0088 km, the mean radius adopted by the International Union of Geodesy and Geophysics (IUGG). With latitudes φ1, φ2 and longitudes λ1, λ2 in radians, the central angle δ between the points follows from

    hav δ = sin2(Δφ/2) + cos φ1 cos φ2 sin2(Δλ/2)

    d = Rδ = 2R arcsin √hav δ

    Here hav θ = sin2(θ/2) is the haversine. Written this way the formula stays accurate for short distances, where the spherical law of cosines loses its digits to rounding.

    Bearings and the midpoint

    The initial bearing θ1, measured clockwise from north, is

    θ1 = atan2(sin Δλ cos φ2, cos φ1 sin φ2 − sin φ1 cos φ2 cos Δλ)

    The final bearing is the initial bearing from B back to A, turned by 180°. The midpoint is where the sum of the two position vectors, drawn from the center of the Earth, meets the surface.

    The ellipsoid line solves the same problem on WGS-84 (a = 6,378,137 m, f = 1/298.257223563) with Vincenty’s iterative method (1975), which accounts for the flattening of the Earth.

    Tips

    1. Many ways to write a coordinate. Decimal degrees (41.0082 or −33.8688), with a hemisphere letter before or after (41.0082 N, N 41.0082), degrees and decimal minutes (41°0.492′N) or full degrees, minutes and seconds (41°00′29.5″N). Plain ' and " work as minute and second marks. South and west take a minus sign or S and W; the Turkish letters K, G, D and B work too.

    2. Paste from a map. Map apps copy a location as “latitude, longitude”. Paste it into either field of a point and both fields are filled in. You can also pick a city from the menu.

    3. Why the route curves. A great circle is where a plane through the center of the Earth cuts its surface, and its arcs are the shortest paths on a sphere. Flat maps stretch them, which is why long flights seem to bend toward the poles.

    4. The bearing changes on the way. Unless you travel along a meridian or the equator, a great-circle route does not keep one compass heading, so the final bearing differs from the initial one. A route that keeps one heading, a rhumb line, is longer.

    5. How accurate is the sphere? The Earth is slightly flattened at the poles, so distances on a sphere with the mean radius differ from those on the WGS-84 ellipsoid, the one GPS uses, by up to about 0.6%. The ellipsoid figure comes from Vincenty’s method, accurate to about half a millimeter.

    6. Precision. The fourth decimal of a degree is about 11 m on the ground, and one second of arc is about 31 m of latitude, so four decimals or tenths of a second are plenty for cities.