3D Distance Calculator
Straight-line distance between two points in space.
Enter your values
Enter the x₁ you are working with.
Enter the y₁ you are working with.
Enter the z₁ you are working with.
Enter the x₂ you are working with.
Enter the y₂ you are working with.
Enter the z₂ you are working with.
Results update instantly as you type — no submit needed. Your values are remembered on this device, and the shareable link reopens the calculator with exactly these numbers.
- Distance
- 13
- Midpoint
- (2.5, 4, 9)
- Δx, Δy, Δz
- 3, 4, 12
- 2D distance (xy only)
- 5
- Manhattan distance
- 19
- Unit direction vector
- (0.2308, 0.3077, 0.9231)
Quick answer
The 3D distance formula extends Pythagoras: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²).
d = √(Δx² + Δy² + Δz²)
At a glance
| What it does | Straight-line distance between two points in space. |
|---|---|
| Category | Math |
| Inputs needed | x₁, y₁, z₁, x₂, y₂, z₂ |
| Main output | Distance |
| Formula | d = √(Δx² + Δy² + Δz²) |
| Cost | Free — no sign-up, no download |
How to use the 3D Distance Calculator
- 1Enter the coordinates of the first point.
- 2Enter the coordinates of the second point.
- 3Read the straight-line distance, or the Manhattan distance for grid-based movement.
Inputs explained
- x₁
- Enter the x₁ you are working with.
- y₁
- Enter the y₁ you are working with.
- z₁
- Enter the z₁ you are working with.
- x₂
- Enter the x₂ you are working with.
- y₂
- Enter the y₂ you are working with.
- z₂
- Enter the z₂ you are working with.
Worked example
Using the values the calculator loads with:
Inputs
- x₁1
- y₁2
- z₁3
- x₂4
- y₂6
- z₂15
Results
- Distance13
- Midpoint(2.5, 4, 9)
- Δx, Δy, Δz3, 4, 12
- 2D distance (xy only)5
- Manhattan distance19
- Unit direction vector(0.2308, 0.3077, 0.9231)
Frequently asked questions
What is Manhattan distance?
The sum of the absolute coordinate differences — the distance when you can only travel along the axes, like city blocks.
Can I use it for 2D?
Yes, just set both z values to 0.
What do I need to enter into the 3D Distance Calculator?
Just 6 values: x₁, y₁, z₁, x₂, y₂, z₂. Every field starts with a realistic example, so you can change one number at a time and watch the result update instantly.
How does the 3D Distance Calculator work out the answer?
The 3D distance formula extends Pythagoras: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²). It applies the formula d = √(Δx² + Δy² + Δz²) and shows the working so you can check each step by hand.
Is the 3D Distance Calculator free, and do I need an account?
It is completely free with no sign-up, no download and no usage limit. Everything is calculated in your browser, so the numbers you type never leave your device.
Results are estimates for general information. For medical, legal, structural or financial decisions, confirm with a qualified professional.