🏆 US-Registered Digital Marketing Agency
Advertisement
Advertisement
EVERYDAY

Great Circle Distance Calculator — haversine distance and bearing

Enter two sets of latitude and longitude coordinates to get the shortest distance over the surface of the Earth, in kilometres, miles and nautical miles, with the compass bearing.

Decimal degrees. North and east are positive, south and west are negative. Heathrow is the default first point.
The default second point is John F. Kennedy International Airport in New York.
The Earth is not a sphere, so this choice alone moves the answer by up to a third of a per cent.
Great-circle distance
 
Statute miles
Nautical miles
Initial bearing
Final bearing
Tip: the bearing changes continuously along a great circle. Steering the initial bearing all the way will not get you there — that is a rhumb line, and it is a longer route.
Advertisement

A great circle distance calculator gives the shortest path between two points on the surface of the Earth. On a flat map that path looks bent, which is the whole reason the calculation is worth doing: the straight line you draw between London and Tokyo on a Mercator projection is not the short way, and the curve that arcs up over Siberia is. Every flight plan, undersea cable route and long-range radio path is worked out this way.

Arb Digital publishes this as part of a free tools library. It uses the haversine formula on a sphere of a radius you choose, and it returns the initial and final bearings alongside the distance, because on a long route those two bearings differ by tens of degrees. Two adjacent tools are worth naming: the coordinates converter changes coordinate notation between decimal degrees and degrees-minutes-seconds but calculates no distance, and the speed distance time calculator works on a distance you already have. This page is the one that derives the distance from the coordinates themselves.

What This Great Circle Distance Calculator Does

Enter two coordinate pairs in decimal degrees. The tool returns the great-circle distance in your chosen headline unit plus the other two units alongside, the initial bearing you would leave the first point on, and the final bearing you would arrive at the second point on. The midpoint of the route is shown underneath, which is useful for planning a stop or picking a relay site.

The Earth radius selector is not decoration. A sphere is an approximation of an oblate spheroid that is about 21 kilometres wider than it is tall, so there is no single correct radius. Using the equatorial figure instead of the mean adds roughly 0.11% to every answer — about six kilometres on a transatlantic flight. The tool states which model it used so the number is reproducible.

What it does not do is model the spheroid itself. For survey-grade results you want Vincenty's formulae or a geodesic solution on the WGS 84 ellipsoid, which can differ from a spherical answer by up to about 0.5% on a long route. For navigation, logistics, radio planning and general geography, the spherical answer is entirely adequate and far easier to check by hand.

How to Use It

  1. Get both points into decimal degrees. North and east are positive, south and west are negative. 40°38'29"N is 40.6413.
  2. Enter latitude first, longitude second. Reversing them is the single most common error, and because both are plausible numbers the result looks reasonable rather than obviously wrong.
  3. Choose a radius model. Leave it on the IUGG mean radius unless you have a reason to prefer another; that is the figure most published great-circle distances assume.
  4. Pick your headline unit. Nautical miles for aviation and marine work, statute miles for road and US general use, kilometres for everything else.
  5. Read both bearings. The difference between them tells you how much the route curves, which is a good sanity check that you have entered a long route rather than transposed a sign.

The Formula / How It's Calculated

The haversine formula computes the central angle between two points on a sphere and multiplies it by the radius. Writing φ for latitude and λ for longitude in radians:

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

The initial bearing comes from θ = atan2(sin Δλ · cos φ₂, cos φ₁ · sin φ₂ − sin φ₁ · cos φ₂ · cos Δλ), normalised into the range 0 to 360 degrees. The final bearing is the initial bearing of the reverse route, turned around by 180 degrees.

Worked example, checked by hand. Heathrow at 51.4700°N, 0.4543°W to JFK at 40.6413°N, 73.7781°W. Δφ is −10.8287° and Δλ is −73.3238°. That gives a = 0.177421, so c = 2 · atan2(√a, √(1−a)) = 0.869567 radians, or 49.823 degrees of central angle. On the IUGG mean radius that is 0.869567 × 6,371.0088 = 5,540 kilometres, or 3,442 statute miles and 2,991 nautical miles. The initial bearing works out at 287.9 degrees and the final bearing at 231.4 degrees — a swing of 56 degrees across the Atlantic.

Swap to the WGS 84 equatorial radius and the same route becomes 5,546 kilometres. That six-kilometre spread is the entire practical significance of the radius question, and it is why any published distance should say which model it used. The National Hurricane Center's own latitude and longitude distance calculator carries the same caveat, noting that its results are approximate and may differ slightly from official figures.

Advertisement

Why the Bearing Changes as You Travel

A great circle crosses successive meridians at different angles, so the compass heading that keeps you on it changes constantly. On the Heathrow to JFK route the heading starts near west-northwest and finishes near southwest. Fly the initial heading of 288 degrees the whole way and you trace a rhumb line instead — a path of constant bearing, which is longer, and on this route by roughly one per cent.

That trade-off is why both routes survive in practice. A rhumb line is trivially easy to steer and appears as a straight line on a Mercator chart, which is exactly what Mercator was designed for. A great circle is shorter but requires continuous course correction, which is easy with modern navigation systems and was not easy with a compass and a chart table. Long ocean crossings were historically flown or sailed as a series of rhumb-line legs approximating the great circle.

The gap between them scales with distance and with latitude. Near the equator on an east-west route the two are almost identical; at high latitudes the difference becomes dramatic, which is why polar routes look so strange on a flat map. Anywhere the two bearings this tool reports differ by more than a few degrees, the distinction matters.

Which Earth Radius to Use, and Why It Is Not Obvious

The Earth is an oblate spheroid: about 6,378 km from centre to equator and about 6,357 km from centre to pole. Any single-radius sphere is therefore a compromise, and different compromises are standard for different purposes. The IUGG mean radius of 6,371.0088 km is the arithmetic mean of the three semi-axes and is the usual default. The authalic radius is the radius of a sphere with the same surface area, which is what you want for area calculations. The nautical sphere of 6,366.7072 km is chosen so that one arc minute of great circle equals exactly one nautical mile, which is where the nautical mile came from in the first place.

Which reference frame your coordinates are expressed in matters too, though much less. NOAA's National Geodetic Survey maintains the US datums and explains the distinction on its datums and reference frames pages: a latitude and longitude is meaningless without knowing which datum it is on, and a coordinate on NAD 83 and the same nominal coordinate on WGS 84 refer to points that can be a metre or two apart. For great-circle work over hundreds of kilometres that is irrelevant; for surveying it is the whole game.

Where Great-Circle Distance Is the Wrong Answer

It is the shortest path over an idealised surface, and reality intrudes in three ways. Terrain: the great-circle distance between two points in a mountain range bears no relation to how far you will walk. Obstacles: aircraft avoid restricted airspace and ships avoid land, so an actual routing is always longer than the geodesic. Altitude: a route at cruising altitude is travelling on a slightly larger sphere, adding roughly 0.16% at 10 kilometres of altitude — small, but it is why published flight distances sometimes exceed the surface figure.

For driving, the number is almost always misleading. Road distance typically exceeds great-circle distance by twenty to forty per cent depending on the road network, so use a routing service and feed the result into the road trip cost calculator rather than costing a journey off a straight-line figure. For flying, the great-circle figure is the right basis for an emissions estimate, and the flight carbon footprint calculator uses distance in exactly that way.

Practical Uses Beyond Navigation

Radio and microwave planning uses great-circle bearings to aim directional antennas, and the path length feeds directly into link-budget calculations. Store-location analysis uses great-circle distance as a fast proxy for catchment before anyone computes real drive times, because it needs no routing engine and scales to millions of point pairs. Sports and logistics scheduling uses it to minimise travel across a season.

It also underpins nearest-neighbour searches in any geographic database. The haversine formula is cheap enough to run on a large table, and a common pattern is to filter with a crude bounding box first and then rank the survivors by haversine distance. If you want to work through the trigonometry behind the formula, the trigonometric functions calculator evaluates each term, and the coordinates converter will get awkwardly formatted coordinates into the decimal degrees this page expects.

Working with location data for a business?

Arb Digital's free tools cover the geographic, logistics and analytics maths behind location decisions, and our team is happy to talk through anything the tools do not cover.

Browse Free Tools Talk to Arb Digital

Common Mistakes to Avoid

  • Swapping latitude and longitude — both are plausible numbers, so the result looks reasonable instead of obviously broken.
  • Getting the sign wrong on west or south — a missing minus sign on longitude puts a European city in central Asia.
  • Mixing degrees-minutes-seconds with decimals — 40°38.5' is 40.6417 degrees, not 40.385; convert before entering.
  • Steering the initial bearing the whole way — that traces a rhumb line, which is a different and longer path than the great circle.
  • Using the figure as a driving distance — real road distance typically runs twenty to forty per cent longer than the straight-line answer.

Related Free Tools From Arb Digital

Use the coordinates converter to move coordinates between decimal degrees and degrees-minutes-seconds, the speed distance time calculator to turn the distance into a journey time, the road trip cost calculator for actual driving routes, the flight carbon footprint calculator to estimate emissions from a route length, and the trigonometric functions calculator to work through the haversine terms yourself. Everything else is in the free online tools hub.

Frequently Asked Questions

What is a great circle?

It is the circle formed where a plane through the centre of the Earth cuts the surface. The shorter arc between two points on that circle is the shortest possible path across the surface, which is why it is the basis of long-distance navigation.

Which Earth radius does this calculator use?

By default the IUGG mean radius of 6,371.0088 kilometres, which is the mean of the three semi-axes of the reference spheroid. You can switch to the authalic, equatorial, polar or nautical radius, and the choice moves the answer by up to about a third of a per cent.

How accurate is the haversine formula?

It is exact on a sphere, so its error comes entirely from the Earth not being spherical. Against a full ellipsoidal geodesic solution it can differ by up to roughly half a per cent on a long route, which is fine for navigation and planning but not for surveying.

Why do the initial and final bearings differ?

Because a great circle crosses each meridian at a different angle, so the heading changes continuously along the route. On a transatlantic crossing the two bearings can differ by more than fifty degrees.

What is the difference between a great circle and a rhumb line?

A great circle is the shortest path but requires the heading to change constantly. A rhumb line holds a single constant bearing, appears as a straight line on a Mercator chart and is easier to steer, but it is longer, sometimes substantially so at high latitudes.

Can I use this for driving distance?

No. It gives the straight-line distance over the surface, ignoring roads, terrain and obstacles. Real road distance is usually twenty to forty per cent longer, so use a routing service for anything you intend to drive.

How do I enter degrees, minutes and seconds?

Convert to decimal degrees first by dividing the minutes by 60 and the seconds by 3,600 and adding them to the degrees, keeping the sign negative for south and west. The coordinates converter on this site will do the conversion for you.

This tool models the Earth as a sphere of the radius you select. It is intended for planning and general geographic work, not for surveying, aviation dispatch or any application where an ellipsoidal geodesic solution is required.

Advertisement
Advertisement

Take it further