Distance Between Points
Distance between two points in 2D or 3D.
Loading tool…
About this tool
Enter two points to get the straight-line distance. From (1, 2) to (4, 6) it is √(9 + 16) = 5. Switch to 3D to add a z-coordinate.
How to use
1
Step 1
Choose 2D or 3D.
2
Step 2
Enter the coordinates of both points.
3
Step 3
Press Calculate.
How it works
The distance formula is the Pythagorean theorem applied to the differences in each coordinate. In 3D one more squared difference is added under the root.
d = √((x₂ − x₁)² + (y₂ − y₁)²) 3D: + (z₂ − z₁)²
Worked example
A 3D distance
- Input
- (1, 2, 3) to (4, 6, 15)
- Output
- 13
- Walkthrough
- Differences 3, 4, 12. 9 + 16 + 144 = 169, and √169 = 13.
Limitations
- Straight-line (Euclidean) distance only.
- In 2D mode the z fields are ignored.
Questions
What is the distance from (1, 2) to (4, 6)?
The distance is 5, since √((4 − 1)² + (6 − 2)²) = √25.
What is the distance from (1, 2, 3) to (4, 6, 15)?
13.
Does the order of the points matter?
No. The distance is the same in both directions.
Features
- 2D and 3D
- Instant
- Runs in your browser
Guides
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
Finding mean, median, and mode
Khan Academy
Descriptive stats used across statistics tools.
Watch on YouTubeVolume of a sphere
Khan Academy
Applies (4/3)πr³ for sphere and volume calculators.
Watch on YouTube
- Geometry Index
Math is Fun
Shape and formula index for geometry calculators.
- Pythagoras Theorem
Math is Fun
Legs and hypotenuse examples for right-triangle pages.
More Math tools
See all ›Midpoint Calculator
Find the midpoint between two points.
Line Equation Calculator
Find line equations from points or slope.
Pythagorean Theorem Calculator
Solve a²+b²=c² for right triangles.
Vector Calculator
Dot product, cross product, magnitude, and unit vectors.
Vector Projection Calculator
Project vector a onto vector b.
Hyperbola Calculator
Hyperbola eccentricity from a and b.