Distance Formula (2D)

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Worked example: (1,2) to (4,6) m → 3-4-5 hypotenuse, 5 m — press Try an example to run it live, then adjust anything.

Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value. Try different units for next level excitement!

Here the solver did the work — could you?

Midpoint and distance →

Grade 10Grade 10 Math

Test your skills in the Exam Room: new numbers every attempt — free lessons for students, no sign-up, just pure learning.

See your Report Card
Compete with your friends
share your results
Learning zone

Distance Formula (2D) explained

d(x1, y1)(x2, y2)x2 − x1y2 − y1

The distance formula is the Pythagorean theorem wearing coordinate clothing. Between any two points, the horizontal separation (x₂ − x₁) and the vertical separation (y₂ − y₁) form the two legs of a right triangle, and the straight-line distance is its hypotenuse. From (1, 2) to (4, 6) the legs are 3 and 4, so the distance is √(9 + 16) = 5 — the beloved 3–4–5 triangle hiding in the grid.

Historically this formula marks the marriage of algebra and geometry: René Descartes's La Géométrie (1637) introduced the coordinate plane that lets shapes be handled as equations, and measuring distance was the first payoff. Today the same square-root-of-summed-squares expression computes GPS displacements, collision distances in games, and error magnitudes in statistics. Note that only d can be solved for directly — recovering a single coordinate from a known distance gives two equally valid mirror-image answers, so there is no unique inverse.

Distance Formula (2D)

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}
Where
  • x1x_1= First point x-coordinate (m)
  • y1y_1= First point y-coordinate (m)
  • x2x_2= Second point x-coordinate (m)
  • y2y_2= Second point y-coordinate (m)
  • dd= Distance between the points (m)

Missing one of these? Work it out first, then come back