Distance Calculator
Calculate distance instantly in your browser.
Loading calculator…
What this tool does
Calculate distance instantly in your browser. Euclidean (straight-line) distance; for map distances between places on Earth you need a great-circle formula instead.
How to use the Distance Calculator
- Enter or select dimensions.
- Enter or select x₁.
- Enter or select y₁.
- Enter or select z₁.
- Enter or select x₂.
- Enter or select y₂.
- Enter or select z₂.
- Read the calculated result; change any measurement to compare alternatives.
Formula
distance = √((x₂−x₁)² + (y₂−y₁)²) in 2D — the Pythagorean theorem applied to the coordinate differences — with an extra (z₂−z₁)² term in 3D.
- dims
- Dimensions
- x1
- x₁
- y1
- y₁
- z1
- z₁
- x2
- x₂
- y2
- y₂
- z2
- z₂
Euclidean (straight-line) distance; for map distances between places on Earth you need a great-circle formula instead.
Worked example
For distance calculator, the following measurements illustrate the exact method: Dimensions: 2; x₁: 1; y₁: 2; z₁: 0; x₂: 4; y₂: 6; z₂: 3.
Inputs
- Dimensions2D (x, y)
- x₁1
- y₁2
- z₁0
- x₂4
- y₂6
- z₂3
Result
- Distance5
- Δx3
- Δy4
Results explained
- Distance
- Distance from the formula above. Euclidean (straight-line) distance; for map distances between places on Earth you need a great-circle formula instead.
- Δx
- Δx from the formula above. Euclidean (straight-line) distance; for map distances between places on Earth you need a great-circle formula instead.
- Δy
- Δy from the formula above. Euclidean (straight-line) distance; for map distances between places on Earth you need a great-circle formula instead.
Frequently asked questions
distance = √((x₂−x₁)² + (y₂−y₁)²) in 2D — the Pythagorean theorem applied to the coordinate differences — with an extra (z₂−z₁)² term in 3D.
Euclidean (straight-line) distance; for map distances between places on Earth you need a great-circle formula instead.
Where mathematically meaningful, yes. Fields specify permitted ranges and undefined operations display an error.
Exact integer calculations use safe integers; decimal calculations use browser floating point, so small rounding differences can occur.
All values remain in your browser and are never uploaded.