terican

Last verified · v1.0

Calculator · math

Great Circle Distance Calculator

Compute the great circle distance between two coordinates using the Haversine formula. Enter latitude and longitude in decimal degrees for results in km, miles, or nautical miles.

FreeInstantNo signupOpen source

Inputs

Great Circle Distance

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

Great Circle Distance

The formula

How the
result is
computed.

What Is Great Circle Distance?

The great circle distance is the shortest path between two points on the surface of a sphere, measured along the curved surface rather than through the interior. Every great circle is formed by the intersection of a sphere and a plane passing through the sphere's center. Pilots, navigators, and geospatial engineers rely on great circle routes to minimize travel distance and fuel consumption across oceans and continents.

The Haversine Formula

The great circle calculator uses the Haversine formula, a spherical trigonometry equation that computes central angles between two points defined by latitude and longitude. Named after the haversine function — hav(θ) = sin²(θ/2) — the formula was codified in 19th-century navigation tables and remains a cornerstone of geospatial computation. According to Map Projections Used by the U.S. Geological Survey (Bulletin 1532), spherical approximations are sufficient for most navigation applications where sub-meter precision is not required.

Formula Variables

  • φ₁, φ₂ — Latitudes of Point 1 and Point 2 in radians (multiply decimal degrees by π/180)
  • Δφ — Difference in latitudes (φ₂ − φ₁)
  • Δλ — Difference in longitudes (λ₂ − λ₁)
  • R — Mean radius of the Earth, approximately 6,371 km (3,958.8 miles or 3,440.1 nautical miles)
  • a — Intermediate haversine value: sin²(Δφ/2) + cos(φ₁)·cos(φ₂)·sin²(Δλ/2)
  • d — Great circle distance in the selected unit

Step-by-Step Derivation

The computation proceeds in four stages:

  1. Convert all latitude and longitude values from decimal degrees to radians by multiplying each by π/180.
  2. Compute the intermediate variable a = sin²(Δφ/2) + cos(φ₁) · cos(φ₂) · sin²(Δλ/2).
  3. Compute the central angle c = 2 · arctan2(√a, √(1−a)).
  4. Multiply by Earth's mean radius: d = R · c.

Using arctan2 rather than plain arcsin improves numerical stability for both very short and very long distances, avoiding precision loss near 0° and 180°. The Harvey Mudd College analysis Modeling Flight over a Spherical Earth confirms that the arctan2 variant maintains accuracy across all angular ranges encountered in real-world navigation.

Worked Example: New York City to London

Enter the following coordinates to compute the transatlantic great circle distance:

  • Point 1 (New York City): lat = 40.7128°N, lon = −74.0060°W
  • Point 2 (London, UK): lat = 51.5074°N, lon = −0.1278°W

Converting to radians: φ₁ ≈ 0.7104 rad, φ₂ ≈ 0.8989 rad, Δφ ≈ 0.1884 rad, Δλ ≈ 1.2893 rad.

Intermediate value: a ≈ sin²(0.0942) + cos(0.7104)·cos(0.8989)·sin²(0.6447) ≈ 0.0089 + 0.7578 × 0.6261 × 0.3608 ≈ 0.1801.

Central angle: c = 2 · arctan2(√0.1801, √0.8199) ≈ 0.8769 rad.

Distance: d = 6,371 km × 0.8769 ≈ 5,585 km (3,470 miles or 3,016 nautical miles). This figure closely matches published JFK–LHR flight-planning data used by major transatlantic carriers.

Practical Applications

Aviation and Flight Planning

Airlines use great circle routes to reduce fuel burn on every long-haul flight. The polar great circle route from Los Angeles (LAX) to Seoul (ICN) — approximately 9,620 km — saves over 600 km compared to a path plotted along a flat Mercator map, translating to significant fuel and emissions savings per flight.

Maritime Navigation

Ocean-going vessels plot great circle routes to shorten ocean passages. The route from San Francisco to Yokohama, Japan spans roughly 8,280 km along a great circle, arcing far north toward the Aleutian Islands — a path that appears counterintuitive on a flat map but is geometrically optimal on the globe.

GPS, Geofencing, and Logistics

Mobile applications and logistics platforms use the Haversine formula to compute delivery radii, match drivers to riders, and trigger location-based alerts in real time as GPS coordinates update. As the U.S. DOT Geometric Analysis of an Observer on a Spherical Earth documents, spherical distance modeling underpins a wide range of positioning and surveillance systems, from air traffic control to autonomous vehicle routing.

Limitations and Accuracy

The Haversine formula models the Earth as a perfect sphere with radius 6,371 km. The actual Earth is an oblate spheroid, with an equatorial radius of 6,378.1 km and a polar radius of 6,356.8 km. For aviation, shipping, and logistics, the spherical approximation introduces an error of less than 0.5% — well within operational tolerances. Applications requiring sub-meter geodetic precision, such as land surveying or precision agriculture, should use the Vincenty formula or WGS-84 ellipsoidal models instead.

Reference

Frequently asked questions

What is great circle distance and why does it matter?
Great circle distance is the shortest distance between two points on a sphere's surface, measured along the curved surface itself rather than through the interior. Because the Earth is approximately spherical, great circle paths define the shortest real-world routes for aircraft, ships, and cables. Any long-range navigation or geospatial calculation that ignores this curvature will overestimate the true shortest distance, sometimes by hundreds of kilometers.
How does the Haversine formula compute great circle distance?
The Haversine formula works in four steps: convert latitudes and longitudes from decimal degrees to radians; compute the intermediate variable a = sin²(Δφ/2) + cos(φ₁)·cos(φ₂)·sin²(Δλ/2); find the central angle c = 2·arctan2(√a, √(1−a)); then multiply by Earth's mean radius R ≈ 6,371 km. Using arctan2 instead of arcsin ensures numerical stability at all angular distances, from centimeters to antipodal points.
What is the great circle distance from New York City to London?
The great circle distance from New York City (40.7128°N, 74.0060°W) to London (51.5074°N, 0.1278°W) is approximately 5,585 km (3,470 miles or 3,016 nautical miles). This is the shortest possible surface route between the two cities and corresponds closely to actual transatlantic flight paths operated on the JFK–LHR corridor, with typical eastbound flight times of 6 to 7 hours.
Why do airplanes fly curved routes on a flat map if great circle paths are straight?
Airplane routes appear curved on flat Mercator maps because the map projection distorts the spherical surface of the Earth. On the actual globe, a great circle route is geometrically straight — the shortest possible arc between two points. For example, the great circle path from New York to Tokyo passes over northern Canada and Alaska, appearing as a deep northward curve on a standard flat map, yet it saves over 1,000 km compared to a map-straight eastward route.
How accurate is the great circle distance calculator?
The Haversine-based great circle calculator is accurate to within approximately 0.3% to 0.5% for most global distances. The error arises because the Earth is an oblate spheroid (equatorial radius 6,378.1 km, polar radius 6,356.8 km) rather than a perfect sphere. For aviation planning, maritime routing, logistics, and mapping, this margin is well within acceptable tolerances. Only geodetic surveying or precision engineering applications requiring millimeter accuracy need the more complex Vincenty or Karney formula.
What units does the great circle distance calculator support, and how do they convert?
The calculator returns results in kilometers, statute miles, and nautical miles. The conversions are fixed: 1 nautical mile = 1.852 km exactly, and 1 statute mile ≈ 1.60934 km. Nautical miles are the standard unit in aviation (where distances are often expressed as nautical miles and speeds as knots) and maritime navigation. The calculator applies the chosen unit automatically after computing the central angle in radians and multiplying by Earth's radius expressed in that unit.