Compass Bearing Calculator

°
°
°
°
Math Updated 16 Jun 2026

Find the initial compass bearing (forward azimuth) from one point to another given their latitude and longitude. The bearing is the angle clockwise from true north you'd follow along the great-circle path. Enter the start and end coordinates to get the bearing in degrees and the nearest compass direction.

Formula

bearing = atan2(sin(Δlon)·cos(lat2), cos(lat1)·sin(lat2) − sin(lat1)·cos(lat2)·cos(Δlon))
  • This gives the initial bearing (forward azimuth) along the shortest great-circle route between two points.
  • The raw atan2 result runs from −180° to +180°; adding 360° and taking the remainder gives a 0–360° compass bearing.
  • 0° is true north, 90° east, 180° south and 270° west.
  • On a great circle the bearing changes as you travel, so this is the heading at the starting point only.
  • Coordinates are entered in decimal degrees, with south latitudes and west longitudes as negatives.

Islamabad (33.7, 73.1) to Karachi (24.9, 67.1)

Inputs
  • Start Latitude: 33.7 °
  • Start Longitude: 73.1 °
  • End Latitude: 24.9 °
  • End Longitude: 67.1 °

The formula returns an initial bearing of roughly 209°, i.e. heading south-southwest — the direction you'd first set off from Islamabad toward Karachi along the great-circle path.

Frequently asked questions

What is a compass bearing?
It's the direction from one point to another measured as an angle clockwise from true north, from 0° to 360°.
Why does the bearing change along the route?
The shortest path between two points on a sphere is a great circle, whose heading shifts as you travel. This calculator reports the initial bearing at the start.
How do I enter southern or western coordinates?
Use negative values: south latitudes and west longitudes are negative, north and east are positive.
Is this true bearing or magnetic bearing?
It's a true bearing, measured from true north. To get a magnetic bearing, adjust for the local magnetic declination.