Compute the compass bearing between two points given their coordinates.
A bearing is the angle measured clockwise from north (the positive Y-axis) to the direction of travel. It ranges from 0° to 360°. This calculator uses atan2(Δx, Δy) to get the correct quadrant and normalises to [0, 360).
Bearing formula
bearing = atan2(Δx, Δy) mod 360°
In navigation they are often used interchangeably. Both measure direction clockwise from north. 'Heading' typically refers to the direction a craft is pointing; 'bearing' to the direction to a target.
Standard math angles are measured counter-clockwise from the positive x-axis. Bearings are measured clockwise from north (positive y-axis).