Maps

Distance & Bearing Calculator — Great Circle Between Coordinates

Measure distance and bearing between coordinates, see the great-circle route on a map, and find a destination point.

Runs entirely in your browser — nothing you paste is uploaded or stored.

Map100%
Units
Distance (WGS 84 ellipsoid)
5,554.9 km3,451.7 mi · 2,999.4 nmi
Initial bearing
287.98° (WNW)The direction to set off in, clockwise from true north
Final bearing
231.38° (SW)The direction you are heading on arrival; it differs because the great circle curves
Great circle on a sphere
5,540.0 kmHaversine with a mean radius of 6,371 km — 0.27% less than the ellipsoid
Rhumb line (constant bearing)
5,758.6 km on 257.93° (WSW)3.95% longer than the great circle; a straight line on a Mercator map
Midpoint
52.216674, -41.30267152°13′00.0″N 41°18′09.6″W

Destination point — where a bearing and distance take you

Arrive at
57.296705, 11.30921257°17′48.1″N 11°18′33.2″E
Final bearing
54.59° (NE)

What is distance & bearing calculator?

The shortest route between two places on the Earth is a great circle, which is why a flight from London to New York heads out north-west over Ireland and arrives from the north-east, and why it looks curved on a flat map. This calculator measures that route between any two or more points: the distance on the WGS 84 ellipsoid with Vincenty's formulae, accurate to under a millimetre, the initial bearing to set off on and the final bearing on arrival, and the halfway point. Alongside it shows the spherical great-circle distance most code computes with the haversine formula, and the rhumb line — the route that keeps one compass bearing all the way, which is a straight line on a Mercator map and always a little longer. Enter coordinates in decimal degrees or degrees-minutes-seconds, with names if you like, or click the map to add points. With three or more points it adds up a whole route leg by leg. A destination calculator answers the opposite question: where you end up after a given distance on a given bearing. Everything is calculated in your browser.

When to use it

  • Checking the great-circle distance between two airports, ports or cities in kilometres, statute miles or nautical miles.
  • Verifying a haversine or geodesic distance your own code returns, against an ellipsoidal result accurate to the millimetre.
  • Finding the initial compass bearing to steer, or the bearing from one survey mark to another.
  • Adding up the length of a multi-stop route, such as a road trip or a flight with stopovers.
  • Working out a destination point from a start, a bearing and a distance, for search patterns, drone flights or geocaching puzzles.

How to use this tool

  1. Type or paste points, one per line. Use decimal degrees (51.4700, -0.4543) or degrees-minutes-seconds (51°28′12″N 0°27′15″W), and add a name with a colon in front if you like.
  2. Or click anywhere on the map to add a point there.
  3. With two points, read the distance, the initial and final bearings, the spherical and rhumb-line comparisons and the midpoint. With more, read each leg in the table and the total above it.
  4. Switch the units between kilometres, miles, nautical miles and metres, and turn the dashed rhumb line on or off.
  5. Under Destination point, pick a start, enter a bearing and a distance, and add the result to the list to see the leg on the map.

Example

London Heathrow to New York JFK, the built-in example.

Input

London Heathrow: 51.4700, -0.4543
New York JFK: 40.6413, -73.7781

Output

Distance 5,554.9 km (3,451.7 mi, 2,999.4 nmi) on the WGS 84 ellipsoid. Initial bearing 287.98° (WNW); final bearing 231.38° (SW). The spherical great circle is 5,540.0 km, and the rhumb line on a constant 257.93° is 5,758.6 km — 3.9% longer. The midpoint is 52.2167, -41.3027, south of Greenland.

The route bows north on the map because it is a great circle; the dashed rhumb line is the straight line on this Mercator map.

Great circles, rhumb lines and the ellipsoid

A great circle is the intersection of the globe with a plane through its centre — the equator, every meridian, and the shortest path between any two points. Ships and aircraft follow great circles to save fuel, adjusting their heading as they go. A rhumb line (or loxodrome) instead crosses every meridian at the same angle, so it can be followed with a fixed compass heading, at the cost of a longer path. On a Mercator chart rhumb lines are straight, which is why navigators used that projection.

How the numbers are calculated

The headline distance and bearings use Thaddeus Vincenty’s 1975 inverse formula on the WGS 84 ellipsoid (semi-major axis 6,378,137 m, flattening 1/298.257223563); the test suite checks it against Vincenty’s own Flinders Peak to Buninyong example, 54,972.271 m. The destination point uses his direct formula. The spherical distance, midpoint and rhumb line use the standard formulas on a sphere of mean radius.

Frequently asked questions

Why does the shortest route look curved on the map?

The map uses the Mercator projection, which stretches the far north and south. The shortest path on the globe, a great circle, heads towards the pole and back, so on a flat map it bows away from the equator. The straight line on a Mercator map is the rhumb line, a route of constant compass bearing, which is longer — about 4% for London to New York, and much more on long east–west routes at high latitudes.

Why does my haversine result differ from this one?

The haversine formula treats the Earth as a sphere. The Earth is slightly flattened, so distances measured on the WGS 84 ellipsoid (as GPS and surveying do) differ by up to about 0.5% — 15 km on a transatlantic flight. Both numbers are shown so you can see which your code matches. The spherical one uses the mean radius of 6,371,008.8 m.

What is the difference between the initial and final bearing?

On a great circle your compass heading changes continuously, except along the equator or a meridian. The initial bearing is the direction to set off in from the first point; the final bearing is the direction you are travelling as you arrive. Bearings are in degrees clockwise from true north, not magnetic north.

How accurate is it?

Vincenty's inverse formula is accurate to well under a millimetre on the ellipsoid. For two points almost exactly opposite each other on the globe it does not converge; there the tool measures on a sphere instead and says so. Coordinates rounded to five decimal places are themselves only accurate to about a metre.

Find these tools useful? A coffee helps keep them free and ad-light.

Buy me a coffee