Vincenty ellipsoidal distance calculator for two GPS points
Calculate the precise distance between two GPS coordinates using the Vincenty formula, which models the Earth as an ellipsoid (WGS84) rather than a perfect sphere — more accurate than the haversine formula, especially over long distances.
How it works
The Vincenty formula calculates the geodesic distance between two points by modeling the Earth as a reference ellipsoid (WGS84), which accounts for its slight flattening at the poles. The calculation proceeds through successive iterations until it converges.
Unlike the haversine formula (which assumes a perfectly spherical Earth), Vincenty offers millimeter-level accuracy for most pairs of points, at the cost of a more expensive calculation. It's used in geodesy, surveying and navigation systems that need high precision.
Vincenty or haversine: which one should you choose?
For everyday use (showing an approximate distance, sorting places by proximity), the haversine formula is more than enough and is faster to compute. Vincenty is preferable when millimeter-level accuracy matters, or for very long distances where the Earth's flattening has a measurable effect.
100% local processing: the calculation runs entirely in your browser via WebAssembly — your coordinates are never sent to a server.