Handeware
Math

Straight-line distance

5

Distance Between Two Points Calculator

Two points on a flat grid, each with an x and a y coordinate, have a straight-line distance between them. Enter both points to find it. Use the same units for every coordinate.

How it works

Find the change in x and the change in y. Square each change, add the two squares, and take the square root of the total. This is the Pythagorean theorem applied to the grid.

The result is in the same units as your coordinates. If the coordinates are in metres, so is the distance.

Worked example

From the point at 0, 0 to the point at 3, 4, the straight-line distance is 5.

Questions

Does the order of the points matter?

No. Swapping the two points gives the same distance, because the changes are squared.

Can the coordinates be negative?

Yes. Negative and decimal coordinates are handled the same way.

Is this the distance I would walk or drive?

No. This is the straight line across the grid. A route around walls or roads will be longer.

More like this

All Math calculators