Bearing calculator between two coordinates

Bearing Calculator: Compass Bearing Between Two Coordinates

A bearing is the compass direction from one point to another, measured clockwise from north. It is what you need to point an antenna tracker at your drone, set a heading for a boat or check a waypoint route. Enter two coordinates below to get the initial bearing in degrees and as a compass point, the reverse bearing and the approximate distance.

🧭 Bearing (Azimuth) Calculator

Calculates the initial bearing between two coordinates (relative to true north, 0–360°).
Start point (A)
Destination (B)
N E S W
Initial bearing
—°
—
🧭 Compass point (16-wind)—
📏 Distance (approx.)—
↩️ Reverse bearing (B→A)—
🗺️ Open route on map
⚠️ The bearing is relative to true north (geographic north). To compare it with a magnetic compass, apply your local magnetic declination. This is the initial bearing; over long distances the bearing on arrival (final bearing) can be different.
// makerion · build beyond limits

What is a bearing?

A bearing (also called azimuth) is an angle between 0° and 360°, measured clockwise from north:

BearingDirection
0° / 360°North (N)
90°East (E)
180°South (S)
270°West (W)

The 16-point compass rose divides the circle into 22.5° steps: N, NNE, NE, ENE, E and so on. The calculator shows both the exact angle and the nearest compass point.

The formula

The initial bearing θ from point 1 to point 2 is:

θ = atan2( sin Δλ · cos φ2 ,
           cos φ1 · sin φ2 − sin φ1 · cos φ2 · cos Δλ )

φ = latitude, λ = longitude (radians); normalise θ to 0–360°

Example: London (51.5074, −0.1278) to Paris (48.8566, 2.3522) → initial bearing 148.1° (SSE). The reverse bearing from Paris to London is 330.0°, not simply 148.1° + 180° = 328.1°.

Initial bearing vs final bearing

On a sphere, the shortest route between two points (a great-circle route) does not keep a constant compass direction. The bearing you start on is the initial bearing; the bearing you arrive on is the final bearing. Over short distances the difference is tiny, but over hundreds or thousands of kilometres it becomes significant. That is also why the reverse bearing is not exactly the forward bearing plus 180°.

A route that keeps a constant compass heading is called a rhumb line (loxodrome). It is easier to steer but slightly longer than the great-circle route.

True north vs magnetic north

The calculator gives bearings relative to true (geographic) north. A magnetic compass points to magnetic north, which differs by the local magnetic declination, anywhere from a fraction of a degree to more than 10° depending on where you are, and it changes slowly over time. To convert:

  • Magnetic bearing = True bearing − East declination (or + West declination)

Look up your current local declination from a geomagnetic model (for example NOAA’s or BGS’s online calculators). Flight controllers such as ArduPilot can apply declination automatically from GPS position.

Practical uses

  • Antenna trackers: Point a directional antenna at your drone or plane using its GPS position and your ground station location.
  • Drone and boat navigation: Check the heading between waypoints before a mission.
  • GNSS projects: Compute heading between two logged positions or two receivers.
  • Hiking and orienteering: Convert map coordinates into a compass heading.

To get the distance on its own with a map, use the distance between coordinates calculator. If your coordinates are in degrees-minutes-seconds, convert them first with the coordinate converter.

Frequently asked questions

Why isn’t the reverse bearing exactly 180° different?

Because great-circle routes curve relative to lines of longitude. Only on very short distances, or along the equator and meridians, is the reverse bearing almost exactly 180° from the forward bearing.

Can I use the bearing directly with my compass?

Only after applying your local magnetic declination, because the calculator uses true north.

How do I use this on an Arduino or ESP32?

Implement the atan2 formula above with your GPS module’s latitude and longitude in radians, then convert the result to degrees and normalise it to 0–360°.

Found this useful?Share it with a friend or follow us on Instagram for new projects.

Similar Posts