Understanding Azimuth and Great-Circle Bearing
Azimuth is the horizontal direction to a point, expressed as a compass angle measured clockwise from true north: 0° points north, 90° points east, 180° points south, and 270° points west. Given the latitude and longitude of two points, this calculator finds the initial azimuth — the compass heading you would face at the start of the great-circle (shortest-path) route between them — along with the return bearing and the distance itself.
The forward-azimuth formula
For a starting point A (latitude φ1, longitude λ1) and a destination B (latitude φ2, longitude λ2), the standard spherical-trigonometry bearing formula is:
θ = atan2( sin(Δλ) · cos(φ2), cos(φ1) · sin(φ2) − sin(φ1) · cos(φ2) · cos(Δλ) )
where Δλ = λ2 − λ1. The result θ is converted from radians to degrees and normalized to the 0–360° range to give the forward azimuth. The back azimuth (the bearing you would need at B to head back to A) is found by running the same formula with the two points swapped — it is generally not simply the forward azimuth plus 180°, because a great-circle path curves relative to a flat map except along the equator or a meridian.
Great-circle distance
Distance is computed with the haversine formula, which also assumes a spherical Earth of mean radius 6,371 km:
a = sin²(Δφ/2) + cos(φ1) · cos(φ2) · sin²(Δλ/2), then distance = 2R · atan2(√a, √(1−a))
This treats Earth as a perfect sphere, which is accurate to within roughly 0.5% of the true ellipsoidal distance — precise enough for navigation, antenna aiming, and general planning, though surveying work that needs millimeter accuracy should use an ellipsoidal (WGS84) model instead.
How to read the result
- Enter latitude as a signed decimal degree (north positive, south negative) and longitude the same way (east positive, west negative).
- The forward azimuth is the compass heading to leave Point A on; the compass direction card converts it to a familiar 16-point label like NE or WSW.
- The back azimuth tells you the heading to leave Point B on if retracing the same great-circle route toward Point A.
- If Point A and Point B are the same location, azimuth is undefined — the calculator will flag this rather than return a meaningless angle.