Haversine Distance Between Two Coordinates
Enter two latitude and longitude pairs to get the great-circle distance in kilometers and miles, using Earth mean radius R = 6371 km.
Distância
—
Haversine distance from raw coordinates
Given two points (φ₁, λ₁) and (φ₂, λ₂) in latitude and longitude, the Haversine formula returns the great-circle (shortest) distance over the Earth's surface: d = 2R·asin(√(sin²(Δφ/2) + cos φ₁·cos φ₂·sin²(Δλ/2))), with R = 6,371 km (Earth's mean radius) and angles in radians. Typical error stays under 0.5% because the Earth is an oblate spheroid, not a sphere. For sub-meter precision over thousands of kilometers, Vincenty's formula models the ellipsoid directly. Example: São Paulo (-23.5505, -46.6333) to Rio de Janeiro (-22.9068, -43.1729) → ~360 km straight line — actual driving distance is ~430 km.
Applications
Geofencing in ride-hailing (Uber) and delivery (iFood) to define service zones; "search by radius" on real-estate platforms (QuintoAndar); fleet tracking and dispatch; GPS proximity alerts; nearest-store lookups — anywhere two GPS coordinates need a fast, accurate distance.
FAQ
Why not Pythagoras on lat/lng? Latitude and longitude are angles, not Cartesian distances — one degree of longitude shrinks toward the poles. Pythagoras only works after a flat projection and over small areas.
Does it handle the date line? Yes — Haversine works for any pair of points on the globe, including antipodal pairs and crossings of the 180° meridian.
Straight-line vs driving distance? Haversine is "as the crow flies" — actual road distance is usually 20–40% longer due to road geometry.
Related Tools
Distance Between Coordinates
Calculate the great-circle distance between two GPS points using the Haversine formula. Result in km, miles and nautical miles, with bearing. Everything in your browser.
Flight Distance (Haversine Formula)
Enter origin and destination latitude and longitude in degrees for the great-circle distance in km, taking Earth's mean radius as 6371 km.
3D Points Distance
Computes the Euclidean distance between two points in 3D space from their coordinates.
Landing Distance Estimate
Estimate landing distance d ≈ V²/(2·a).
Star Distance Modulus Calculator
Computes distance modulus m - M and equivalent distance in parsecs from apparent and absolute star magnitudes.
Glide Distance
Compute the horizontal distance an aircraft (or glider) travels in an unpowered glide, d = altitude · glide ratio, multiplying the available height by the glide ratio (how many meters it advances per meter descended, equal to L/D). A glider with a 40:1 ratio at 1000 m reaches 40 km. It is the engine-out range and landing-circuit calculation. Enter the altitude and the glide ratio.
The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.