Distance Calculator
Find the distance between two points in 2-D or 3-D, or between two places on Earth from their latitude and longitude.
Change the values and press Calculate to work out your own figures.
Two points in a plane
Enter two points.
Show the working
- d = √((x₂ − x₁)² + (y₂ − y₁)²) = √45
Two points in space
Enter two points.
Show the working
- d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²) = √3
Two places on Earth
Enter both places' latitude and longitude in decimal degrees.
Show the working
- Vincenty's inverse formula on the WGS 84 ellipsoid (a = 6,378,137 m, f = 1/298.257223563)
How to use it
Enter two points. Enter two points. Enter both places' latitude and longitude in decimal degrees.
Enter coordinates as whole numbers, decimals or fractions (3/4). Show the working gives the formula with your numbers.
Key facts
d = √((x₂ − x₁)² + (y₂ − y₁)²)
On the Earth
The shortest route over the surface follows a geodesic; on the WGS 84 ellipsoid it differs from the spherical (haversine) figure by up to about 0.5%.
Questions
What is the distance from (1, 3) to (7, 6)?
3√5 ≈ 6.708203932.
From (0, 0, 0) to (3, 4, 12)?
13.
Formulas
d = √((x₂ − x₁)² + (y₂ − y₁)²)
Sources
Limitations
- Vectors have two or three components (leave z blank for 2-D).
- Earth distances assume the WGS 84 ellipsoid (sea level).