Advertisement

Distance calculator

Enter two points. The straight-line distance between them updates as you type.

Calculator

Distance
5.000000

Advertisement

How this calculator works

The distance formula is the Pythagorean theorem applied to the horizontal and vertical gaps between the two points. Each difference is squared, so the result is never negative, and identical points correctly give a distance of zero.

Formula

d = √((x₂ - x₁)² + (y₂ - y₁)²).

Worked example

The distance from (0, 0) to (3, 4) is √(3² + 4²) = 5. From (-1, -1) to (2, 3) it is √(9 + 16) = 5 as well.

Advertisement

Frequently asked questions

Is this straight-line distance?

Yes. It is the length of the segment joining the points, as the crow flies, not a route along streets or a path.

Can I use it for points in three dimensions?

No. This calculator takes plane coordinates only. A 3D version would add a (z₂ - z₁)² term under the square root.

Does the order of the two points change the distance?

No. Each coordinate gap is squared, so swapping the points gives the same result.

Sources

Advertisement