About the 3D Distance Formula
This calculator finds the straight-line (Euclidean) distance between two points in three-dimensional space, given their Cartesian coordinates (x, y, z). It is the direct extension of the Pythagorean theorem — the same rule that gives the hypotenuse of a right triangle — into a third dimension.
The formula
- Distance: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)
- Midpoint: ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2) — the point exactly halfway between A and B
- Coordinate differences: Δx = x₂−x₁, Δy = y₂−y₁, Δz = z₂−z₁ — the leg lengths of the right triangles that make up the distance
Why the order of the points does not matter
Each difference is squared before being summed, so a negative Δx contributes the same amount as a positive Δx of equal size. That means swapping Point A and Point B flips the sign of Δx, Δy, and Δz but never changes the computed distance or midpoint.
Where this formula is used
The 3D distance formula appears anywhere positions are tracked with (x, y, z) coordinates: computer graphics and game engines (checking how far apart two objects are), robotics and flight paths (straight-line distance between waypoints), physics (displacement between two positions), and CAD or engineering models. It assumes both points are measured in the same unit and the same flat (Euclidean) coordinate system — it is not the curved "great-circle" distance used between two points on the surface of a sphere like the Earth.