Advertisement

Three-dimensional distance calculator

Enter two spatial points using the same coordinate unit on all three axes.

Calculator

Straight-line distance
13.00000000

Advertisement

How this calculator works

The coordinate differences are the three perpendicular sides of a rectangular box. Applying the Pythagorean theorem twice gives its space diagonal. The result uses your coordinate unit. This is Euclidean distance in flat space; latitude, longitude and elevation must first be converted to a suitable Cartesian system.

Formula

d = sqrt((x2 - x1)^2 + (y2 - y1)^2 + (z2 - z1)^2).

Worked example

From (0, 0, 0) to (3, 4, 12), the squared gaps sum to 9 + 16 + 144 = 169. The distance is 13 coordinate units.

Advertisement

Frequently asked questions

Can the points coincide?

Yes. Identical points have zero distance.

Can I mix metres and feet?

Convert all six coordinates to the same unit first. Coordinate values here have no automatic length conversion.

Does point order matter?

No. Reversing the points reverses each difference, and squaring removes the sign.

Sources

Advertisement