Distance Formula Calculator

Enter two points and see the exact distance between them.

The x-coordinate of the first point.

The y-coordinate of the first point.

The x-coordinate of the second point.

The y-coordinate of the second point.

Try

Result

You enteredd((1,2), (4,6))d\left((1, 2),\ (4, 6)\right)

5\displaystyle 5

Exact

5\displaystyle 5
Show the work
  1. Distance formula

    The distance is the hypotenuse of a right triangle whose legs are the horizontal and vertical differences between the points. Here (x1,y1)=(1,2)(x_1, y_1) = (1, 2) and (x2,y2)=(4,6)(x_2, y_2) = (4, 6).

    d=(x2−x1)2+(y2−y1)2=(4−1)2+(6−2)2\begin{aligned} d &= \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \\ &= \sqrt{\left(4 - 1\right)^2 + \left(6 - 2\right)^2} \end{aligned}
  2. Square the differences and add

    Work out each difference, square it so that the sign no longer matters, and add the two squares. The horizontal difference is 33 and the vertical difference is 44.

    d=32+42=9+16=25\begin{aligned} d &= \sqrt{3^2 + 4^2} \\ &= \sqrt{9 + 16} \\ &= \sqrt{25} \end{aligned}
  3. Square root of a perfect square

    The number under the root is a perfect square, so the distance is exact.

    d=25=5\begin{aligned} d &= \sqrt{25} \\ &= 5 \end{aligned}
  4. Result

    So the distance is 55.

Worked examples