The guide
The shortest way round a globe bends on a flat map, and the bearing bends with it
A great circle is the straight line of a sphere. Following one means steering a bearing that keeps changing, which is why a route has two bearings and waypoints.
- 5,540.0 km great-circle New York to London on a 6371 km sphere
- 107.94 degrees final bearing, against 51.35 at the start, on that route
- 53.66 degrees latitude of that route's vertex, north of both end points
- 0.27 percent how much shorter the sphere is than WGS 84 on that route
- 18,743 km Valparaiso to Shanghai, the worked example at R = 6371 km
Read the full guide Fold the guide
Pull a string tight between New York and London on a desk globe and it runs north of both cities, far up toward Greenland. Lay a ruler between the same two cities on a flat wall map and the line runs south of that string. Both are straight in their own world. Only one is the shortest way to fly.
A great circle is the largest circle you can draw on a sphere. Its centre is the centre of the sphere, so every great circle is as wide as the globe itself. The equator is one. Any meridian together with its opposite meridian is another.
Any arc of a great circle is a geodesic of the sphere, the spherical version of a straight line. For any two points that are not exactly opposite each other, exactly one great circle passes through both. The shorter of the two arcs it cuts between them is the shortest path across the surface.
Opposite points are the exception. Through two points on opposite sides of the globe pass infinitely many great circles, and every one of them gives the same length, half the circumference. No single bearing is the answer, and a calculator that prints one is guessing.
Why the route bends on a flat map
A flat map has to distort something. The common sailing chart, the Mercator, keeps angles true and so turns every line of constant compass bearing, called a rhumb line, into a straight line. A rhumb line crosses every meridian at the same angle. It is easy to steer, and it is not the shortest route.
On a great circle the bearing does not stay constant. A car driven along one would keep its wheel fixed while the compass reading drifts, whereas following a rhumb line means turning the wheel gradually. The great circle is shorter, and the rhumb line is simpler to steer by compass.
There is a map where the great circle is straight. The gnomonic projection looks at the sphere from its centre, onto a flat plane, and every great circle becomes a straight line. Navigators plotted a route there, read off positions at convenient intervals of longitude, and copied them onto the Mercator chart, where the same route appears as a curve.
Two bearings, and a worked route
Because the bearing keeps changing, a route has more than one. The initial bearing is the direction to leave the start. The final bearing is the direction of travel on arrival. They differ unless the route runs due north, due south or along the equator.
The formulas are plain spherical trigonometry. The initial bearing is the arctangent of a ratio built from the two latitudes and the longitude difference, and the final bearing swaps the roles of the two points. The quadrant matters, so the arctangent must be the two-argument form, which returns an angle between minus pi and pi.
Take 40.6413 north, 73.7781 west, and 51.4700 north, 0.4543 west, a pair of airport coordinates near New York and London. The central angle is 49.82 degrees. On a sphere of radius 6371 km that is 5,540.0 km. The initial bearing is 51.35 degrees and the final bearing is 107.94 degrees, so the heading swings by more than 56 degrees on the way.
Mixing the two up is the classic mistake. Reading the final bearing as the departure heading sends you 56 degrees off course from the first minute. A route that crosses the 180 degree meridian adds a second trap: a longitude of 170 east and one of 170 west are 20 degrees apart, not 340. A third trap is the number scale. Bearings are written 0 to 360 on a compass and often minus 180 to 180 in formulas, so the Valparaiso to Shanghai start heading appears as 265.59 or as minus 94.41. A longitude of 73.7781 west is minus 73.7781, and silently reading it as 286.22 east moves the start across the world without any error message.
How waypoints are found
A list of points along the route is how an aircraft plan or a hiker’s long leg is really flown, so the calculation matters beyond the total. The textbook method extends the great circle back to its node, the place where it crosses the equator heading north. The bearing there, called alpha zero, follows from the start bearing and latitude.
Measured as an angle along the circle from the node, the start sits at some angle sigma one and the end at sigma one plus the central angle. Napier’s rules for right spherical triangles then give the angle from the node to the start and, from it, the longitude of the node. Any point at any angle sigma has a latitude, a longitude and a local bearing, all from a few arctangents.
Equal spacing then takes only arithmetic. The midpoint takes the angle halfway between the two ends. A point a given distance along the way takes the start angle plus that distance divided by the radius. For this route, 500 km spacing makes 12 segments, eleven of 500 km and one of 40 km.
The vertex is the point of greatest latitude, found at an angle of 90 degrees from the node. For the New York to London route it lies at 53.66 degrees north and 22.94 degrees west, well north of both end points, and the route passes through it. If the route stops before it, the highest point is simply an end. For a route from Valparaiso to Shanghai the vertex is a southern one, at 33.26 degrees south, just beyond the start.
A second method checks the first. Treat each place as a unit vector from the centre of the globe, then blend the two vectors with weights that follow the arc. On 20,000 random pairs the two sets of waypoints agreed to better than a billionth of a degree. When two independent routes to the same point agree, a slip in either one stands out at once.
Sphere against a real Earth
The globe in these formulas is a perfect sphere, and the Earth is not. The commonly quoted globally averaged radius is 6371 km, with a variability of about 0.3 percent. The radius runs from 6356.752 km at the poles to 6378.137 km at the equator, and the curvature along a north to south line is about 1 percent greater at the poles than at the equator.
A sphere of 6371 km gives distances within 1 percent of the geodesic length on the WGS 84 ellipsoid, the standard behind satellite navigation. The route above is 5,554.9 km on the ellipsoid, so the sphere comes out 0.27 percent short. A longer route across the Pacific is worse in absolute terms and better in proportion: the worked Valparaiso to Shanghai route is 18,743 km on the sphere and 18,752 km on the ellipsoid, 0.05 percent apart.
The ellipsoid is solved with Vincenty’s inverse method, an iterative scheme reported accurate to within half a millimetre on the Earth. It maps the problem onto an auxiliary sphere and iterates until the longitude settles. Near opposite points it can fail to settle. The near-opposite pair at (0, 0) and (0.5, 179.5) took 182 steps here at a tolerance of one part in a trillion, and (0.5, 179.7) never settles. When that happens the honest output is no number, and the page says so.
Distance on a sphere has its own numerical trap. The older formula based on the cosine of the angle loses digits when two points are close, because the cosine of a small angle sits near one. The haversine form avoids that, and it loses accuracy only near opposite points, where the page switches to a form built from cross and dot products. Both rest on the same sphere.
What this does not do
A great circle is the shortest line on the model, not the line you fly. Airways, restricted airspace, winds and terrain bend real routes, and a hiker’s shortest line across a mountain is rarely a walkable one. The waypoints here assume nothing in the way.
It does not give a rhumb line, a line of constant bearing, which is a different curve with a different length. It does not give the great ellipse, and it does not solve the ellipsoid for the waypoints themselves. The ellipsoid appears only as a distance and two bearings, to show how far the sphere is off.
Use the numbers to plan, and use the gap to know how much to trust them. On a sphere of Earth size, expect an error of a few tenths of a percent in distance and a fraction of a degree in bearing.
Sources
Every source consulted for this guide. Links checked November 10, 2026.
- Great-circle navigation Wikipedia (CC BY-SA)
- Haversine formula Wikipedia (CC BY-SA)
- Vincenty's formulae Wikipedia (CC BY-SA)
- Earth radius Wikipedia (CC BY-SA)
- Great circle Wikipedia (CC BY-SA)
- Great-circle distance Wikipedia (CC BY-SA)
- Geodesics on an ellipsoid Wikipedia (CC BY-SA)
- Rhumb line Wikipedia (CC BY-SA)
- Gnomonic projection Wikipedia (CC BY-SA)
- World Geodetic System Wikipedia (CC BY-SA)
- Math.atan2() - JavaScript MDN Web Docs (CC BY-SA)
- Web Workers API MDN Web Docs (CC BY-SA)
- Intl.NumberFormat - JavaScript MDN Web Docs (CC BY-SA)