Kulkalotar
Math & Conversion

Distance Formula Calculator (2D & 3D Points)

Compute Euclidean distance between two points in 2D or 3D space.

Distance
5.0000

What this calculates

The distance formula is the Pythagorean theorem extended to coordinates. In 2D, it's √((x₂−x₁)² + (y₂−y₁)²). In 3D, just add the z-axis term. This calculator handles both.

Formula & how it works

2D: d = √((x₂−x₁)² + (y₂−y₁)²). 3D: d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²).

Worked example

(1, 2) to (4, 6): d = √(9 + 16) = √25 = 5. (0,0,0) to (1,2,2): d = √(1+4+4) = 3.

Frequently asked questions

Why is it Pythagorean?

Each coordinate difference is a leg of a right triangle; the distance is the hypotenuse.

What about latitude/longitude?

Use haversine instead — Earth is a sphere, not a plane. Euclidean is only correct for small distances or flat coordinates.

Manhattan distance?

|x₂−x₁| + |y₂−y₁| — the city-block distance. Different from Euclidean (straight-line).

Last updated:

Related calculators