3D Distance Calculator
Compute Euclidean distance between two 3D points. Enter x, y, z for each point and get the straight-line distance via d=sqrt(dx^2+dy^2+dz^2).
How to use this tool
- Enter x1, y1, z1, x2, y2 and z2 in the fields above.
- Results update instantly as you type — or click Calculate.
- Read your distance and the full breakdown beneath it.
Formula
d = sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2)
How it works
Square each coordinate difference, sum them, and take the square root: d = √(Δx² + Δy² + Δz²).
Worked example
Points (0,0,0) and (1,2,2)
- dx=1, dy=2, dz=2
- d = sqrt(1+4+4) = sqrt(9) = 3
Common mistakes to avoid
- Squaring the signed difference correctly but then forgetting to take the square root, reporting d^2 instead of d.
- Confusing 2D distance with 3D; leaving the z-component as zero when the actual z differs.
- Mixing up which coordinates belong to which point, e.g. pairing x1 with y2 when subtracting.
Key terms
Frequently asked questions
- Does it matter which point I label first?
- No. Because each difference is squared, the result is the same regardless of which point you call the first or second.
- What units does the result use?
- The output unit matches your input unit. If you enter coordinates in meters, the distance is in meters.
- Can I use this for GPS coordinates?
- Only approximately over short distances where the Earth's curvature is negligible. For accurate geographic distances use the Haversine formula instead.