GPS Distance & Bearing Calculator

Enter two sets of GPS coordinates to instantly calculate the distance in kilometres, miles and nautical miles, plus the initial bearing, return bearing and midpoint. Results update automatically as you type.

Point A
Point B
Enter coordinates for both points to see distance and bearing.

How to use this calculator

Enter the decimal-degree latitude and longitude for both points. Results (distance, bearings and midpoint) update automatically as you type. Press My Location next to either point to fill it with your current GPS position. Use the swap button to reverse the direction of travel.

Coordinate format

Enter coordinates in decimal degrees (DD). Positive latitude = north; negative = south. Positive longitude = east; negative = west. For example, Madrid is 40.416775, -3.703790 and Paris is 48.856613, 2.352222.

Need to convert from degrees-minutes-seconds (DMS) first? Use our GPS Coordinate Converter.

Distance units

About the Haversine formula

The Haversine formula calculates the shortest path between two points on a sphere (great-circle distance). It is highly accurate for most purposes — the error is less than 0.5% even for antipodal points. For centimetre-level surveying accuracy, the Vincenty formula on the WGS84 ellipsoid would be used instead.

Bearing explained

The initial bearing is the compass direction you must face at Point A to head directly toward Point B along the great circle. The return bearing is the direction from B back to A. Due to Earth's curvature, the return bearing is not simply 180° opposite the initial bearing — it differs slightly, especially for long distances.

Step-by-step guide GPS Distance & Bearing — How the Maths Works →