CalculatorPro Tools

Distance in 3D Space and Other Spaces

Adding a third dimension to the distance formula is a small change with large consequences for how a shape behaves, and the same idea extends further than three dimensions.

Skip the manual math. Enter your numbers and get the answer instantly.

Try the Distance Calculator

Adding the Third Axis

The three dimensional formula adds one more squared term for the change in z. From the origin to 2, 3, 6 gives the square root of 4 plus 9 plus 36, which is exactly 7.

Midpoint and Centroid

Averaging coordinates works in any number of dimensions, which is why the midpoint of two points is as easy in 3D or 10D as in 2D.

More Than Three Dimensions

The formula extends directly to any number of axes by summing squared differences across all of them. In data science this is how vectors are compared for similarity.

Why Three Dimensions Matter

A problem that looks two dimensional in a drawing can require three. A diagonal across a room, a distance between two points on a hillside, or a route through a building all involve a vertical component.

Curved Surfaces Break the Formula

On the Earth's surface, straight line distance through the ground is not the surface distance. Great circle calculations account for curvature and give a longer figure for long journeys.

Manhattan Versus Straight Line

In a grid city, the distance you actually walk follows the streets and is the sum of the axis changes, not their square root. Both are legitimate, and which one you want depends entirely on the question.

Worked Example

From 0,0,0 to 2,3,6 the changes are 2, 3 and 6. Squared they are 4, 9 and 36, summing to 49, and the square root of 49 is exactly 7.

Calculate It Now

Last updated: · by CalculatorPro Tools