Time, Date, Navigation & Astronomy Navigation, Coordinates & Celestial Position Spherical trigonometry on the IUGG mean-radius sphere (R = 6371.0088 km)

Great Circle Bearing and Course Calculator

Enter two positions in decimal degrees and this calculator returns the initial great-circle bearing you steer to leave the first, the final bearing you arrive on at the second, the back azimuth for the return leg, and the constant rhumb-line course that would get you there without ever changing heading. It also gives both distances, so you can see what the rhumb line costs you. Enter your local magnetic declination and every course is repeated as a magnetic heading.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Latitude 1Decimal degrees, north positive; the default is London Heathrow.51.4775 °
Longitude 1Decimal degrees, east positive, so western longitudes are negative.-0.4614 °
Latitude 2Decimal degrees, north positive; the default is New York JFK.40.6413 °
Longitude 2Decimal degrees, east positive, so western longitudes are negative.-73.7781 °
Magnetic declination (variation)East positive, west negative; look yours up in the current World Magnetic Model. Leave at 0 to work in true bearings only.0 °

It returns

  • Initial great-circle bearing (true) — The heading to steer as you leave point 1. It changes continuously along the route.
  • Final bearing on arrival (true)
  • Back azimuth — initial bearing of the return leg
  • Rhumb-line course (true) — A single constant heading from point 1 to point 2.
  • Initial bearing as a magnetic heading
  • Great-circle distance
  • Great-circle distance in nautical miles
  • Rhumb-line distance

The formula

θ=atan2(sinΔλcosφ2,cosφ1sinφ2sinφ1cosφ2cosΔλ)
θr=atan2(Δλ,Δψ),Δψ=lntan(π/4+φ2/2)tan(π/4+φ1/2)
d=2Rasinsin2(Δφ/2)+cosφ1cosφ2sin2(Δλ/2)

In plain text: θ = atan2( sin Δλ · cos φ₂ , cos φ₁ · sin φ₂ − sin φ₁ · cos φ₂ · cos Δλ )

  • θInitial great-circle bearing, normalised to 0–360° clockwise from true north (°)
  • φ₁, φ₂Latitude of the start and end points, north positive (rad)
  • ΔλLongitude of the end point minus that of the start point, east positive (rad)
  • RMean Earth radius used for distance, 6371.0088 km (km)

atan2 resolves the quadrant, which a plain arctangent cannot. Latitude and longitude must be in radians inside the trigonometric functions.

Updated Category Navigation, Coordinates & Celestial Position Verified against published test cases Reading time 11 min

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.

  1. Differences. Δλ = −73.7781 − (−0.4614) = −73.3167°. φ₁ = 51.4775°, φ₂ = 40.6413°.
  2. Trigonometric terms. sinΔλ = −0.957906, cosΔλ = 0.287081, sinφ₁ = 0.782364, cosφ₁ = 0.622822, sinφ₂ = 0.651321, cosφ₂ = 0.758802.
  3. Numerator. y = −0.957906 × 0.758802 = −0.726861.
  4. Denominator. x = (0.622822 × 0.651321) − (0.782364 × 0.758802 × 0.287081) = 0.405657 − 0.170429 = 0.235229.
  5. Bearing. atan2(−0.726861, 0.235229) = −72.067°. Add 360°: 287.93° true, which is west-north-west.
  6. 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.
  7. 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.
  8. 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

Great-circle and rhumb-line solutions on a sphere of radius 6371.0088 km, using airport reference coordinates.
RouteInitial bearingFinal bearingRhumb courseGreat circle (km)Rhumb (km)Rhumb penalty
London LHR → New York JFK287.9°231.3°257.9°5,5395,7583.9%
New York JFK → London LHR51.3°107.9°77.9°5,5395,7583.9%
Tokyo HND → Los Angeles LAX55.7°125.8°91.1°8,8139,3035.6%
Cape Town → Perth120.7°57.2°88.6°8,6909,0864.6%
Sydney → Santiago145.2°34.5°89.7°11,34112,77512.6%
Anchorage → Tokyo HND272.9°216.3°240.5°5,5665,7823.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.

Frequently asked questions

Why is the bearing from A to B not the reverse of the bearing from B to A?

Because meridians converge toward the poles, so a great circle crosses each one at a different angle. From London to New York the initial bearing is 287.9°; from New York to London it is 51.3°. Adding 180° to the first gives 107.9°, which is 56.6° away from the true return course. Only on a meridian, on the equator, or over short distances do the two become reciprocal.

What is the difference between initial bearing and final bearing?

The initial bearing is the heading as you leave the start point; the final bearing is the heading as you arrive at the destination, still on the same great circle. They differ by the convergence of the meridians between the two points, which grows with the east–west extent of the leg and with latitude. This calculator gives both, plus the back azimuth, which is the initial bearing of the return leg.

Should I fly or sail the great circle or the rhumb line?

Great circle for long legs, rhumb line when the saving is smaller than the inconvenience. The rhumb line is never shorter, and its penalty grows with the east–west span and the latitude: 3.9% on London–New York but 12.6% on Sydney–Santiago. Short coastal passages are routinely sailed as rhumb lines because holding one heading is far simpler than a sequence of course changes.

How do I convert a true bearing to a magnetic heading?

Subtract easterly declination and add westerly: magnetic = true − declination, with east positive. A true course of 045° where declination is 14°W (entered here as −14) becomes a magnetic heading of 059°. Enter your declination in the optional field and every course in the results table is repeated in magnetic. Look the value up in the current World Magnetic Model, because declination drifts by a fraction of a degree per year.

What accuracy should I expect from a spherical model?

Distances within roughly 0.5% and bearings within a few hundredths of a degree at continental range. The Earth is flattened by about 1 part in 298, so a sphere of mean radius 6371.0088 km is an approximation. That is well inside the tolerance of passage planning and antenna pointing, and outside the tolerance of survey and cadastral work, which needs a geodesic solution on the WGS-84 ellipsoid.

Why does the calculator refuse to give a bearing for antipodal points?

It gives one but flags it, because for exactly opposite points every great circle through them is an equally short path, so the bearing is genuinely indeterminate rather than merely hard to compute. The same degeneracy makes the answer numerically unstable for points very close to antipodal, where a tiny change in either position swings the bearing wildly.

What compass point corresponds to my bearing?

Divide the bearing by 22.5 and round to the nearest whole number to get the index into the 16-point rose, starting at north. A bearing of 287.93° gives 287.93 ÷ 22.5 = 12.8, which rounds to 13 — west-north-west. The results table below the calculator shows the point name for every course it computes.

Can I use this for pointing a satellite dish or a directional antenna?

Yes for the azimuth. Enter your own position as point 1 and the target's as point 2, and the initial bearing is the azimuth to aim, which you then convert to magnetic if you are sighting with a compass. For a geostationary satellite, use the sub-satellite point — latitude 0 and the satellite's orbital longitude — as point 2. Elevation angle is a separate calculation this page does not perform.

References

  • The American Practical Navigator (Bowditch), Publication No. 9National Geospatial-Intelligence Agency
  • World Magnetic Model (WMM)NOAA National Centers for Environmental Information and the British Geological Survey
  • Direct and Inverse Solutions of Geodesics on the Ellipsoid with Application of Nested Equations, Survey Review 23(176), 88–93 (1975) — T. Vincenty, Directorate of Overseas Surveys
  • Geodetic Reference System 1980, Journal of Geodesy 74, 128–133 (2000) — source of the IUGG mean radius — H. Moritz, Springer