Skip to content
AllCalcHub

Distance Formula Calculator

Find the distance between two points in 2D or 3D with the distance formula, exactly (√80 = 4√5) and step by step.

About the Distance Formula Calculator

The distance formula is Pythagoras' theorem applied to coordinates: the horizontal and vertical gaps form the two shorter sides of a right triangle, and the distance is the hypotenuse. The answer is kept exact as a simplified surd, the way it's written in school.

The formula

d = √((x₂ − x₁)² + (y₂ − y₁)²)

3D
add (z₂ − z₁)² inside the root

Worked example

(1, 2) to (5, 10)

  1. √(4² + 8²) = √80
  2. = 4√5 ≈ 8.944

Questions people ask

Is this the same as distance on a map?

For short distances on a flat grid, yes. For places on Earth use a great-circle (haversine) calculation.

Does the order of the points matter?

No. The differences are squared, so the distance is the same either way.