GPS Bearing & Distance Calculator

Enter two or more GPS coordinate pairs to instantly see the straight-line distance in kilometres, miles, or nautical miles, the compass bearing between them, and a live map with a line connecting the points. Nothing uploaded.

Haversine distance ? km / miles / nm True bearing ? Magnetic bearing ? Live map Compass rose Multi-leg route KML export ?
Distance
Distance
Distance ?
True bearing A to B ?
Reverse bearing B to A
Magnetic bearing A to B ?
Midpoint (A–B) ?

Learn more: GPS bearing, distance, and navigation calculations

The haversine formula - calculating distance between two points

The haversine formula calculates the shortest path (great-circle distance) between two points on the surface of a sphere - Earth. It accounts for the curvature of the Earth and is accurate to within 0.5 percent anywhere on Earth. The formula takes the latitude and longitude of two points and returns the distance. This calculator also shows the Vincenty formula as an alternative, which is slightly more accurate for ellipsoidal Earth models but requires more computation.

True bearing versus magnetic bearing - why the compass difference matters

True bearing is measured clockwise from geographic north (the North Pole). Magnetic bearing is measured from magnetic north, where a compass needle actually points. They differ by the local magnetic declination - the angle between the two norths. Declination varies significantly by location (from -20 degrees in parts of the western USA to +20 degrees in eastern Russia) and changes slowly over time. For field navigation, you need magnetic bearing because your compass reads magnetic north. This calculator corrects for declination automatically based on location and year.

Multi-leg routes and waypoint navigation

The calculator lets you chain up to 10 waypoints into a route, showing the distance for each leg and the total route distance. Useful for trip planning, hiking routes, or multi-leg flights. Each waypoint can have its own coordinates, and you can export the entire route as KML for import into Google Earth or other mapping software.

FAQ

Can I use this for hiking or orienteering?

Yes. Enter two waypoints, get the bearing and distance. Magnetic bearing accounts for your location's compass declination, so you can navigate with a physical compass. Export the route as KML to load into a GPS device or mapping app.

What is the reverse bearing used for?

If you are at Point A heading toward Point B with bearing X degrees, the reverse bearing tells you what direction back to Point A - useful if you get turned around and need to backtrack.

Why do I need the midpoint?

The midpoint is the geographic center between two coordinates on the great-circle route. Useful for meeting points between two locations, or for resupply planning on long routes.

Last reviewed: June 2, 2026