Distance Calculator
Result Summary
No results yet
Enter your details and hit “Calculate” to see your results.
About Distance Math
“How far apart?” splits into two universes: geometry class's coordinate grid, where Pythagoras answers exactly, and the round planet, where straight lines become great circles and the formula grows trigonometry. Both live here, labeled honestly.
Pick the mode, enter the four values (negatives fine in both — southern latitudes and western longitudes are negative by convention), and get the distance with the working. Coordinate mode adds the midpoint; map mode converts between kilometers and miles automatically.
The rise-over-run companion to coordinate distance is the Slope Calculator
The Two Formulas
Pythagoras for grids, haversine for globes:
2D: d = √((x₂−x₁)² + (y₂−y₁)²) Haversine: a = sin²(Δφ/2) + cosφ₁·cosφ₂·sin²(Δλ/2) d = 2R·atan2(√a, √(1−a)), R = 6,371 km
Worked examples: (1,2) to (4,6) is the famous 3-4-5 triangle — distance exactly 5, midpoint (2.5, 4). New York (40.71, −74.01) to Los Angeles (34.05, −118.24): 3,936 km / 2,446 miles of crow flight; the interstate drive runs about 4,500 km.
Worked Examples
Both modes exercised — every value from this calculator:
| From → To | Mode | Distance |
|---|---|---|
| (0,0) → (3,4) | 2D | 5 (the 3-4-5 triangle) |
| (1,2) → (4,6) | 2D | 5, midpoint (2.5, 4) |
| (−2,4) → (2,−4) | 2D | 8.94 |
| New York → Los Angeles | Map | 3,936 km / 2,446 mi |
| London → Paris | Map | ≈ 344 km / 214 mi |
| Sydney → Auckland | Map | ≈ 2,156 km / 1,340 mi |
The 3-4-5 rows aren't decoration — that triangle is the same squaring trick tile-setters and builders use to check corners.
Crow Miles vs Road Miles
Great-circle distance is aviation's and shipping's truth (flight paths arc poleward on maps precisely because the sphere's shortest path looks curved on flat projections), but ground travel adds geometry's taxes: road networks, terrain, water crossings. The 20–40% premium is typical; mountain and coastal routes exceed it, gridded plains undercut it.
Precision notes for the curious: the haversine's ~0.5% error comes from treating Earth as a sphere (it's an oblate ellipsoid — equatorial radius 21 km fatter); surveying-grade work uses Vincenty or geodesic libraries on the WGS84 ellipsoid. And decimal-degree inputs matter: 40.7128, not 40°42′46″ — convert DMS by degrees + minutes/60 + seconds/3600.
Frequently Asked Questions
How do I find the distance between two points?
On a grid: √((x₂−x₁)² + (y₂−y₁)²) — for (1,2) and (4,6) that's √(9+16) = 5. On a map: switch modes and enter latitudes/longitudes; the haversine handles the sphere.
How accurate is the map distance?
Within about 0.5% — the haversine assumes a spherical Earth (radius 6,371 km) while the real planet bulges slightly. For city-to-city planning it's effectively exact; for surveying, ellipsoid formulas take over.
Why is driving distance longer than this?
This is straight-line (great-circle). Roads detour around terrain, water, and property — typically adding 20–40%. NYC–LA: 2,446 crow miles vs ~2,800 interstate miles. Use mapping apps for routes; use this for the geometric truth.
How do I enter coordinates from Google Maps?
Right-click a point → the decimal coordinates (like 40.7128, −74.0060) copy directly into map mode. South latitudes and west longitudes are negative — the minus signs matter.
What's the midpoint formula?
Average the coordinates: ((x₁+x₂)/2, (y₁+y₂)/2) — coordinate mode reports it automatically. On the globe, midpoints of long routes need spherical interpolation; the flat average misleads across oceans.
Can I calculate 3D distance?
The formula extends naturally — add (z₂−z₁)² under the root. Run the 2D part here and combine with the height difference: √(d₂D² + Δz²). For most practical cases (buildings, drones), the vertical term barely moves the answer.
Methodology. This calculator uses standard, peer-reviewed mathematical formulas. It is reviewed and maintained by the Vast Calculators editorial team.
Last updated · July 11, 2026
Results are estimates for general use; verify critical figures independently.
