Great Circle Distance Calculator
Introduction to great-circle distance between two coordinates
Great-circle distance is the shortest route over the surface of a sphere between two coordinates. Imagine a plane passing through Earth’s centre and both locations: where that plane cuts the surface, it makes a great circle. The shorter arc on that circle is the distance calculated here. It is the useful starting point for long flights, ocean passages, radio paths, and global mapping because a ruler line on a flat map is often misleading.
This calculator accepts two latitude–longitude pairs, calculates the spherical arc with the haversine formula, and also reports a WGS 84 Vincenty geodesic comparison. It gives kilometres, statute miles, nautical miles, the central angle, and the initial and final true bearings. The headline distance is a surface distance, not a tunnel through Earth, a road route, or an airline’s scheduled track.
Distance between coordinates sounds simple, but the word “distance” needs a reference surface. A straight line through a three-dimensional globe is a chord. A path followed at sea level is an arc. A line drawn on a web map is a projection-dependent picture. This page deliberately distinguishes those ideas so that a result can be used appropriately. For a worldwide overview, a spherical arc is intuitive and reproducible. For a route that depends on the shape of the Earth to high accuracy, the WGS 84 comparison provides a more realistic reference.
Great-circle calculations are particularly valuable when the two places are far apart or separated by the international date line. A map can make Tokyo and San Francisco look as if they lie on a nearly straight east–west line, while the shortest route rises toward higher northern latitudes. Conversely, a path that appears curved on a common map projection may be the shortest possible surface path. The calculator works directly from coordinates, rather than from a map’s visual appearance.
How to use great-circle coordinates in decimal degrees or DMS
Enter Point A and Point B as decimal degrees or as degrees, minutes, and seconds. For example, New York may be entered as 40.7128 and -74.0060, or as 40° 42′ 46″ N and 74° 00′ 21″ W. Degrees and decimal minutes, such as 51 30.444 N, also work. North and east are positive; south and west are negative. A hemisphere suffix establishes the sign, so a minus sign plus W or S is rejected as contradictory.
Latitude must be from −90° to 90°. Longitude values outside −180° to 180° are wrapped, because 200° E and −160° identify the same meridian. Choose an Earth radius for the spherical calculation, or choose a custom radius to model another body. The WGS 84 ellipsoidal comparison remains Earth-specific. Then select Calculate great-circle distance and read the result panel before using the method table for context.
A latitude identifies position north or south of the equator. Longitude identifies position east or west of the prime meridian, but it does not have a unique value at either pole because all meridians meet there. For ordinary locations, include enough coordinate digits to match the accuracy of the source. Six decimal places may look authoritative, yet they should not be copied from a map pin if the original observation or address is uncertain by dozens of metres. The calculator can process the digits supplied; it cannot improve the underlying location.
Use the worked-example button to load New York City and London and verify the output format before entering a route of your own. The reset button clears the coordinate fields and restores the default spherical model. Once a valid route is calculated, the shareable-link button records the coordinates and selected model in the address, while the CSV button exports the principal numeric values. Those convenience tools describe the same calculation; they do not create a navigation chart or a legally certified survey record.
The haversine formula and the central angle
The calculator converts degrees to radians and wraps the longitude difference into the short direction across the date line. Let φ represent latitude, λ longitude, and R the selected spherical radius. The haversine function is useful because it remains stable for nearby points where other formulas can lose floating-point precision.
First, the calculation combines the north–south and east–west components into the dimensionless quantity a. The latitude factors account for the way meridians converge toward the poles.
The central angle c is then recovered with a two-argument arc tangent. This choice behaves well from coincident locations through nearly opposite points.
Finally, multiply the central angle by the radius. Changing R changes the reported spherical distance proportionally, while the angle itself remains the same for the two coordinates.
The central angle is often the most portable result. It says how far apart the locations are on an ideal globe without committing to a particular unit or radius. Multiply that angle by a planetary radius to estimate an arc on another spherical body. That is why this calculator permits a custom radius. However, the latitude and longitude values must still describe positions on the body being modelled, and the displayed Vincenty result must be ignored for a non-Earth body because Vincenty here uses WGS 84 constants.
In practical terms, haversine starts by measuring half of each angular change. The sine-squared terms make the contributions non-negative, and the cosine terms reduce the importance of a longitude difference near a pole. A one-degree longitude change at the equator spans much more ground than the same one-degree change near 89° north. The formula incorporates that geometry automatically. It also treats an eastward and westward route symmetrically when only distance is requested.
Why haversine is preferred to the spherical law of cosines
The spherical law of cosines is mathematically equivalent in exact arithmetic, but it is less robust for very short distances in ordinary floating-point arithmetic. It obtains c with an arc cosine of a number extremely close to 1. Rounding can erase the small difference that represents the route, and acos magnifies that loss. The calculator includes a clamped law-of-cosines row in the comparison table as a teaching check, but uses haversine for the headline spherical result.
For city-to-city distances, both spherical methods normally agree to the displayed precision. The distinction matters most as points become extremely close, where a stable algorithm is preferable even though the answer may be only a few metres. The comparison table is therefore not a contest between two different routes. It is a way to show that two spherical identities lead to nearly the same arc while the ellipsoidal model can produce a slightly different physical estimate.
Initial and final bearing along a great-circle route
A great circle normally does not have one fixed compass heading. Except on a meridian or the equator, it crosses successive meridians at changing angles. The initial bearing is the true course at departure; the final bearing is the true course on arrival. Bearings are clockwise from true north, not magnetic north, so a separate magnetic-declination model would be needed for compass navigation.
At identical points there is no direction to travel. At antipodal points, infinitely many great circles have the same length, so there is no unique bearing. The calculator reports those cases clearly rather than inventing a heading.
A bearing is useful for understanding the first or last tangent of the ideal route, not for steering continuously across an ocean or through controlled airspace. A pilot, mariner, or hiker needs a current chart, local hazards, wind or current information, and an approved navigation system. The initial bearing may be broadly northeast while the final bearing is broadly southeast, as it is on many northern-hemisphere transatlantic routes. That changing direction is a property of the great circle, not an error in the calculation.
Worked example: New York City to London
Use Point A as 40.7128° N, 74.0060° W and Point B as 51.5074° N, 0.1278° W. On the IUGG mean sphere, R1 = 6371.0087714 km, the central angle is about 50.094212° or 0.87430893 radians. Multiplying by the radius produces approximately 5570.23 km, 3461.18 statute miles, or 3007.68 nautical miles. The initial spherical bearing is about 51.21° and the final bearing about 108.33°, illustrating why the route appears to bow northward on many flat maps.
The WGS 84 Vincenty result for the same city-centre coordinates is about 5585.23 km. The roughly 15 km difference does not mean either computation is broken: one follows an ideal sphere and the other follows an oblate ellipsoid. For broad travel estimates, the spherical result is often sufficient. For survey, legal boundaries, cable quantities, or engineering decisions, use an ellipsoidal method and verify the coordinate datum.
To reproduce the example, enter the signed decimal values exactly as 40.7128, -74.0060, 51.5074, and -0.1278. Alternatively, use hemisphere notation and omit negative signs. The result panel lists several unit conversions from the same spherical distance, so kilometres, miles, and nautical miles should not be treated as independently calculated routes. The method table then makes the model choice visible: the haversine and law-of-cosines rows use the selected radius, whereas the Vincenty row uses the WGS 84 ellipsoid.
A city-centre example is convenient, but it is not an airport-to-airport flight distance. Moving either endpoint by a few kilometres changes the result. Airline route pages may quote a different number because they use airport reference points, a scheduled route, or a separate distance convention. This is exactly why coordinates are shown as inputs: they make the question precise and make a calculation repeatable.
Choosing an Earth radius and comparing WGS 84
Earth is flattened slightly at the poles, so it has no single literal radius. The default R1 is the arithmetic mean of the WGS 84 semi-axes. R2 is an equal-area sphere and R3 an equal-volume sphere. Their radii differ by only metres, so they change a transatlantic result by metres rather than kilometres.
Vincenty’s inverse method instead models WGS 84 as an ellipsoid with semi-major axis a = 6378137.0 m and reciprocal flattening 298.257223563. Its distance calculation is iterative and can fail to converge for nearly antipodal points. That limitation is reported as a non-result rather than a false precision claim.
Select R1 when you want a widely used mean-Earth spherical convention. Select the rounded 6371 km option when matching a textbook or another calculation that explicitly uses that convention. The equal-area and equal-volume options are useful when a project has chosen one of those idealizations. A custom radius is helpful for classroom comparisons or for a spherical approximation to another world. Since distance is radius times central angle, doubling a custom radius doubles the displayed spherical distance, while bearings and the central angle remain unchanged.
The WGS 84 result is not automatically “better” for every purpose. It is better aligned with Earth’s reference ellipsoid, but a spherical formula can be the correct choice when a specification calls for a mean-radius model, when comparing with historical data, or when a simple broad-scale estimate is sufficient. State the method and radius with any reported figure. A bare statement such as “the distance is 5,570 km” leaves unanswered whether it is a map route, a spherical arc, an ellipsoidal geodesic, or a travel itinerary.
Great-circle distance assumptions and limitations
Great-circle distance is not a route plan. Roads, airways, restricted airspace, winds, currents, terrain, airport procedures, and commercial routing can make real travel longer. A rhumb line maintains a constant bearing and appears straight on a Mercator map, but is generally longer than a great circle. Heights above the reference surface are ignored, as are local datum shifts and map-coordinate uncertainty.
Coordinate precision limits output precision. Four decimal places in latitude are only roughly an 11 m location statement, so displaying millimetres does not create millimetre knowledge. Use the results as planning and educational values, not as safety-critical navigation instructions. For guaranteed ellipsoidal solutions close to antipodes, use a modern geodesic implementation such as Karney’s algorithm.
Every coordinate also belongs to a datum, even when a map interface does not say so prominently. GPS and most online mapping coordinates are commonly supplied in WGS 84, which matches the comparison model on this page reasonably well. Coordinates transformed from a local grid, an old nautical chart, or a land-survey dataset can carry a datum offset. Before interpreting a small difference between methods as meaningful, confirm that both endpoints refer to the same datum and that latitude and longitude have not been accidentally reversed.
The calculator uses longitude wrapping to handle routes crossing 180°. This is desirable for distance because 179° E and 179° W are near one another, not almost a full circumference apart. It does not mean that a particular vessel or aircraft may cross the date line without operational consequences. Time zones, reporting systems, permits, and route constraints remain separate questions. Likewise, the calculator does not model altitude. A satellite line-of-sight distance or a high-altitude aircraft path requires three-dimensional geometry and may not be a surface geodesic at all.
Interpreting great-circle distance for travel, mapping, and radio paths
For travel planning, use the result as a lower-bound-style geographic separation. A road trip is almost always longer because roads follow terrain and property networks. A commercial flight may be longer because it begins and ends at airports outside city centres and follows departure, arrival, weather, traffic-management, and airspace procedures. A voyage may be longer because a shortest theoretical arc crosses land, shallow water, ice, restricted waters, or unsuitable weather. Comparing an itinerary to the great-circle figure can still be useful: it reveals the scale of the unavoidable geographic separation.
For map design, a great circle is a geometric route on a globe, not necessarily a straight segment in projected coordinates. On a gnomonic projection, great circles appear as straight lines. On a Mercator projection, rhumb lines appear straight, while great circles generally curve. Neither image is inherently deceptive if its projection is understood. Problems arise when a flat-map line is assumed to have the same properties it would have on a sphere. The changing bearings reported by this calculator are one quick indication that the shortest path is not normally a constant-heading line.
For radio and satellite discussions, surface distance is only one component. High-frequency propagation, antenna height, terrain, atmospheric conditions, and satellite altitude can dominate the practical link. A great-circle bearing is often used to aim an initial long-distance path, but it is not a guarantee of signal coverage. Radio users should treat it as geometric context and consult the relevant propagation and regulatory information for an actual installation or operation.
Coordinate-entry checks for reliable great-circle results
Most surprising distance results come from transcription rather than trigonometry. Check that latitude is entered in the latitude box and longitude in the longitude box. Check signs carefully: a western longitude written positive can move a point to the other side of the world, and a southern latitude written positive reflects it across the equator. Hemisphere letters are a readable alternative to signs, especially in DMS notation. Do not use both a negative sign and a south or west suffix because they express the same direction twice.
Minutes and seconds belong to a base-60 system. Thus 30 minutes is one-half degree and 30 seconds is one-one-hundred-twentieth of a degree. A value such as 51° 30′ 30″ N is valid, while 51° 75′ N is not. Decimal degrees are usually easiest to copy from GPS or web maps; DMS is often easier to copy from published navigation sources. Both represent the same angular position once converted. The calculator validates the normal latitude range and reports an input problem instead of silently guessing what an ambiguous entry meant.
When comparing results from another website or GIS program, first make the inputs identical, then compare the Earth model, radius, and unit rounding. A difference of a few kilometres over an intercontinental route can be entirely expected if one service uses a sphere and another uses WGS 84. A difference of thousands of kilometres is more likely to indicate a sign reversal, swapped fields, or a coordinate in degrees being treated as radians. Recording inputs alongside the result is the simplest way to audit a calculation later.
Frequently asked questions about great-circle distance
Is the great-circle distance the distance an aircraft actually flies?
No. It is the shortest surface arc on a reference figure. Operational routes usually add manoeuvres, weather deviations, airspace restrictions, tracks, and other constraints.
Why are the initial and final bearings different?
A great circle normally changes direction as it crosses meridians. A constant-heading route is a rhumb line, not generally the shortest route.
What happens at the poles and the 180th meridian?
Longitude is wrapped to the short direction, so crossing the date line works normally. Longitude at a pole does not change the geometric location. Antipodal points have no unique bearing.
Can this great-circle calculator measure a route on Mars or the Moon?
The spherical calculation can do so if you enter a suitable custom radius and coordinates for that body. The WGS 84 Vincenty comparison is Earth-specific and should not be used as an ellipsoidal result for another body.
Why does a very long result contain many decimal places?
The displayed arithmetic uses the supplied coordinates and model precisely, but the meaningful precision depends on the coordinate source and intended use. Round a reported result to a level justified by the input data.
Sources. WGS 84 constants and derived mean radii: National Imagery and Mapping Agency, Department of Defense World Geodetic System 1984, NIMA TR8350.2. Ellipsoidal inverse method: T. Vincenty, “Direct and inverse solutions of geodesics on the ellipsoid,” Survey Review, 1975. Modern all-pair geodesic method: C. F. F. Karney, Algorithms for geodesics. Exact mile and nautical-mile conversions: NIST Special Publication 811.
Your route by method
Calculate a distance above and this table fills with the same route evaluated by several methods.
| Method | Distance (km) | Distance (nmi) | Delta vs geodesic |
|---|---|---|---|
| No route calculated yet. | |||
Mini-game: Jetstream Jockey
Follow the glowing great-circle lane, collect tailwinds, and avoid storm cells. It is an optional visual reminder that the shortest route on a globe can curve on a flat map.
Route complete
Controls: press the upper half of the canvas to climb north, and the lower half to dip south. Keyboard fallback: ↑ and ↓.
Compute a route above to update the flight lane.
