Search the complete library

What do you want to learn or calculate?

Quick linksAll calculatorsMath subjectsPractice questionsFormula library
← Geometry formulas

Distance in the plane

Find straight-line distance between two coordinate points.

Geometry · Coordinates
$$d=\sqrt{(x_2-x_1)^2+(y_2-y_1)^2}$$

Distance in the plane is one of 3 coordinates formulas in the geometry section of this library, and it is used at high school level.

Why distance in the plane works

Draw a horizontal segment and a vertical segment joining the two points through a right-angled corner. Their lengths are the differences in the two coordinates, and the direct route between the points is the hypotenuse of that right triangle, so this really is the Pythagorean theorem written in coordinates.

What each symbol means

$(x_1,y_1)$ and $(x_2,y_2)$ are endpoints.

Distance in the plane: when it holds

Both points must use the same coordinate scale and units.

When it stops applying

Both axes have to carry the same unit of length. On a graph where one axis counts years and the other counts dollars, this root mixes incompatible units and the resulting number means nothing, so compare the two changes separately instead.

Distance in the plane: a worked example

From $(1,2)$ to $(4,6)$, $d=\sqrt{3^2+4^2}=5$.

The mistake to avoid

What people do: Adding the two coordinate differences together before taking a single square root.

Why it goes wrong: Going from (1,2) to (4,6) that shortcut gives the square root of 7, about 2.65, when the true separation is 5.

Do this instead: Square each difference on its own, add the two squares, and take the root only at the very end.

Distance in the plane: step by step

  1. Name the unknown, and the unit the answer has to come out in.
  2. Match the symbols to your values. $(x_1,y_1)$ and $(x_2,y_2)$ are endpoints.
  3. Check the conditions before substituting. Both points must use the same coordinate scale and units.
  4. Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate — the check that catches most geometry slips.

Where this formula fits

Subject
Geometry formulas — 30 entries in this library
Topic
Coordinates
Level
High school

Formulas are easiest to keep when they sit inside a method rather than on a list. Use the links below to see where distance in the plane comes from, to check a calculation against a tool, and to practise it until you can recall it without looking.

Questions about distance in the plane

Does it matter which point I list first?

No. Swapping them reverses the sign of both differences, and squaring destroys the sign, so the separation comes out identical either way.

How do I find the distance from a point to the origin?

Use the origin as the second point. Both of its coordinates are zero, so the expression shortens to the root of the sum of the two squared coordinates.

Can I use this to test three points for a right angle?

Yes. Work out all three side lengths, then check whether the two smaller squared lengths add up to the largest squared length.

What happens when the two points share a coordinate?

One of the differences becomes zero and drops out, so the answer is simply the size of the other difference.

Stuck on a problem?

Work a distance in the plane problem step by step

Type your own problem, or upload a photo of it. You get the method, the answer, and a check you can repeat yourself.