Compass bearing calculator between two points
Calculate the bearing (initial heading) to follow to travel in a straight line from a point A to a point B based on their GPS coordinates, expressed in degrees (0-360°) and as a cardinal direction (N, NNE, NE...). 100% local processing in your browser (WebAssembly) — nothing is sent to a server.
How it works
The initial bearing (or heading) is the compass direction to follow starting from point A to take the shortest path to point B, following a great circle on the Earth's surface. Over long distances, this bearing isn't a constant straight line on a flat map: since the Earth is curved, you need to slightly adjust your direction along the way to stay on the shortest route.
What is it used for?
This type of calculation is used in maritime and air navigation to determine the heading to follow between two points, in orienteering to aim a compass at a landmark, or to point a directional antenna toward a specific transmitter or satellite.
100% local processing: the calculation happens entirely in your browser via WebAssembly — your coordinates are never sent to a server.