Skip to content
100% local

GPS distance calculator

Calculate the distance, bearing and midpoint between GPS coordinates.

Input
Output

GPS distance calculator

Paste two or more GPS coordinates, one pair per line, and this tool calculates the great-circle distance between each consecutive pair using the haversine formula, along with the initial and final bearing (the compass direction you would travel) and the midpoint between them. Add more than two points and it also totals the full route length — useful for checking flight paths, hiking trails, delivery routes or the distance between two cities before committing to a trip.

Coordinates can be plain decimal degrees ("48.8566, 2.3522") or degrees-minutes-seconds with a hemisphere letter ("48°51'24"N, 2°21'08"E") — the parser detects the format per line, so a list can mix both. Choose the output unit — kilometers, miles or nautical miles — and how many decimal places to show. Turn on the Vincenty option for a more precise result on the WGS84 ellipsoid instead of the faster spherical approximation; the difference usually only matters over long distances or when sub-meter accuracy is needed. Toggle bearing and midpoint on or off, switch the output between plain text and a tab-separated table, and choose whether the midpoint itself is shown as decimal degrees or DMS.

A line that is not valid coordinates is skipped and flagged rather than stopping the whole calculation, so one mislabeled row in a longer list does not block the rest. The tool handles Windows and Unix line endings the same way, and the live tally under the output reports the number of points, the total distance and the number of segments as you type.

Everything runs locally in your browser — coordinates never leave your device. Copy the result, download it as a .txt file, or send the output back into the input to chain another calculation.

FAQ

What formula does it use to calculate distance?
By default it uses the haversine formula, which treats Earth as a sphere and is accurate to within about 0.5%. Turn on the Vincenty option for an ellipsoidal calculation on the WGS84 model, which is more precise, especially over long distances.
Can I calculate the distance across more than two points?
Yes. Add one coordinate pair per line and the tool calculates the distance, bearing and midpoint for each consecutive pair, plus the total route length across every point.
What coordinate formats are accepted?
Decimal degrees ("48.8566, 2.3522") and degrees-minutes-seconds with a hemisphere letter ("48°51'24"N, 2°21'08"E") are both recognized, and you can mix formats across lines.
What happens if a line isn't a valid coordinate pair?
That line is skipped and flagged in the output, so a single typo or mislabeled row does not stop the rest of the calculation.
Is my location data uploaded anywhere?
No. The calculation runs entirely in your browser — your coordinates are never sent to a server.