Distance Between Two Points Calculator
Calculate the distance between two points in the plane from their coordinates.
Tip: The formula is based on Pythagoras: d = √((x₂−x₁)² + (y₂−y₁)²).
Did this tool help?
About this digital tool
The distance between two points calculator finds the straight-line distance between two points in the Cartesian plane. Enter the coordinates (x1, y1) and (x2, y2) and get the distance, the formula with the values substituted and the coordinates entered.
The formula is d = √((x2 − x1)² + (y2 − y1)²) and comes from the Pythagorean theorem. For the points (1, 2) and (4, 6): the differences are 3 and 4, so d = √(9 + 16) = √25 = 5. The order of the points doesn't affect the result and negative coordinates are allowed. It is used in analytic geometry, in cartography, in game programming and in any problem where you need to know how far apart two places are in the plane.
How to use
- Enter the coordinates of the first point (x1, y1).
- Enter the coordinates of the second point (x2, y2).
- Read the distance in the result bar.
- See the substituted formula to understand how the result was reached.
Frequently asked questions
How is the distance between two points calculated?
d = √((x₂−x₁)² + (y₂−y₁)²). E.g. points (1,2) and (4,6): d = √(9+16) = √25 = 5.
How is the distance between two points with negative coordinates calculated?
The formula is the same. E.g. for (−2, −1) and (1, 3): dx = 3, dy = 4, so d = √(9 + 16) = 5.
What does this formula have to do with the Pythagorean theorem?
The differences dx and dy are the legs of a right triangle and the distance is the hypotenuse: d² = dx² + dy².
Does it matter which point is entered first?
No. The differences are squared, so the distance from A to B is the same as the distance from B to A.