3D Distance Calculator

Published on: Janruary 11, 2026

This 3D Distance Calculator helps you find the straight-line distance between two points in three-dimensional space. Enter the coordinates of both points, then apply the 3D distance formula by subtracting the corresponding x, y, and z values. After that, square each difference, add them together, and take the square root to get the final distance. It is a simple way to check answers, understand the formula clearly, and practise coordinate geometry step by step.

Step-by-step method

  1. Identify the two 3D points.
  2. Write the 3D distance formula.
  3. Substitute values and compute the distance.

Formula:

d = ( x2 − x1 )2 + ( y2 − y1 )2 + ( z2 − z1 )2

Example 1: (1,2,3),(4,6,3)

Step 1 - Identify the two points.

In this problem: Label the two points in 3D space.

P1 = ( 1, 2, 3 ), P2 = ( 4, 6, 3 )

Step 2 - Write the formula.

In this problem: Use the 3D distance formula.

d = ( x2 − x1 )2 + ( y2 − y1 )2 + ( z2 − z1 )2

Step 3a - Substitute the values.

In this problem: Replace each coordinate in the formula.

d = ( 4 − 1 )2 + ( 6 − 2 )2 + ( 3 − 3 )2

Step 3b - Use the differences as values.

In this problem: Compute the differences, then write them as squared values.

d = ( 3 )2 + ( 4 )2 + ( 0 )2

Step 3c - Solve the squares.

In this problem: Evaluate each square.

d = 9 + 16 + 0

Step 3d - Add the terms.

In this problem: Add inside the square root.

d = 25

Step 4 - Final answer.

In this problem: No further simplification is needed.

d = 5

Final answer: 5

Example 2: (0,0,0),(1,1,1)

Step 1 - Identify the two points.

In this problem: Label the two points in 3D space.

P1 = ( 0, 0, 0 ), P2 = ( 1, 1, 1 )

Step 2 - Write the formula.

In this problem: Use the 3D distance formula.

d = ( x2 − x1 )2 + ( y2 − y1 )2 + ( z2 − z1 )2

Step 3a - Substitute the values.

In this problem: Replace each coordinate in the formula.

d = ( 1 − 0 )2 + ( 1 − 0 )2 + ( 1 − 0 )2

Step 3b - Use the differences as values.

In this problem: Compute the differences, then write them as squared values.

d = ( 1 )2 + ( 1 )2 + ( 1 )2

Step 3c - Solve the squares.

In this problem: Evaluate each square.

d = 1 + 1 + 1

Step 3d - Add the terms.

In this problem: Add inside the square root.

d = 3

Step 4 - Final answer.

In this problem: No further simplification is needed.

d = 3

Final answer: √(3)

Example 3: 1/2,0,0,5/2,0,0

Step 1 - Identify the two points.

In this problem: Label the two points in 3D space.

P1 = (
1
2
, 0, 0 ), P2 = (
5
2
, 0, 0 )

Step 2 - Write the formula.

In this problem: Use the 3D distance formula.

d = ( x2 − x1 )2 + ( y2 − y1 )2 + ( z2 − z1 )2

Step 3a - Substitute the values.

In this problem: Replace each coordinate in the formula.

d = (
5
2
1
2
)
2
+ ( 0 − 0 )2 + ( 0 − 0 )2

Step 3b - Use the differences as values.

In this problem: Compute the differences, then write them as squared values.

d = ( 2 )2 + ( 0 )2 + ( 0 )2

Step 3c - Solve the squares.

In this problem: Evaluate each square.

d = 4 + 0 + 0

Step 3d - Add the terms.

In this problem: Add inside the square root.

d = 4

Step 4 - Final answer.

In this problem: No further simplification is needed.

d = 2

Final answer: 2