Why a great-circle course keeps changing
The shortest path between two points on a sphere is the arc of the great circle through them — the circle whose plane passes through the centre of the Earth. Follow it and your heading changes continuously, because the meridians you cross are not parallel to one another. That is the single fact behind everything on this page: on a sphere there is no such thing as "the" bearing to a distant place, only an initial bearing, a final bearing, and a family of instantaneous bearings in between.
For the default London–New York leg the initial bearing is 287.9° and the final bearing is 231.3°. You leave England pointing west-north-west and arrive over Long Island pointing south-west, having turned 56.6° to the left without ever making a deliberate turn. Anyone who has watched a flight path bow northward on a seat-back map has seen the same geometry: the route looks curved because the map is a Mercator projection, on which straight lines are constant-heading courses rather than shortest ones.
The alternative is the rhumb line or loxodrome, the track you get by holding one compass heading the whole way. It crosses every meridian at the same angle, it plots as a straight line on a Mercator chart, and it is always at least as long as the great circle — equal only along a meridian or along the equator, and longer everywhere else. For London to New York the penalty is 219 km, about 3.9%. For Sydney to Santiago it is 12.6%, which is why long high-latitude routes are flown as great circles and short ones often are not.
Reading the bearing formula
The initial bearing comes from the four-parts formula of spherical trigonometry, arranged so that a two-argument arctangent can resolve the quadrant:
θ = atan2( sinΔλ · cosφ₂ , cosφ₁ sinφ₂ − sinφ₁ cosφ₂ cosΔλ )
The numerator is the east–west component of the direction to the target, and it carries the sign of Δλ: a destination to the east gives a positive y and a bearing in the first two quadrants, one to the west gives a negative y and a bearing above 180°.
The denominator is the north–south component. It is positive when the destination lies poleward of you along the route and negative when it lies equatorward, which is what separates 060° from 120°.
atan2 does the work that arctan cannot. A plain arctangent of y/x collapses two quadrants into one and would give the same answer for a target north-east and one south-west. Every implementation that gets bearings wrong at some longitudes has usually made this mistake.
The final bearing is not the initial bearing of the same leg. Compute the initial bearing from point 2 back to point 1 — that is the back azimuth, the course you would steer to return — and add 180°. For a short leg the back azimuth is close to the reciprocal of the initial bearing, but on the default transatlantic route the initial bearing is 287.9° while the back azimuth is 51.3°, and 287.9 − 180 = 107.9°, which is 56.6° away from it. That gap is the convergence of the meridians.
The rhumb-line course uses Δψ, the difference in stretched latitude — the vertical coordinate of the Mercator projection. Stretching latitude by ln tan(π/4 + φ/2) is precisely what makes a constant-heading track plot as a straight line, so on that coordinate the course is a simple atan2 of the two differences.
Worked example: London Heathrow to New York JFK
From 51.4775°N, 0.4614°W to 40.6413°N, 73.7781°W. Work in radians throughout.
- Differences. Δλ = −73.7781 − (−0.4614) = −73.3167°. φ₁ = 51.4775°, φ₂ = 40.6413°.
- Trigonometric terms. sinΔλ = −0.957906, cosΔλ = 0.287081, sinφ₁ = 0.782364, cosφ₁ = 0.622822, sinφ₂ = 0.651321, cosφ₂ = 0.758802.
- Numerator. y = −0.957906 × 0.758802 = −0.726861.
- Denominator. x = (0.622822 × 0.651321) − (0.782364 × 0.758802 × 0.287081) = 0.405657 − 0.170429 = 0.235229.
- Bearing. atan2(−0.726861, 0.235229) = −72.067°. Add 360°: 287.93° true, which is west-north-west.
- Distance. The haversine term is 0.177378, so the angular separation is 2·asin√0.177378 = 0.869509 rad = 49.819°, and d = 6371.0088 × 0.869509 = 5539.29 km, or 2990.98 nautical miles.
- Rhumb line. Δψ = ln[tan(45° + 20.3207°) ÷ tan(45° + 25.7388°)] = −0.273845, so θr = atan2(−1.279623, −0.273845) = 257.92°, and the rhumb distance is 5757.88 km.
- The penalty. 5757.88 − 5539.29 = 218.58 km, and 218.58 ÷ 5539.29 = 3.9% further for the convenience of never changing heading.
Check the chain: −0.726861 ÷ 0.235229 = −3.0900, and arctan(−3.0900) = −72.07° in the fourth quadrant, which is the same 287.93°.
Turning a computed bearing into a heading you can steer
These are true bearings until you apply declination. A magnetic compass points at the magnetic pole, not the geographic one, and the angle between them — declination to surveyors and aviators, variation to mariners — ranges from zero to more than 20° across populated latitudes and much more near the poles. The conversion is magnetic = true − east declination. The mnemonic sailors use is "east is least, west is best": subtract easterly variation from a true course, add westerly.
A compass heading is one further step. Deviation is the error caused by iron and electrical equipment in your own vehicle, it varies with heading, and it is read from a deviation card specific to that compass in that installation. This calculator stops at magnetic; no formula can give you deviation.
The initial bearing alone will not get you there. Hold 287.9° out of London and you diverge from the great circle immediately, because the great circle's heading changes with every mile. Practical great-circle navigation breaks the route into legs — commonly every 5° of longitude or every few hundred miles — and recomputes the initial bearing at each waypoint. Over a leg short enough, the rhumb line and the great circle differ by less than the accuracy of your steering.
Judge the rhumb penalty before you accept it. The extra distance is small on east–west legs near the equator and on any north–south leg, and large on long east–west legs at high latitude. The calculator reports both distances so you can see the trade directly rather than assuming it.
Expect metres of disagreement with ellipsoidal software. This page models the Earth as a sphere of radius 6371.0088 km, the IUGG mean radius. The Earth is an oblate spheroid flattened by about 1 part in 298, so spherical distances can differ from Vincenty or Karney solutions on the WGS-84 ellipsoid by up to roughly 0.5%, and bearings typically by a few hundredths of a degree at continental range. For passage planning that is immaterial; for survey work it is not.
Initial, final and rhumb courses for long-haul routes
| Route | Initial bearing | Final bearing | Rhumb course | Great circle (km) | Rhumb (km) | Rhumb penalty |
|---|---|---|---|---|---|---|
| London LHR → New York JFK | 287.9° | 231.3° | 257.9° | 5,539 | 5,758 | 3.9% |
| New York JFK → London LHR | 51.3° | 107.9° | 77.9° | 5,539 | 5,758 | 3.9% |
| Tokyo HND → Los Angeles LAX | 55.7° | 125.8° | 91.1° | 8,813 | 9,303 | 5.6% |
| Cape Town → Perth | 120.7° | 57.2° | 88.6° | 8,690 | 9,086 | 4.6% |
| Sydney → Santiago | 145.2° | 34.5° | 89.7° | 11,341 | 12,775 | 12.6% |
| Anchorage → Tokyo HND | 272.9° | 216.3° | 240.5° | 5,566 | 5,782 | 3.9% |
Notice that the London–New York pair is not simply reciprocal: 287.9° out and 51.3° back differ from each other by 123.4°, not 180°. Reciprocal bearings hold on a flat plane, not on a sphere.
Sign conventions this calculator uses
Latitude is positive north, negative south. Longitude is positive east, negative west, so 73°46′W is entered as −73.7781. Bearings are measured clockwise from true north over 0–360°, which is the azimuth convention used in aviation, marine navigation and surveying alike. Magnetic declination is positive east. If your source gives declination as "14°W", enter −14. Getting any of these signs backwards produces an answer that is plausible and wrong, which is the most expensive kind.
Mistakes that produce a plausible wrong bearing
- Using arctan instead of atan2. The single most common error. It silently folds two quadrants together and gives a bearing 180° out for half the sky.
- Feeding degrees to the trigonometric functions. Every sine and cosine in these formulas takes radians. The result of forgetting the conversion is a number that still looks like a bearing.
- Assuming the return course is the reciprocal. Add 180° to the initial bearing and you get the reciprocal, not the back azimuth. The two agree only on short legs and on meridians.
- Applying declination the wrong way. True to magnetic subtracts easterly declination; magnetic to true adds it. Reversing this doubles the error rather than removing it.
- Steering the initial bearing all the way. That is a rhumb line, not a great circle, and on a long high-latitude leg it will land you hundreds of kilometres from where you intended.
- Ignoring the ±180° longitude wrap. A leg from 179°E to 179°W is 2° apart, not 358°. This calculator takes the short way round for the rhumb course; hand calculations often do not.
- Treating the answer as survey-grade. A spherical model is not an ellipsoidal one. Where the difference matters, use a Vincenty or Karney geodesic solution on WGS-84.
Where bearings fit among the other navigation calculations
Bearing and distance are the two halves of the inverse geodetic problem: given two positions, find the course and range between them. If you only need the range, the great-circle distance calculator covers it directly. The direct problem — given a start, a course and a distance, find the destination — is the one dead reckoning uses, and the cross-track error calculator answers the related question of how far off the intended track you have drifted.
Coordinates rarely arrive in the format you need. Degrees-minutes-seconds, decimal degrees and grid references all describe the same point, and the GPS coordinate conversion calculator and the UTM coordinate converter handle the translations. Bearings themselves come in more than one convention: the quadrant form "N 45° E" used on deeds and older surveys is not the same as the 045° azimuth used here, and the bearing to azimuth converter moves between them.
Beyond navigation, the same formula points antennas. A satellite dish or a directional HF antenna is aimed with exactly this azimuth, computed from your position to the sub-satellite point or to the distant station, which is why amateur radio operators call the great-circle plot a "beam heading" map. And if you are checking a compass against the sky rather than against a model, the sun compass error calculator uses the Sun's azimuth as the reference — the oldest form of the same calculation, and the one that needs no magnetic model at all.
