Azimuth Calculator

Find the compass bearing (azimuth) and great-circle distance between two latitude/longitude points using the standard spherical navigation formula.

Quick Facts

Formula
Spherical-trigonometry initial bearing (great-circle azimuth)
Azimuth is measured clockwise from true north: 0° = N, 90° = E, 180° = S, 270° = W.
Distance model
Haversine formula, mean Earth radius 6,371 km
Forward and back azimuth usually differ by more than 180° on long routes because the great-circle path curves relative to a flat map.

Your Results

Calculated
Forward azimuth (A → B)
-
Initial compass bearing from A to B
Back azimuth (B → A)
-
Initial bearing to return from B to A
Great-circle distance
-
Shortest path over Earth's surface
Compass direction
-
16-point heading for the forward azimuth

Ready

Enter the latitude and longitude of two points, then press Calculate.

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.

Frequently Asked Questions

What is azimuth?
Azimuth is the horizontal direction to a point, measured clockwise as an angle from true north (0°) around to 360°. North is 0°, east is 90°, south is 180°, and west is 270°. It is the standard way to express a compass bearing in navigation, surveying, and astronomy.
How is azimuth calculated between two coordinates?
This calculator uses the standard spherical-trigonometry bearing formula: θ = atan2(sin(Δλ) × cos(φ2), cos(φ1) × sin(φ2) − sin(φ1) × cos(φ2) × cos(Δλ)), then converts the result to a compass heading from 0° to 360°. The same coordinates are also run through the haversine formula to get the great-circle distance.
Why are the forward and back azimuth different by more than 180 degrees?
On a sphere, a great-circle route is generally not a straight line on a flat map, so the bearing measured at the destination looking back rarely equals the starting bearing plus exactly 180°. The difference grows with distance and with how far the path travels in latitude — it is a real effect of Earth's curvature, not a rounding error.
What Earth model does this calculator use?
It treats Earth as a perfect sphere with a mean radius of 6,371 km, the standard assumption behind the haversine distance formula, accurate to within about 0.5% for most navigation and planning purposes. Surveying work that needs millimeter precision should use an ellipsoidal model such as WGS84 instead.