Distance Calculator
Enter two points in the plane or in space. The result is the straight-line (Euclidean) distance in the length unit you selected.
How it works
Distance is the Pythagorean theorem in coordinates: √[(x₂−x₁)² + (y₂−y₁)²], and in 3-D an extra (z₂−z₁)² under the root. Coordinates must share one unit with each other and with the reported length.
This is not driving distance or geodesic distance on a globe.
Formula
2-D: d = √[(x₂ − x₁)² + (y₂ − y₁)²] 3-D: d = √[(x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²]
Worked examples
A 3-4-5 segment
(0, 0) to (3, 4) → 5
A 3-D example
(0, 0, 0) to (1, 2, 2) → 3
Useful notes
- The same two points also determine a slope if you drop the z-coordinate.
- (0,0) to (3,4) is the 3-4-5 triangle.
FAQ
- How do I find the distance between two points?
Subtract coordinates, square, add, and take the square root. From (0, 0) to (3, 4) that is √(9+16) = 5.
- Does this work on a map?
Only as a flat-plane approximation. It is not a great-circle or road-routing distance.
- What unit is the distance in?
The length unit you selected. The coordinates are treated as already being in that unit.
Related tools
Slope Calculator
Find the slope of a line from two points or from rise and run, plus the angle from the positive x-axis.
Pythagorean Theorem
Find the hypotenuse from two legs, or a missing leg from the hypotenuse and the other leg.
Right Triangle
From two legs, or a leg and the hypotenuse, get the third side, both acute angles, area and perimeter.
Triangle Calculator
Find a triangle’s area, perimeter and angles from three sides, or the area from base and height or SAS.
Area Calculator
Find the area of a square, rectangle, triangle, circle, trapezoid, parallelogram or ellipse.
See all Geometry tools.