Distance Formula Calculator
Find the straight-line distance between any two points on the coordinate plane. Enter the coordinates of both points and the calculator returns the distance, the intermediate Δx and Δy values, and the formula used.
Enter two points
Enter two points and press Calculate distance.
The distance formula
d = √[(x₂ − x₁)² + (y₂ − y₁)²]
The distance formula is a direct application of the Pythagorean theorem. If you draw the horizontal and vertical differences between the two points, they form the legs of a right triangle, and the distance is the hypotenuse.
| Symbol | Meaning |
|---|---|
(x₁, y₁) | First point |
(x₂, y₂) | Second point |
Δx = x₂ − x₁ | Horizontal change |
Δy = y₂ − y₁ | Vertical change |
d | Straight-line distance |
Worked examples
Example 1 — Simple coordinates
Find the distance between (1, 2) and (4, 6).
Δx = 3, Δy = 4. d = √(9 + 16) = √25 = 5.
d = 5
Example 2 — Negative coordinates
Find the distance between (−3, 2) and (5, −1).
Δx = 8, Δy = −3. d = √(64 + 9) = √73 ≈ 8.544.
d ≈ 8.544
Example 3 — Same point
Find the distance between (7, 7) and (7, 7).
Δx = Δy = 0. d = 0.
d = 0
Example 4 — Horizontal line
Find the distance between (2, 5) and (8, 5).
Δx = 6, Δy = 0. d = 6.
d = 6
Related calculators
Frequently asked questions
No. Distance is the square root of a sum of squares, both of which are non-negative. Distance is always zero or positive.
No. Because the differences are squared, swapping the two points produces the same result: (x₂ − x₁)² = (x₁ − x₂)².
The same idea extends to three dimensions: d = √[(x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²]. This page handles 2D only.