No ads, no sign-upChecked 2026-08-24

3D Distance Calculator

Your numbers

Change any value to update the result.

Distance

7.000000

Distance: 7.000000
Examples

Subtract the coordinates axis by axis, square the three gaps, add them and take the square root. From the origin to (2, 3, 6) that is √(4 + 9 + 36) = 7. If both z values are equal the third term vanishes and the answer matches the plane formula.

The numbers at a glance

Held fixed: x₁ (first point) 0.0000, y₁ (first point) 0.0000, z₁ (first point) 0.0000, x₂ (second point) 2.0000, y₂ (second point) 3.0000.

z₂ (second point)Distance
0.00003.605551
2.00004.123106
4.00005.385165
6.0000Your value7.000000
8.00008.774964
10.000010.630146
12.000012.529964

Worked examples

Case 1

x₁ (first point)
0
y₁ (first point)
0
z₁ (first point)
0
x₂ (second point)
2
y₂ (second point)
3
z₂ (second point)
6

7.000000

Open with these values

Case 2

x₁ (first point)
1
y₁ (first point)
1
z₁ (first point)
1
x₂ (second point)
4
y₂ (second point)
5
z₂ (second point)
1

5.000000

Open with these values

Case 3

x₁ (first point)
-1
y₁ (first point)
-2
z₁ (first point)
-2
x₂ (second point)
2
y₂ (second point)
2
z₂ (second point)
4

7.810250

Open with these values

How it's calculated

d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²)

  1. StepEnter the coordinates of the first point, then of the second.
  2. StepThe three axis gaps Δx, Δy and Δz are the edges of a box.
  3. ResultThe distance is its body diagonal: √(Δx² + Δy² + Δz²).7.000000

Reference table

x₁, y₁, z₁, x₂, y₂, z₂Δx, Δy, ΔzDistance
3, 3, 3, 3, 3, 30, 0, 00.000000
0, 0, 0, 1, 2, 21, 2, 23.000000
0, 0, 0, 1.5, 2.5, 3.51.5, 2.5, 3.54.555217
1, 1, 1, 4, 5, 13, 4, 05.000000
0, 0, 0, 2, 3, 62, 3, 67.000000
-1, -2, -2, 2, 2, 43, 4, 67.810250

Questions

How do I calculate the distance between two points in 3D?

Use d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). Subtract the matching coordinates on each axis, square each difference, add the three squares and take the square root. For (0, 0, 0) and (1, 2, 2) that is √(1 + 4 + 4) = √9 = 3.

Why is this the Pythagorean theorem?

The two points sit at opposite corners of a box whose edges are the axis gaps Δx, Δy and Δz. Applying Pythagoras twice — first across the base, then up to the far corner — gives d² = Δx² + Δy² + Δz².

How is 3D distance different from 2D distance?

The 3D formula simply adds a third squared term for the z-axis. If both z-coordinates are equal, Δz is zero and the result matches the plane formula exactly.

Can I use negative or zero coordinates?

Yes, on any axis. For (−1, −2, −2) and (2, 2, 4) the gaps are 3, 4 and 6, giving √61 ≈ 7.81. Two identical points give a distance of zero.

Where is the 3D distance formula used?

Anywhere a straight-line gap in space matters: 3D modelling and CAD, collision checks in games, the separation between atoms in chemistry, robotics and motion planning.

Sources and last check

  1. mathworld.wolfram.com

Information, not professional advice.