Great Circle Distance Calculator

Work out the great-circle distance and initial bearing between two coordinates by the haversine formula, in kilometres, miles and nautical miles.

°
°
°
°
km/h
Distance 5540.019 km
a = sin²(Δφ/2) + cos φ₁ cos φ₂ sin²(Δλ/2); distance = 2R × arcsin(√a), with R = 6371.0088 km
In statute miles 3442.408 mi
In nautical miles 2991.371 nmi
Initial bearing 287.94 °
Compass direction WNW (287.9°)
Bearing on arrival 231.35 °
Midpoint of the route 52.2167, -41.3027
Journey time at that speed 6:09:20 at 900 km/h
Worth knowing This is the shortest distance over the surface of a sphere, which is what aircraft and ships follow and what “as the crow flies” means. A straight line on a flat map is longer, sometimes much longer at high latitudes. The bearing changes from 287.9° at the start to 231.4° on arrival — a difference of 56.6°. A great circle is not a constant-bearing route, which is why a pilot following it turns continuously and why the path looks curved on a Mercator map. The Earth is a slightly flattened sphere, so a spherical calculation carries up to about 0.5% error — a few kilometres on an intercontinental route. For survey-grade distances the Vincenty or Karney formulae work on the ellipsoid instead.

Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.

What the Great Circle Distance Calculator does

This great circle distance calculator will work out the great-circle distance and initial bearing between two coordinates by the haversine formula, in kilometres, miles and nautical miles. Fill in all 5 fields and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for finding the flight distance between two airports. You may also want the rhombus calculator.

How to use it

  1. Enter the two sets of coordinates in decimal degrees — south and west are negative.
  2. Read the distance in kilometres, miles or nautical miles.
  3. Note that the initial and final bearings differ: a great circle is not a constant heading.

How it works

The great-circle distance is the shortest path between two points over the surface of a sphere — the route an aircraft or ship actually takes, and what "as the crow flies" means. On a Mercator map it looks like a curve, which is a property of the projection rather than the route: Mercator preserves angles and badly distorts distance away from the equator, so the straight line on the map is the longer path on the ground. The effect is dramatic at high latitudes, which is why flights between Europe and North America appear to swing up over Greenland.

The haversine formula is used here rather than the spherical law of cosines, and the reason is numerical rather than mathematical. Both are exactly correct on a sphere. The cosine form takes the arccosine of a value very close to 1 for short distances, and in floating-point arithmetic that loses most of its precision — distances of a few hundred metres can come out wrong by tens of per cent. Haversine works with half-angle sines instead and stays accurate all the way down to adjacent points.

The two bearings are worth understanding because they surprise people. A great circle does not hold a constant heading: it starts on one bearing and arrives on another, and over a long route the difference can be sixty degrees or more. London to New York leaves on about 288 degrees and arrives on about 234. A pilot following a great circle is turning continuously. A route that does hold one bearing is a rhumb line, which is easier to steer and longer — which is precisely the trade-off navigators made for centuries before computers.

The limitation is the sphere. The Earth is an oblate spheroid, flattened by about one part in 300, so any spherical calculation carries up to roughly half a per cent of error — a few kilometres on an intercontinental route, metres on a local one. That is fine for distances between cities, journey planning and curiosity, and not fine for surveying or anything legal. For those, Vincenty’s formulae or Karney’s algorithm work on the ellipsoid and are accurate to millimetres.

When to use it

  • Finding the flight distance between two airports.
  • Calculating distance between two GPS coordinates.
  • Working out an initial bearing for navigation.
  • Finding the midpoint of a long route.
  • Comparing the great-circle route against a map straight line.

Common mistakes to avoid

  • Entering west or south coordinates as positive. Both are negative in decimal degrees.
  • Using degrees and minutes without converting. 51°28' is 51.4667, not 51.28.
  • Expecting the bearing to stay constant along the route. A great circle turns continuously.
  • Using a spherical distance where survey accuracy is needed.
  • Measuring a straight line on a Mercator map and calling it the distance.

Frequently asked questions

What is a great circle distance?

The shortest distance between two points over the surface of a sphere, measured along the circle whose plane passes through the centre of the Earth. It is the route aircraft and ships follow.

Why is the haversine formula used instead of the law of cosines?

Both are correct on a sphere, but the cosine version takes an arccosine of a value near 1 for short distances and loses precision catastrophically in floating point. Haversine is accurate at every scale.

Why does the bearing change during the flight?

Because a great circle is not a constant-heading path. It leaves on one bearing and arrives on another — London to New York departs around 288° and arrives around 234°. A constant-bearing route is a rhumb line, which is longer.

How accurate is this?

To about half a per cent, because it treats the Earth as a sphere and the Earth is slightly flattened. That is a few kilometres on an intercontinental route. For survey accuracy, use Vincenty or Karney on the ellipsoid.

Why does the route look curved on a map?

Because of the projection. Mercator preserves angles and distorts distance, so the shortest real path is drawn as a curve. The curve is the straight line; the map is what is bent.

Related tools

See all math & statistics calculators →