Distance Formula Calculator (3D)

Calculate the distance between two points in 3D space. Also works for 2D by setting z = 0.

Distance

7.071068

Distance 2d5.000000
Manhattan12.0000
Dx3.0000
Dy4.0000
Dz5.0000

Distance Formula

3D Distance

d = sqrt((x₂-x₁)² + (y₂-y₁)² + (z₂-z₁)²)

2D Distance

d = sqrt((x₂-x₁)² + (y₂-y₁)²)

Both are generalizations of the Pythagorean theorem.

Manhattan Distance

Also called taxicab distance: d = x₂-x₁+y₂-y₁+z₂-z₁

This is the distance when you can only move along grid lines (like streets in Manhattan).

Example Calculation

Distance from (1, 2, 3) to (4, 6, 8).

  1. 01dx = 3, dy = 4, dz = 5
  2. 023D distance = √(9 + 16 + 25) = √50 ≈ 7.0711
  3. 032D distance = √(9 + 16) = √25 = 5
  4. 04Manhattan distance = 3 + 4 + 5 = 12

Frequently Asked Questions

Learn More

How to Calculate Percentages - Complete Guide

Learn how to calculate percentages step by step. Covers finding a percentage of a number, percentage change, reverse percentages, and real-world applications.

Related Calculators