The formula
d = √((x₂ − x₁)² + (y₂ − y₁)²)
The distance formula is the Pythagorean theorem applied to coordinates. The horizontal and vertical gaps between the points form the two legs of a right triangle, and the distance is its hypotenuse.
How to use this calculator
- Enter x₁.
- Enter y₁.
- Enter x₂.
- Enter y₂.
- Read the answer on the right. It updates as you type, and the numbered steps underneath show how it was worked out.
Worked example
Using x₁: 1; y₁: 2; x₂: 4; y₂: 6.
- Change in x: 4 − 1 = 3
- Change in y: 6 − 2 = 4
- d = √(9 + 16) = √25 = 5
Distance: 5
Common questions
How do I find the midpoint of two points?
Average the x-coordinates and average the y-coordinates: ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2).
Does the order of the points matter?
No. The differences are squared, so swapping the points gives the same distance.