Azimuth Calculator | Calculate Bearing Between Coordinates

Azimuth Calculator

Calculate the initial great-circle azimuth from Point A to Point B using latitude and longitude. The result is measured clockwise from true north on a spherical Earth model.

North = 0° · East = 90° · South = 180° · West = 270°
Enter decimal-degree coordinates. The output is the starting direction at Point A, not a constant heading for the whole route.
Point A (From)
Point B (To)
Enter coordinates for both points to calculate the initial azimuth.

Read the number as a starting direction

This calculator returns the initial azimuth at Point A. Azimuth increases clockwise from true north: 0° is north, 90° east, 180° south, and 270° west.

N
E
90°
S
180°
W
270°

The 16-point compass label is a convenience classification. Each label spans a 22.5° sector; the degree value is the actual calculated output.

The spherical great-circle calculation

With Point A latitude φ₁, Point B latitude φ₂, and longitude difference Δλ, the calculator evaluates:

x = sin(Δλ) × cos(φ₂)
y = cos(φ₁) × sin(φ₂) − sin(φ₁) × cos(φ₂) × cos(Δλ)
azimuth = atan2(x, y)
normalized azimuth = (azimuth + 360°) mod 360°

This is a spherical model. It is useful for general geographic direction and great-circle reasoning, but it is not an ellipsoidal surveying solution. High-precision geodesy normally solves the inverse geodesic problem on a reference ellipsoid such as WGS84.

Check case: New York City → London

Point A
40.7128°, −74.0060°
Point B
51.5074°, −0.1278°
Spherical initial azimuth
51.212617°
16-point compass sector: NE

This is the direction at departure under the calculator's spherical model. A WGS84 ellipsoidal inverse solution is slightly different, so the two values should not be mixed as though they came from the same model.

Why swapping the points changes more than 180°

On most great-circle routes, the direction changes as you move along the path. The initial azimuth from A to B therefore is generally not just 180° away from the initial azimuth from B to A.

Use Swap A ↔ B when you need the initial direction for the reverse trip. Do not infer it by simply adding or subtracting 180° unless the geometry of the route makes that valid.

Coordinates that do not have one usable answer

Same location

If A and B represent the same point, there is no direction from A to B. The calculator returns no azimuth instead of manufacturing a 0° result.

Exact antipodes

Exact opposite points on a sphere can be connected by infinitely many great circles, so there is no unique initial great-circle azimuth. The calculator reports that case explicitly.

True north, not magnetic north

Latitude and longitude define the result relative to geographic north. A magnetic-compass course requires a location- and date-specific magnetic declination adjustment that this calculator does not perform.

Surveying and precision geodesy

For boundary, engineering, or other precision work, use an ellipsoidal geodesic method and the coordinate reference system required by the project. This spherical result should not be presented as a survey-grade bearing.

Related Tools