How to Find the Distance Between Two Points



The formula

The distance between two points $A(x_1, y_1)$ and $B(x_2, y_2)$ is:

$$ d = \sqrt{(x_2 – x_1)^2 + (y_2 – y_1)^2}. $$

In other words, subtract the $x$-coordinates and the $y$-coordinates first. Then, we square both, and add them. Finally we take the square root of the sum.

Here’s a worked example:

Find the distance between $A(2, 3)$ and $B(6, 6).$

First, we subtract the coordinates: $ x_2 – x_1 = 6 – 2 = 4 $ and $ y_2 – y_1 = 6 – 3 = 3.$

Next, we square each difference: $ 4^2 = 16 $ and $ 3^2 = 9 $

Then, we add the results to get $16+9=25.$ Finally, we take the square root: $$ d = \sqrt{16 + 9} = \sqrt{25} = 5. $$

So the distance between $A$ and $B$ is $5$ units.

A second example:

Find the distance between $P(−3, 2)$ and $Q(1, −1).$

Again, we start by subtracting the coordinates: $ x_2 – x_1 = 1 – (-3) = 4 $ and $ y_2 – y_1 = -1 – 2 = -3.$

Then we square and add, just as before: $$ d = \sqrt{4^2 + (-3)^2} = \sqrt{16 + 9} = \sqrt{25} = 5. $$

Notice that the negative sign disappears the moment you square it. Because of this, the order you subtract in doesn’t actually matter for the distance formula — unlike some other coordinate geometry formulas, where order matters a lot, as you’ll see below.

Where the formula actually comes from

You don’t need to memorize this blindly. In fact, it’s just the Pythagorean theorem in disguise.

First, plot A and B on a grid. Then draw a horizontal line from A and a vertical line from B, meeting at a right angle. As a result, you’ve just built a right-angled triangle where:

  • The horizontal leg has length $(x_2 − x_1).$
  • The vertical leg has length $(y_2 − y_1).$
  • The distance $AB$ is the hypotenuse.

Since Pythagoras’ theorem says $ \text{hypotenuse}^2 = \text{base}^2 + \text{height}^2 $, this is exactly the distance formula, just with coordinates plugged in instead of “base” and “height.” So if you ever blank on the formula in an exam, redrawing this triangle from scratch will get you there.

The common mistakes that cost the most marks

Mistake 1 — mixing up which coordinate is x and which is y. For instance, a point $(3, −5)$ is $3$ units across and $5$ units down, not the other way around. Because this slip is so easy to make under time pressure, it’s one of the most common sources of lost marks — even though most students actually know the rule.

Mistake 2 — forgetting to square before adding. A common shortcut error is writing $ d = (x_2 – x_1) + (y_2 – y_1) $ and skipping the squaring step entirely, especially when a difference comes out negative and “cancels” the other term in a way that looks tidy. Always square each difference first — that’s also exactly why the sign of each difference doesn’t matter, as you saw in the second example above.

Mistake 3 — not recognizing when a question is actually asking for three distances, not one. This is where the distance formula shows up again in disguise. If a question mentions three points and asks whether they’re collinear (lie on a straight line), don’t treat it as a new topic — it’s the same formula, applied three times. Calculate $AB, BC,$ and $AC$ using the exact formula above, then check whether the two shorter distances add up to the longest one, for example $ AB + BC = AC $. Students often miss this connection and either skip the check or reach for an unrelated method, when it’s really just “use the distance formula you already know, three times instead of once.”

Practice it yourself

To be honest, this page gives you the formula directly, because that’s what a quick search usually needs. However, it’s not how we actually teach it in the course — there, you’d discover the pattern yourself first, through an activity, before the formula is ever named. So if you’re curious what that feels like instead of just reading about it, the activity below is a good place to start.

After all, reading the formula is the easy part. Actually placing points accurately on a grid, and building the intuition for “across then up/down,” is what makes it stick. Therefore, try our free interactive activity below — it’s the same coordinate-plane practice from Chapter 1 of our Class 9 course, and it requires no login or payment.


Try Plot Pro, our free Chapter 1 activity — no login or payment required. Try it now →