Distance calculator between two GPS coordinates

Calculate the straight-line distance between two GPS points from their latitude and longitude, using the haversine formula.

Example:

How it works

The haversine formula calculates the straight-line distance between two points on the surface of a sphere from their latitude and longitude. It accounts for the Earth's curvature, unlike a simple straight-line distance calculation on a flat plane.

The result corresponds to the shortest possible path between the two points, called a great circle, assuming the Earth is a perfect sphere. This is a very close approximation to reality, widely used in navigation and geolocation.

Is this distance the actual road distance?

No, this is the "as the crow flies" distance between the two points, without accounting for terrain, roads or obstacles. The distance actually traveled by car, on foot or by bike will almost always be longer, sometimes significantly so depending on the layout of the available infrastructure.

100% local processing: the calculation is done entirely in your browser via WebAssembly — your coordinates are never sent to a server.