Great Circle Distance Calculator
Distance between two points on the globe from latitude and longitude — decimal or DMS — in km, miles and nautical miles, plus initial and final bearing. Nothing leaves your browser.
About this tool
The shortest path between two points on a sphere is an arc of a great circle — a circle whose centre is the centre of the sphere. That is why a flight from New York to London curves noticeably north on a flat map: the straight line you would draw is not the shortest route, and over 5,500 km the two differ by hundreds of kilometres. This calculator works on the sphere, so the number it gives is the one an aircraft or a ship would measure.
Distances use the haversine formula on a sphere of radius 6,371.0088 km (the IUGG mean radius), which puts results within about 0.5% of the true ellipsoidal figure — close enough for any practical "how far apart are these?" question, and honest about being an approximation rather than claiming a precision it does not have. Unit conversions, by contrast, are exact: a mile is defined as 1.609344 km and a nautical mile as 1.852 km, so nothing is rounded on the way between units.
Bearings are given for both ends. The initial bearing is the compass heading you leave on; because a great circle keeps changing heading as it goes, the bearing at the far end differs — often by tens of degrees on a long north–south route. Input accepts both decimal degrees and degrees/minutes/seconds, which is the form most charts and aviation documents still use, and longitudes beyond ±180 wrap onto the globe rather than being rejected.
How far apart two points on Earth can be
No two coordinates can be more than half a globe apart: the ceiling is the half-circumference, about 20,015 km or 12,437 miles, and it is reached only when the points are antipodal. The tool flags that case rather than treating it as an error.
On a sphere the longest great-circle arc is half the circumference — pi times the radius, 20,015 km here. Antipodal points, such as the two poles or any place and its exact opposite, sit at precisely that separation, and nothing can exceed it.
Antipodal inputs are also where the arithmetic is most fragile. The haversine term can drift a fraction above one through rounding, and the inverse sine of a number greater than one is not a number. The value is clamped to one before the arc sine is taken, so a near-opposite pair returns a clean figure instead of a blank.
When the two points fall within a billionth of a radian of antipodal, the result card adds a note. That is not an error — the distance is genuine — but it is the maximum the sphere allows, and every other pair lies somewhere below it.
Why longitude 190 works but latitude 100 is refused
Longitude is periodic, so values past ±180 are folded back onto the globe: 190 becomes −170, and 540 becomes 180. Latitude is not periodic — 100° names no place on earth — so it is refused outright rather than wrapped into a false position.
Every meridian is a full circle, so 190° east and 170° west name the same line. Instead of turning the figure away, the calculator folds it into the standard −180 to 180 range, which is why a longitude copied from a source that counts past 180 still gives the right answer.
The edge at 180 stays 180 rather than flipping to −180, since both name the same meridian and the positive sign is the usual one for the antimeridian. Latitude gets no such leniency: anything outside −90 to 90 is impossible, so it is refused, because wrapping it would quietly invent a point in the opposite hemisphere.
The asymmetry follows the geometry. Longitude measures a position around a full turn, so it repeats every 360° and an extra turn changes nothing. Latitude measures a position along a half-turn from pole to pole, and past either pole there is no sensible value to fall back on.
Why identical coordinates give no bearing
When both points coincide the distance is zero and there is no direction to travel in, so the initial and final bearings are left blank rather than shown as zero. A bearing exists only once the two points actually differ.
When the start and the finish are the same place, every direction is equally valid — due north is no better than due west — so any number printed would be a guess dressed up as an answer. The calculator returns nothing and the display shows a dash, which is the honest way to say the question has no answer.
The test is exact, run on the normalised coordinates. Two points a metre apart still receive a bearing, because they are genuinely different places; only a true coincidence is left empty. Duplicate coordinates are far more often a typing slip than a real route, which is another reason to show the gap plainly instead of a convincing-looking heading.
The distance itself is still reported as zero kilometres, since that part is well defined. Only the direction drops out, and both outcomes appear together, so it reads as a zero-length journey rather than as a failure.
Why a sphere and not an ellipsoid, and how much that costs
Earth is not a sphere: the equatorial radius is 6378.137 km and the polar radius 6356.752 km, 21 km apart. This tool uses the IUGG mean radius of 6371.0088 km, which stays within about 0.5% of a true ellipsoidal geodesic — fifty kilometres in ten thousand.
A strict great-circle distance only exists on a perfect sphere. The real Earth is an oblate spheroid (flattening about 1/298.3), and the shortest path between two points is properly a geodesic, solved iteratively with Vincenty or Karney and needing special handling near antipodal points where the iteration fails to converge. This tool takes the simpler route: treat Earth as a sphere of the IUGG mean radius (2a+b)/3 = 6371.0088 km, then apply the haversine formula to get the central angle.
The cost of that choice has a size. A spherical approximation typically sits within 0.5% of the ellipsoidal geodesic, with the worst case on long paths at high latitude. Beijing to New York is roughly 11,000 km, so the sphere lands within a few tens of kilometres of the ellipsoid — irrelevant to "how far apart are these two places", and not good enough for aviation fuel planning, geodesy, or anything requiring metre-level accuracy, where an ellipsoidal algorithm is the right tool.
Why not offer both: two algorithms in one page means one input and two answers, with no basis for the reader to choose between them. This tool declares a single earth model and states which one on the page, so the result is reproducible and checkable — at the price of that 0.5%. For reference, maritime and aviation practice often uses 6371.0 km or 3440.065 nautical miles; the difference from this tool is on the order of 0.01% and equally irrelevant.
Frequently asked questions
Why does the flight path look curved?
It is not curved on the globe — it is curved on the flat map. The shortest route between two points is a great circle arc, and any projection that flattens the sphere will bend it. A New York–London flight does bend appreciably north, because the great circle runs further north than a line drawn straight across a Mercator chart would.
How accurate is this compared with the real earth?
The earth is an oblate spheroid, slightly flattened at the poles, while this calculator treats it as a sphere of mean radius 6,371.0088 km. The difference in the resulting distance is under about 0.5% — for London to New York, roughly 20 km on a 5,540 km figure. That is well inside the uncertainty of "which exact runway-to-runway points" you would compare against anyway.
What is the difference between the initial and final bearing?
A great circle is not a constant compass heading — it spirals relative to the meridians. The initial bearing is the heading when you set off; the final bearing is the heading you would be on arriving. On the JFK–London example the initial bearing is about 51° and the final about 108°, an indication of how much the heading rotates over a long route.
What format should I type the coordinates in?
Either decimal degrees with a hemisphere letter or sign (40.6413 N, or -73.7781), or degrees/minutes/seconds (40° 38′ 23″ N, or 40d 38m 23s N). A hemisphere letter and a minus sign together are rejected, since they would contradict each other. Minutes and seconds must be under 60 — 60.5 minutes is a typo, not a value.
What is a nautical mile and why is it different?
A nautical mile is defined as exactly 1.852 km, and it was traditionally one minute of latitude — which is why one degree along the equator comes out to almost exactly 60 nautical miles (60.04 here). Mariners and aviators use it because distances on a chart can be read straight off the latitude scale.
Does it send my coordinates anywhere?
No. Every calculation is plain arithmetic in the page. There is no server, no request and no logging, and the tool keeps working with the network switched off — a practical way to verify the claim yourself.
Related tools
Solve any triangle from three known values — SSS, SAS, ASA, AAS and the ambiguous SSA case — with area, perimeter, circumradius and inradius. SSA shows both possible triangles, not just one.
Current weather and a 7-day forecast for any city. No account, no API key — data straight from Open-Meteo.
Solve for running pace, time or distance — enter any two and the third is worked out, with speed and both kilometers and miles shown instantly.