3D Distance Calculator

Find the distance between two 3D coordinates.

How it is calculated

The straight-line distance between points (x1, y1, z1) and (x2, y2, z2) in three-dimensional space is d = √((x2 − x1)² + (y2 − y1)² + (z2 − z1)²). It extends the Pythagorean theorem by one more axis: the difference along each axis is squared, the three squares are added and the square root is taken.

Coordinates may be negative or decimal, and swapping the two points gives the same answer because the differences are squared. All six values must be filled in. The result takes the unit of your coordinates (the tool has no units of its own) and is displayed with two decimals. It measures the direct line, not a path along surfaces or curves.

Worked example

Find the distance between (1, 2, 3) and (4, 6, 15). The differences are 4 − 1 = 3, 6 − 2 = 4 and 15 − 3 = 12. Their squares are 9, 16 and 144, which sum to 169. The square root of 169 is 13.00.

Try this example →

Common mistakes

  • Leaving out the z-axis difference, which gives the 2D distance instead; here that would be 5 rather than 13.
  • Mixing units between axes, such as x and y in metres and z in centimetres.
  • Forgetting to take the square root and reporting the sum of squares.
  • Using longitude, latitude and altitude as x, y, z; degrees are not equal-length units, so the result is not a real distance.

About this calculator

This calculator finds the straight-line distance between two points in 3D space using the extended Pythagorean theorem, d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²), the 3D generalization of the standard 2D distance formula.

It's used in game development and 3D graphics to check collision distances or line-of-sight, in engineering and CAD work to measure distances between components in a model, and in physics and astronomy problems that place objects by (x, y, z) coordinates. Because it works with any consistent unit (meters, pixels, light-years), the same formula scales from a robotics simulation to plotting star positions.

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators