3D Distance Notes

Published on: September 29, 2026

This 3D Distance Calculator measures how far apart two points in space are, and shows the working line by line. The gap along each axis is found first, each gap is squared, and the square root of their total is the straight-line distance. Squaring removes the signs, so the order of the two points never changes the answer. Following the same pattern every time keeps the three axis gaps separate until the very end.

Step-by-step method

  1. Set up the problem.
  2. Write the 3D distance formula.
  3. Substitute values and compute the distance.
See Example 1 Hide Example 1

Problem

\(P_{1} = \left(1,\; 2,\; 3\right),\; P_{2} = \left(4,\; 6,\; 3\right)\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the 3D distance formula.
  3. Substitute values and compute the distance.

Step 1

Step 1 - Set up the problem.

In this problem: The points are \(P_{1} = \left(1,\; 2,\; 3\right)\) and \(P_{2} = \left(4,\; 6,\; 3\right)\).

\(P_{1} = \left(1,\; 2,\; 3\right),\; P_{2} = \left(4,\; 6,\; 3\right)\)

Step 2

Step 2 - Write the 3D distance formula.

In this problem: The 3D distance formula extends the Pythagorean theorem with a z-term.

\(d = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2} + (z_{2} - z_{1})^{2}}\)

Step 3

Step 3 - Substitute values and compute the distance.

In this problem: The distance is \(5\).

\(d = \sqrt{\left(4 - 1\right)^{2} + \left(6 - 2\right)^{2} + \left(3 - 3\right)^{2}} = \sqrt{25} = 5\)

Final Answer

\(d = 5\)
See Example 2 Hide Example 2

Problem

\(P_{1} = \left(0,\; 0,\; 0\right),\; P_{2} = \left(1,\; 1,\; 1\right)\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the 3D distance formula.
  3. Substitute values and compute the distance.

Step 1

Step 1 - Set up the problem.

In this problem: The points are \(P_{1} = \left(0,\; 0,\; 0\right)\) and \(P_{2} = \left(1,\; 1,\; 1\right)\).

\(P_{1} = \left(0,\; 0,\; 0\right),\; P_{2} = \left(1,\; 1,\; 1\right)\)

Step 2

Step 2 - Write the 3D distance formula.

In this problem: The 3D distance formula extends the Pythagorean theorem with a z-term.

\(d = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2} + (z_{2} - z_{1})^{2}}\)

Step 3

Step 3 - Substitute values and compute the distance.

In this problem: The distance is \(\sqrt{3}\).

\(d = \sqrt{\left(1 - 0\right)^{2} + \left(1 - 0\right)^{2} + \left(1 - 0\right)^{2}} = \sqrt{3} = \sqrt{3} \approx 1.73\)

Final Answer

\(d = \sqrt{3} \approx 1.73\)
See Example 3 Hide Example 3

Problem

\(P_{1} = \left(2,\; -1,\; 4\right),\; P_{2} = \left(4,\; 1,\; 5\right)\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the 3D distance formula.
  3. Substitute values and compute the distance.

Step 1

Step 1 - Set up the problem.

In this problem: The points are \(P_{1} = \left(2,\; -1,\; 4\right)\) and \(P_{2} = \left(4,\; 1,\; 5\right)\).

\(P_{1} = \left(2,\; -1,\; 4\right),\; P_{2} = \left(4,\; 1,\; 5\right)\)

Step 2

Step 2 - Write the 3D distance formula.

In this problem: The 3D distance formula extends the Pythagorean theorem with a z-term.

\(d = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2} + (z_{2} - z_{1})^{2}}\)

Step 3

Step 3 - Substitute values and compute the distance.

In this problem: The distance is \(3\).

\(d = \sqrt{\left(4 - 2\right)^{2} + \left(1 - \left(-1\right)\right)^{2} + \left(5 - 4\right)^{2}} = \sqrt{9} = 3\)

Final Answer

\(d = 3\)
See Example 4 Hide Example 4

Problem

\(P_{1} = \left(-3,\; 2,\; 0\right),\; P_{2} = \left(3,\; -1,\; 2\right)\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the 3D distance formula.
  3. Substitute values and compute the distance.

Step 1

Step 1 - Set up the problem.

In this problem: The points are \(P_{1} = \left(-3,\; 2,\; 0\right)\) and \(P_{2} = \left(3,\; -1,\; 2\right)\).

\(P_{1} = \left(-3,\; 2,\; 0\right),\; P_{2} = \left(3,\; -1,\; 2\right)\)

Step 2

Step 2 - Write the 3D distance formula.

In this problem: The 3D distance formula extends the Pythagorean theorem with a z-term.

\(d = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2} + (z_{2} - z_{1})^{2}}\)

Step 3

Step 3 - Substitute values and compute the distance.

In this problem: The distance is \(7\).

\(d = \sqrt{\left(3 - \left(-3\right)\right)^{2} + \left(\left(-1\right) - 2\right)^{2} + \left(2 - 0\right)^{2}} = \sqrt{49} = 7\)

Final Answer

\(d = 7\)