Great Circle Calculator
Find the shortest distance between two latitude–longitude points over a spherical Earth with the haversine formula, plus the central angle between them.
Great Circle Calculator
Background.
On a globe, the shortest path between two places is not the straight line a flat map suggests. It is an arc of a great circle — a circle centred on the middle of the Earth, like the equator or any meridian — and pulling a piece of string tight between two cities on a desk globe shows it immediately. That is why long-haul routes between high-latitude cities bow toward the pole when drawn on an ordinary wall map.
The distance here comes from the haversine formula. It takes two latitude and longitude pairs, works out the angle between them as seen from the Earth's centre, and multiplies that angle, in radians, by the radius. With the default IUGG mean radius of 6,371.0088 km, a quarter of the way round the equator is 10,007.56 km and halfway round is 20,015.11 km. The haversine form was long favoured in navigation because it stays accurate for points close together, where the simpler spherical law of cosines loses precision.
The model treats the Earth as a perfect sphere. The real planet is slightly flattened: its equatorial radius is 6,378.137 km and its polar radius 6,356.752 km, and swapping one for the other changes the quarter-equator distance by about 34 km, roughly a third of a percent. Surveying, boundary work and precise flight planning therefore use ellipsoidal methods such as Vincenty's or Karney's instead.
The result also ignores altitude, terrain and any real route. It is the length of a perfectly direct path at sea level, which is a lower bound on what a ship, aircraft or cable actually covers between the same two points.
What is great circle calculator?
Great-circle distance is the length of the shortest path between two points measured along the surface of a sphere. Any plane through the sphere's centre cuts the surface in a great circle; two points and the centre define one such plane, and the shorter of the two arcs joining the points is the great-circle route. Its length equals the central angle between the points, measured in radians, multiplied by the sphere's radius.
How to use this calculator.
- Enter each point's latitude and longitude in decimal degrees, with north and east positive and south and west negative. Nairobi is about −1.2921, 36.8219 and London about 51.5074, −0.1278.
- If your coordinates are in degrees, minutes and seconds, convert them first: degrees + minutes ÷ 60 + seconds ÷ 3,600, then make the value negative for south or west.
- Leave the sphere radius at 6,371.0088 km for Earth, or enter another body's mean radius in kilometres — about 1,737.4 for the Moon.
- Read the distance in kilometres and the central angle in degrees. Multiply kilometres by 0.621371 for statute miles, or divide by 1.852 for nautical miles.
The formula.
a = sin²(Δφ/2) + cos φ₁ · cos φ₂ · sin²(Δλ/2), then d = 2R · atan2(√a, √(1 − a)). Here φ₁ and φ₂ are the two latitudes, Δφ their difference and Δλ the difference in longitude, all converted from degrees to radians, and R is the sphere's radius. The quantity a is the haversine of the central angle, hav θ = sin²(θ/2). It combines the separation in latitude with the separation in longitude scaled by the cosines of both latitudes, which shrink longitude gaps toward the poles where meridians converge. The atan2 step recovers the central angle θ from a, and the distance is simply Rθ. Using atan2 instead of an arcsine keeps the answer well-behaved even for points on nearly opposite sides of the globe. Distance is proportional to R, so the radius you choose scales every result by the same factor; the central angle does not depend on it at all.
A worked example.
The example runs from 0° N, 0° E, where the equator meets the prime meridian in the Gulf of Guinea, to 0° N, 90° E in the Indian Ocean. Both latitudes are zero, so Δφ = 0 and the first term of a vanishes. The longitude gap is 90°, half of which is 45°; sin 45° = 0.7071, which squares to 0.5, and both cosines equal 1, so a = 0.5. Then atan2(√0.5, √0.5) = 45°, doubled to a central angle of 90°, or π/2 radians. Multiplying, 6,371.0088 × π/2 = 10,007.56 km — exactly a quarter of the model sphere's 40,030.23 km equator. Move both points to 60° N, still 90° apart in longitude, and the great-circle distance falls to 4,604.55 km. Following the 60th parallel between them would take 5,003.78 km, about 399 km farther, which is the geometry behind polar-bowing flight paths.
Frequently asked questions.
Why does the shortest route look curved on a flat map?
How much error comes from treating the Earth as a sphere?
Is this the distance an aircraft actually flies?
Does it handle points on either side of the International Date Line?
What does the central angle tell me?
References& sources.
- [1]International Union of Geodesy and Geophysics. IUGG mean Earth radius convention. Mean radius 6371.0088 km. Retrieved 2026-08-06.
- [2]OpenStax, Rice University. Precalculus 2e, 2021. Trigonometry and analytic geometry chapters. Retrieved 2026-08-06.
- [3]NIST/SEMATECH. e-Handbook of Statistical Methods, 2012. Chapter 1.3 and Chapter 4. Retrieved 2026-08-06.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 3 cited below
- Method
- d = 2R atan2(√a,√(1−a)); a = sin²(Δφ/2)+cosφ₁cosφ₂sin²(Δλ/2)
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled