3D distance calculator
Pythagoras extends to any number of dimensions; in three it is the square root of the sum of three squares.
Distance
13m
- Horizontal distance
- 5
- Manhattan distance
- 19
- Midpoint x
- 2.5
- Midpoint y
- 4
- Midpoint z
- 9
Show the working
- x1 = 1
- y1 = 2
- z1 = 3
- x2 = 4
- y2 = 6
- z2 = 15
- dx = 4 - 1 = 3
- dy = 6 - 2 = 4
- dz = 15 - 3 = 12
- Distance = hypot(3, 4, 12) = 13
- Horizontal distance = hypot(3, 4) = 5
- Midpoint x = (1+4)/2 = 2.5
- Midpoint y = (2+6)/2 = 4
- Midpoint z = (3+15)/2 = 9
- Manhattan distance = abs(3) + abs(4) + abs(12) = 19
Values are shown to six significant figures here; the arithmetic itself runs on exact fractions and is only rounded where a number is printed.
Scenarios & local history
Compare a saved scenario
Recent calculations
The formula
- distance = sqrt(dx^2 + dy^2 + dz^2)
1-2-3 to 4-6-15 is a distance of exactly 13, one of the neat integer cases.