CCalclabhub

Math · 61 calculators

Distance Between Two Points Calculator

The distance formula is Pythagoras in disguise, and seeing that connection is what stops it being a formula you have to memorise.

Last updated

Distance

5

Midpoint x
5
Midpoint y
2.5
Manhattan distance (grid route)
7

Values update as you type. This calculator covers the single scenario its formula assumes — see Common Mistakes for what it leaves out.

The formula this calculator uses

distance = sqrt((x2 - x1)^2 + (y2 - y1)^2)

d
Straight line distance between the points
x1 y1
Coordinates of the first point
x2 y2
Coordinates of the second point

How to check the result by hand

  1. 1

    Label the coordinates of each point

    Call one point x1 y1 and the other x2 y2. It makes no difference which is which, because the differences get squared and the signs disappear.

  2. 2

    Subtract the x values and the y values

    From three, four to seven, one the x difference is four and the y difference is minus three. Keep the sign for now, it will not survive the squaring.

  3. 3

    Square each difference

    Four squared is sixteen and minus three squared is nine. Squaring is what turns a signed displacement into a length.

  4. 4

    Add and take the square root

    Sixteen plus nine is twenty five, and the square root of twenty five is five. The square root is the step that returns you from squared units to plain ones.

  5. 5

    Attach the units of the axes

    The distance carries the same unit as the coordinates. Mixing units between axes, such as metres on one and feet on the other, makes the answer meaningless.

Common Questions

How does the Distance Between Two Points Calculator work?

Subtract the x values and square the result, subtract the y values and square that, add the two and take the square root. From the point three, four to the point seven, one the distance is exactly five.

What do I need to enter in the Distance Between Two Points Calculator?

It takes 4 inputs: First point x, First point y, Second point x, Second point y. Fields that expect a unit say so next to the label.

Where does Distance come from?

It comes from d = sqrt((x2 - x1)^2 + (y2 - y1)^2) — pythagoras with the coordinate differences as the two legs. Order of the points does not matter.

What is the most common mistake with the Distance Between Two Points Calculator?

Adding the differences before squaring. Square each difference first. Adding and then squaring gives a much larger number and is the most common slip with a one line formula.

For worked examples, common mistakes and the limits of this formula, read the full How To Calculate The Distance Between Two Points page.