Calculate the straight-line distance between two points in 2D or 3D space.
Last updated: June 2026 | By Patchworkr Team
Enter all coordinates as real numbers.
The distance formula measures the straight-line separation between two points.
These formulas follow directly from the Pythagorean theorem.
1. Choose 2D or 3D mode.
2. Enter the coordinates for both points.
3. Check the live distance result and formula preview.
For points (0, 0) and (3, 4):
d = sqrt((3 - 0)^2 + (4 - 0)^2)
d = sqrt(9 + 16) = sqrt(25) = 5
The calculator should show 5.
Yes. The squares make the direction irrelevant.
No. A square root of squared differences is never negative.
No. Swapping the points gives the same distance.
The distance is 0.
Related Tools
Calculate centroid.
Calculate cross-sectional area.
Calculate cylindrical coordinates.
Calculate direction vector.
Calculate point-to-plane distance.
Calculate dot product.