3D distance

3D distance: use first x, first y, first z. Review the formula, worked example and calculation steps.

Inputs

Use the units shown
RESULT
—

Enter your values and select Calculate.

Formula & explanation
d = √[(x₂−x₁)²+(y₂−y₁)²+(z₂−z₁)²]

Variables & units

First x
Numeric value · minimum -1000000000000, maximum 1000000000000
First y
Numeric value · minimum -1000000000000, maximum 1000000000000
First z
Numeric value · minimum -1000000000000, maximum 1000000000000
Second x
Numeric value · minimum -1000000000000, maximum 1000000000000
Second y
Numeric value · minimum -1000000000000, maximum 1000000000000
Second z
Numeric value · minimum -1000000000000, maximum 1000000000000

Worked example

(0,0,0) to (1,2,2) has distance 3.

Assumptions

All coordinates must use the same Cartesian unit scale.

Formula version 1.0.0. JavaScript floating-point arithmetic applies. Results display up to 6 decimal places; stored values retain available precision. Use the units shown.

Practice with an example

Use the default input values to find the answer. The reset icon restores those values.

Calculated on your device. Your latest 100 calculations stay in this browser.