Bearing & Midpoint Calculator
Initial and final bearing plus midpoint between two coordinates.
Overview
The Bearing and Midpoint Calculator returns three navigation values for any pair of latitude/longitude coordinates: the initial bearing leaving point A, the final bearing arriving at point B, and the geographic midpoint of the great-circle route between them. It is the everyday companion to a distance calculator - distance tells you how far, bearing tells you which way.
Surveyors, sailors, drone operators, and GIS analysts use these values constantly. The initial bearing is the compass heading you would steer if you began the route right now; the final bearing is the heading you would be on at arrival. On long routes the two differ noticeably because a great-circle path curves on a Mercator map. The midpoint is the exact halfway coordinate along that curve, useful for relay stations, meeting points, or splitting a long flight into legs.
How it works
Bearings are calculated from the spherical law of cosines and atan2 on the WGS84 sphere. The initial bearing formula is atan2(sin(Δλ)·cos(φ₂), cos(φ₁)·sin(φ₂) − sin(φ₁)·cos(φ₂)·cos(Δλ)), where φ is latitude in radians, λ is longitude in radians, and Δλ is the longitude delta. The result is converted from radians to degrees and normalised into the [0, 360) range so North is 0, East is 90, South is 180 and West is 270. The final bearing is the initial bearing of the reverse route plus 180 degrees, again wrapped into [0, 360).
The midpoint uses the standard spherical midpoint formula, projecting both endpoints onto a unit sphere, averaging their Cartesian vectors, and converting back to lat/lng.
Examples
- London (51.5074, -0.1278) to New York (40.7128, -74.0060) - initial bearing about 288 degrees (WNW), final bearing about 237 degrees (WSW), midpoint near (52.4, -41.3) in the North Atlantic.
- Tokyo (35.68, 139.69) to Los Angeles (34.05, -118.24) - initial bearing about 54 degrees (NE), reflecting the great-circle route that arcs north through Alaska.
- Cape Town (-33.93, 18.42) to Sydney (-33.87, 151.21) - initial bearing about 141 degrees, midpoint deep in the Southern Ocean.
- Two nearby points (40.0, -74.0) and (40.1, -74.0) - bearing is essentially 0 degrees due north and the midpoint is the simple average.
FAQ
Why does the bearing change between start and finish?
Great-circle paths on a sphere don't trace a constant heading. The longer the route, the more the heading drifts; on a true east-west long-haul flight the difference can exceed 60 degrees.
Is this the same as a rhumb line bearing?
No. A rhumb line keeps a constant compass heading and is longer than a great circle. The values returned here are great-circle bearings.
What units does the tool use?
Bearings come back in decimal degrees from true north, not magnetic north. Apply your local magnetic declination if you need a compass-relative heading.
Does it work across the antimeridian?
Yes. The formulas handle longitude wraparound automatically, so a route from (0, 179) to (0, -179) returns roughly 90 degrees, not 270.