Calculate the distance between two points in 2D or 3D space using the distance formula.
Last updated: April 2026 | By Patchworkr Team
The distance formula calculates the straight-line distance between two points in a coordinate system.
This formula is derived from the Pythagorean theorem and is fundamental in coordinate geometry. It measures the shortest path between two points.
Finding Distance Between Two Cities (2D)
2D uses x and y coordinates, while 3D adds the z coordinate for depth. Both use the Pythagorean theorem extended to their respective dimensions.
Yes. The distance formula works with negative values since we square the differences.
Yes. Distance is always non-negative because it's the square root of squared differences.
Navigation, surveying, robotics, physics simulations, and any system requiring spatial measurements.
No. Distance from (x₁, y₁) to (x₂, y₂) equals distance from (x₂, y₂) to (x₁, y₁).
The distance will be 0, as there is no separation between the points.
The formula extends to any dimension: add a squared difference for each additional coordinate.
Yes. The distance formula is a direct extension of the Pythagorean theorem (a² + b² = c²).
Related Tools
Calculate centroid.
Calculate cross-sectional area.
Calculate cylindrical coordinates.
Calculate direction vector.
Calculate point-to-plane distance.
Calculate dot product.