Straight line distance between points in 3D space, with the working, angles and path length.
Assumes a Cartesian grid with the same unit on all three axes. Unit conversions use the exact definitions 1 in = 2.54 cm, 1 ft = 0.3048 m, 1 yd = 0.9144 m and 1 mile = 1,609.344 m.
This 3D coordinate distance calculator measures the straight line distance between two points in three dimensional space for students, engineers, 3D modellers, drone pilots and game developers. Enter each point as x, y and z, and it applies the Euclidean distance formula step by step, then adds the midpoint, the angles with each axis, a metric and imperial conversion, and the total length of a route through several points.
Quick answer: the distance between two points in 3D is d = √((x₂ minus x₁)² + (y₂ minus y₁)² + (z₂ minus z₁)²). For (1, 2, 3) and (7, 5, 9), the differences are 6, 3 and 6, the squares add to 81, and the 3D coordinate distance calculator returns exactly 9 units.

In This Guide
What Is the 3D Distance Formula?
The 3D distance formula gives the length of the straight line joining two points in space: d = √(Δx² + Δy² + Δz²). In plain words, find how far apart the points are along each axis, square those three differences, add them up and take the square root.
It is Pythagoras used twice. First the x and y differences give the diagonal across the floor, √(Δx² + Δy²). That diagonal and the height difference Δz then form a second right triangle whose hypotenuse is the 3D distance. The order of the points does not matter, because squaring removes any minus signs.
How to Use the 3D Coordinate Distance Calculator
Step 1: Choose Two Points or a Path
Pick Two points for a single distance, or Path through points to add up the legs of a route, such as a drone flight plan or a cable run, from a list of coordinates.

Step 2: Enter the Coordinates
Type x, y and z for each point into the 3D coordinate distance calculator. Negative values and decimals work, so points on either side of the origin are fine.

Step 3: Pick the Unit
Choose the unit your coordinates use. All three axes must share it. The calculator then converts the answer, for example metres to feet, using the exact international definitions published by NIST.

Step 4: Read the Distance and Working
You get the distance, the converted figure, the axis differences, the midpoint, the horizontal distance, the elevation angle, the angle with each axis and the Manhattan distance, followed by the three line working. The midpoint and endpoint calculator goes further with the midpoint, ratio points and missing endpoints in 3D.

How Far Apart Are Two Points in 3D Space?
Subtract the coordinates, square the three differences, add them and take the square root; that single number is the shortest possible distance between the points.
Worked example: Callum has a 6 metre length of skirting board to carry into a bedroom that measures 4.2 by 3.6 metres with a 2.4 metre ceiling. Put one corner of the room at (0, 0, 0) and the opposite top corner at (4.2, 3.6, 2.4). The room's space diagonal is √(4.2² + 3.6² + 2.4²) = √36.36 = 6.03 metres, so the board fits corner to corner with 3 centimetres to spare. The floor diagonal alone is only 5.53 metres, which is why the board must be tilted up towards the ceiling.
What Is the Difference Between Euclidean, Manhattan and Chebyshev Distance?
Euclidean distance is the straight line, Manhattan distance adds the moves along each axis, and Chebyshev distance is the largest single axis move. For the default points, which differ by 6, 3 and 6, they give 9, 15 and 6.
| Measure | Formula | Typical use | Default result |
|---|---|---|---|
| Euclidean | √(Δx² + Δy² + Δz²) | Physical distance, CAD, physics | 9 |
| Manhattan | |Δx| + |Δy| + |Δz| | Grid movement, ducting along walls | 15 |
| Chebyshev | largest of |Δx|, |Δy|, |Δz| | Machines moving all axes at once | 6 |
The 3D coordinate distance calculator shows all three at once, so you can pick the one that matches how things really move in your problem rather than assuming a straight line.
How Do You Measure a Path Through Several 3D Points?
Work out the straight line length of each leg with the 3D formula and add the legs together; the total is always at least as long as the direct distance from the first point to the last.
Worked example: Priya plans a survey drone flight in metres from a take off point at (0, 0, 0). The drone climbs to (120, 50, 30), flies level to (150, 90, 30), then lands at (150, 90, 0). The legs measure 133.42, 50 and 30 metres, a total of 213.42 metres. The direct line from start to finish is only 174.93 metres, so the route adds 38.49 metres, which matters when she checks the flight against the battery's range.
Can I Use the 3D Distance Formula for Latitude and Longitude?
Not directly. Latitude and longitude are angles on a curved Earth, while the formula assumes a flat Cartesian coordinate system with the same unit on every axis, so it suits rooms, models and short local flights rather than journeys between cities.
For flat problems on paper, set z to 0 and the same tool gives the 2D distance. If you also need the gradient between the two points, the slope calculator adds the slope, angle and line equation from the same coordinates. Formulas checked October 2026.
Key Terms for the 3D Coordinate Distance Calculator
These terms explain the geometry behind the 3D coordinate distance calculator, helping you read each result and choose the right measure for your task.
- Euclidean distance
- The length of the shortest straight segment between two points, found from the square root of the summed squared axis differences. In three dimensions it extends the familiar flat formula by adding the vertical difference as a third component.
- Cartesian coordinate system
- A framework that fixes any point in space with three perpendicular axes, x, y and z, meeting at an origin. Distance formulas only hold when all three axes use the same unit and scale, as the calculator assumes.
- Pythagorean theorem
- The rule that in a right triangle the square on the hypotenuse equals the sum of the squares on the other two sides. Applying it once on the floor plane and again with height gives the 3D distance.
- Manhattan distance
- The sum of the absolute differences along each axis, as if travelling only in straight runs parallel to the axes. For the default points it is 15, useful for grid routing, cable runs along walls and some machine learning tasks.
- Chebyshev distance
- The largest single absolute difference among the three axes. It represents the number of moves needed when diagonal steps cost the same as straight ones, which is why it equals 6 for the default points.
- Space diagonal
- The straight line joining opposite corners of a box through its interior, longer than any face diagonal. In the skirting board example it measures 6.03 metres, against 5.53 metres for the floor diagonal alone.
</>Embed this calculator on your website
Add the free 3D Coordinate Distance Calculator to your own site or blog. Copy the code below and paste it into an HTML block. It resizes itself and works on phones.
How we checked this tool: the Tools Veria Editorial Team built this tool by hand, checked it against the official rules or published standards where they apply, and tested it against worked examples. Results are estimates for planning, not personal financial or tax advice. Read our editorial policy and disclaimer, or report an error.
Frequently Asked Questions
What is the formula for distance between two points in 3D?
The formula is d = √((x₂ minus x₁)² + (y₂ minus y₁)² + (z₂ minus z₁)²). Subtract each pair of coordinates, square the results, add them and take the square root to get the straight line distance.
Does the order of the points matter?
No. Swapping the points changes the sign of each difference, but squaring removes the sign, so the distance from A to B is always the same as the distance from B to A.
Can the 3D distance be negative?
No. A distance is a length, so it is always 0 or positive. It is 0 only when both points have identical x, y and z coordinates, meaning they are the same point.
How do I find the distance in 2D instead?
Set both z values to 0, or leave z out. The formula becomes d = √(Δx² + Δy²), the familiar Pythagoras theorem. For example, (0, 0) to (3, 4) is exactly 5 units apart.
What units does the 3D distance come out in?
The answer is in the same unit as the coordinates. If x, y and z are in metres the distance is in metres, and the calculator also converts it, for example 9 metres is 29.5276 feet.
What is the space diagonal of a box?
It is the 3D distance between opposite corners: √(length² + width² + height²). A box 4.2 by 3.6 by 2.4 metres has a space diagonal of about 6.03 metres.