3D Distance Calculator
Find the distance between two points in 3D space.
Results update as you type.
How it works
The 3D distance formula finds the straight-line distance between two points in three-dimensional space, and this calculator computes it from their coordinates. You enter the x, y, and z coordinates of both points, and it returns the distance between them. The formula extends the familiar Pythagorean theorem into three dimensions: it takes the differences in the x, y, and z coordinates, squares each, adds them, and takes the square root. This gives the true length of the straight line joining the two points through space, as if you could stretch a taut string directly between them. In two dimensions, the formula uses only x and y; adding the z term accounts for the third dimension of depth or height. This calculation is essential in three-dimensional geometry, computer graphics and game development for measuring distances between objects, physics and engineering for spatial analysis, navigation and mapping with elevation, and any field working with 3D coordinates such as CAD, robotics, and molecular modeling. The result is in the same units as the coordinates, so if the coordinates are in meters, the distance is in meters. The formula works for any two points regardless of their position or orientation in space. Enter the coordinates of both points to compute the 3D distance.
d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²)
The distance between two points in three-dimensional space is the square root of the sum of the squared differences of their x, y, and z coordinates. It extends the Pythagorean theorem to three dimensions, giving the length of the straight line connecting the two points through space.
Source:Coordinate geometry
We review all our tools from time to time to ensure accuracy.
Worked example
How to use this calculator
- 1
Enter your values
Enter point 1: x₁, point 1: y₁, point 1: z₁, point 2: x₂, point 2: y₂ and point 2: z₂.
- 2
Adjust the options
Fine-tune any options to match your situation.
- 3
Read your result
Distance updates instantly as you type — no button to press.
Frequently asked questions
How do you find the distance between two 3D points?
Subtract the two points' x, y, and z coordinates, square each difference, add the three squares, and take the square root. For points at the origin and (1, 2, 2), the distance is the square root of nine, which is three. The calculator does this from the six coordinates you enter.
How is the 3D distance formula related to the Pythagorean theorem?
The 3D distance formula is the Pythagorean theorem extended to three dimensions. In two dimensions, distance is the square root of the sum of two squared differences. Adding a third squared difference for the z coordinate extends it to space, giving the straight-line distance through three dimensions between the points.
What are the coordinates x, y, and z?
In three-dimensional space, a point is located by three coordinates: x for horizontal position, y for another horizontal direction perpendicular to x, and z for vertical position or depth. Together they pinpoint a location in space. The distance formula uses the differences in all three to measure separation.
Where is 3D distance used?
It is used in computer graphics and games to measure how far apart objects are, in physics and engineering for spatial calculations, in navigation with elevation, in CAD and 3D modeling, in robotics for positioning, and in chemistry for distances between atoms. Any application involving points in three-dimensional space relies on it.
What units is the distance in?
The distance is in the same units as the coordinates you enter. If the coordinates are in meters, the result is in meters; if in feet, the result is in feet. The formula is unit-agnostic, so just keep all six coordinates in the same unit and the distance comes out in that unit.