The 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.
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
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
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
Square each difference
Four squared is sixteen and minus three squared is nine. Squaring is what turns a signed displacement into a length.
- 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
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.
For worked examples, common mistakes and the limits of this formula, read the full How To Calculate The Distance Between Two Points page.