GEOMETRY CALCULATOR

3D Distance Calculator

Enter two x, y, z coordinate triples to find their straight-line distance and midpoint in three-dimensional Cartesian space.

Calculator

YOUR RESULTS
Straight-line 3D distance13
Change in x
3
Change in y
4
Change in z
12
Midpoint coordinates
(1.5, 2, 6)

Page guide

Straight-line 3D distance and interpretation

Distance is nonnegative and uses the common coordinate unit. The signed x, y, and z changes describe displacement from the first point to the second; midpoint coordinates remain in the original reference frame.

The formula

d = √[(x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²].

Subtract corresponding coordinates and take the Euclidean norm of the three differences. Average each pair of coordinates separately to locate the midpoint.

Verified worked example

The distance from (0, 0, 0) to (3, 4, 12) is √(9 + 16 + 144) = 13 units. The midpoint is (1.5, 2, 6).

How to use this calculator

  1. Enter the first point’s x, y, and z coordinates.
  2. Enter the second point in the same Cartesian frame and length unit.
  3. Read the straight-line distance, signed coordinate changes, and midpoint.

3D Distance input conventions

Three-dimensional distance extends the Pythagorean theorem along a third perpendicular axis. The differences are signed displacements, but their squares produce a nonnegative distance. Exchanging the two points reverses each displayed change while leaving the distance and midpoint unchanged. Coincident points have zero distance and the same midpoint as either original point.

Interpreting straight-line 3d distance

Coordinates must share one Cartesian reference frame and the same unit on all axes. A z height in feet cannot be combined directly with x and y distances in meters. Geographic latitude and longitude do not form an equal-scale Cartesian grid, so this tool is not a map-distance or Earth-surface calculator. The result follows a straight path through space and does not account for obstacles, road routing, or curved surfaces.

Assumptions & limitations

What this calculation assumes

  • All coordinates share one perpendicular-axis reference frame and one length unit.

What to keep in mind

  • Cartesian straight-line geometry only; no geographic projection, route planning, or coordinate transformation.

Common questions

What if my points are in a plane?

Set both z coordinates to the same value, such as zero. Their z difference vanishes and the formula becomes the ordinary two-dimensional distance.

Is this travel distance?

It is direct Euclidean separation. A route constrained to a road, stairway, surface, or corridor can be longer and requires the geometry of that path.

Do negative coordinates cause a problem?

No. Coordinates can be negative relative to your chosen origin. Distance depends on their differences, and reversing the two points leaves distance unchanged.

Sources & further reading

Reviewed on