Distance Calculator — Between Coordinates
Calculate the distance between two or more GPS coordinates with haversine or Vincenty, plus bearings, midpoints and path length in km, mi or nmi.
🔒 Runs entirely in your browser — nothing is uploadedMeasure distances between points on the Earth
The shortest route between two places on a globe is a great-circle (or, on an ellipsoid, a geodesic) line, not a straight line on a flat map. This calculator measures that distance for any two points, and for a whole path with many stops: add as many lines as you like and it adds up every leg. For each leg you get the initial and final bearing and the midpoint, so you can plan a route, check a flight or ferry distance, compare hiking waypoints or verify the distance in a spreadsheet.
Haversine versus Vincenty
The haversine formula assumes a perfect sphere with a mean radius of 6,371.0088 km. It is simple, fast and robust, and for most everyday purposes the error stays around 0.3% or less. The Earth is slightly flattened, though, with an equatorial radius of 6,378.137 km and a polar radius of about 6,356.752 km. Vincenty's inverse formula accounts for this flattening by working on the WGS 84 ellipsoid, the same reference used by GPS, and reaches sub-millimetre agreement with exact geodesic solutions for most points. As a check, one degree of longitude along the equator measures 111.319 km with Vincenty and 111.195 km with haversine. Vincenty's iteration can fail for nearly antipodal points, so the tool automatically uses haversine there and shows a notice.
Bearings, midpoints and units
Bearings are measured clockwise from true north, from 0° to 360°, and shown with a 16-point compass name such as SSE. The midpoint is the point halfway along the great circle, which differs from the simple average of the latitudes and longitudes, especially over long distances. Results can be shown in kilometres, statute miles (1,609.344 m), nautical miles (exactly 1,852 m), metres or feet (0.3048 m), and the summary also lists the same distance in the other units. Distances are along the surface at sea level; they do not include elevation changes or road and trail routing.
How to use
- Enter your pointsPut one coordinate per line, at least two. Decimal degrees, DMS, UTM and MGRS are all accepted.
- Pick a method and unitChoose Vincenty for ellipsoidal accuracy or haversine for a quick spherical estimate, then select kilometres, miles, nautical miles, metres or feet.
- Read the resultsSee the total path length, the straight-line distance, initial and final bearing and the midpoint of each leg.
- Copy the summaryCopy the summary text or reverse the order of points to measure the return route.