Bearing Calculator

Start from two points on a grid, or from a bearing in any of three notations, and get every other form plus the back bearing and compass point.

0° to 90°, measured from north or south towards east or west.
Counter-clockwise from the positive x-axis (east); any value is wrapped into 0–360°.

Compass bearing (azimuth)

36.87°

Quadrant bearing

N 36.87° E

Nearest compass point

NE

Back bearing

216.87°

Mathematical angle

53.13°

Distance (two-point mode)

500

How it works

A compass bearing, or azimuth, is the direction of travel measured clockwise from north: 0° is north, 90° east, 180° south and 270° west. Surveyors often quote the same direction as a quadrant bearing, an acute angle measured from north or south towards east or west, so azimuth 150° is S 30° E. Mathematics measures angles the other way, counter-clockwise from the positive x-axis (east), so the same direction is a mathematical angle of 300°, and the two are related by math = 90° − azimuth.

From two points on a grid where x increases eastwards and y northwards, the bearing from the first to the second is atan2(Δx, Δy): the arguments are swapped compared with the usual atan2(y, x) because the reference direction is north, not east, and the angle runs clockwise. The result is wrapped into 0–360°, and the distance is √(Δx² + Δy²) in whatever unit the coordinates are in.

The back bearing is the direction from the destination back to the start, 180° away, so it is the bearing plus 180° or minus 180°, whichever lands in 0–360°. The compass point is the nearest of the 16 traditional names, each covering a 22.5° slice centred on its direction, so anything within 11.25° of 45° is NE.

Formula

azimuth      = atan2(Δx, Δy)  wrapped into [0°, 360°)       (Δx east, Δy north)
distance     = √(Δx² + Δy²)
back bearing = (azimuth + 180°) mod 360°
math angle   = (90° − azimuth) mod 360°      azimuth = (90° − math angle) mod 360°
N θ E → θ      S θ E → 180° − θ      S θ W → 180° + θ      N θ W → 360° − θ
compass point = the 16 names clockwise from N, index round(azimuth ÷ 22.5°) mod 16

Example

From (0, 0) to (300, 400): Δx = 300, Δy = 400, so the bearing is atan2(300, 400) ≈ 36.87°, the distance is √(300² + 400²) = 500, the back bearing is 216.87°, the quadrant bearing is N 36.87° E, the mathematical angle is 53.13°, and the nearest compass point is NE.

The quadrant bearing S 35° E is azimuth 180° − 35° = 145°, with back bearing 325° (N 35° W) and compass point SE.

Assumptions and limitations

  • Grid north is taken as the y-axis, so bearings from coordinates are grid bearings. True and magnetic north differ from grid north by the convergence and declination at the location; apply those corrections yourself.
  • Two-point mode is planar: it is exact on a projected grid (UTM, state plane) and a good approximation over short distances. For latitude and longitude, use the great-circle distance calculator.
  • The compass point is the nearest of the 16 named points; a bearing exactly on a boundary (11.25°, 33.75°, …) rounds to the point with the larger azimuth.
  • All angles are in degrees.

Frequently asked questions

Why is the back bearing not simply the bearing minus 180°?

It is, when the bearing is 180° or more. Below 180° subtracting would go negative, so you add 180° instead. The two rules are the same rule wrapped into the 0–360° range.

Is a quadrant bearing of N 90° E the same as azimuth 90°?

Yes, both are due east. The quadrant form is unusual at 0° and 90° because the direction is a cardinal point; the calculator spells those cases out.