Distance Formula Calculator

ALGEBRA

Find the straight-line distance between two points. Enter the coordinates.

Distance
—
Between the points.

Usage Tip

If the points share an x or y value, the distance is just the difference in the other coordinate — no square root needed.

THE MATH
distance = √((x2 − x1)² + (y2 − y1)²)
The Pythagorean theorem on the coordinate plane
The distance formula is the Pythagorean theorem applied to the horizontal and vertical gaps between two points.
It gives the length of the straight segment joining them.
Works for any two points in the plane.
The run and rise are the legs of a right triangle; the distance is the hypotenuse.
Distance is always non-negative.
Practical Notes

The distance between two points on a plane comes from the Pythagorean theorem. The horizontal difference and the vertical difference between the points form the two legs of a right triangle, and the straight line between the points is the hypotenuse, so the distance is the square root of the sum of the squared differences.

The order of the points does not matter, because squaring removes any negative sign. The formula extends to three dimensions by adding the squared difference in z. Use the same units for all coordinates, and remember that the distance is a straight line and not the length of a path. This formula is used in maps, layouts, and checking the distance between holes or features on a drawing.

Spotted an error or have a suggestion for this calculator? Let us know →
Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.