Calculate bearing

Estimate initial and reverse great-circle bearings, distance, and a 16-point compass direction.

freeworks offlinenothing uploaded
ToolBearing Calculator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Initial bearing uses a spherical great-circle atan2 formula, and distance uses haversine angular separation multiplied by a 6,371 km Earth radius. Bearing is normalized to 0–360 degrees and mapped to a compass sector.

  • A spherical Earth keeps approximate navigation compact.
  • Reverse bearing is calculated separately because direction changes along a great-circle route.

Worked example

London to Paris
Input
											Start latitude: 51.5074
Start longitude: -0.1278
End latitude: 48.8566
End longitude: 2.3522
										
Output
												Initial bearing degrees: 148.12
Back bearing degrees: 330.02
Compass point: SSE
Great circle distance km: 343.56
											

When to use this

Hiking apps estimate waypoint direction, navigation lessons compare return bearings, and maps label route sectors.

Edge cases

  • Identical coordinates have no direction and are rejected.
  • Antimeridian paths need longitude wrapping.
  • Long ellipsoidal routes can differ from the spherical result.