Distance Formula Calculator
Find the straight-line distance between two points on a coordinate plane. Free distance formula calculator with step-by-step working using the Pythagorean theorem.
Updated 2026-06-14 · Free · No sign-up · Runs privately in your browser
Show the formula & steps
How the Distance Formula Calculator Works
Enter the coordinates of two points — (x₁, y₁) and (x₂, y₂) — and this calculator returns the straight-line distance between them, along with the horizontal change (Δx) and vertical change (Δy). The full working is shown so you can follow each step.
The Formula
d = √((x₂ − x₁)² + (y₂ − y₁)²)
This is the Pythagorean theorem in disguise: the horizontal gap and vertical gap form the two legs of a right triangle, and the distance is its hypotenuse.
Worked Example
Find the distance between (1, 2) and (4, 6):
- Δx = 4 − 1 = 3
- Δy = 6 − 2 = 4
- d = √(3² + 4²) = √(9 + 16) = √25 = 5
The points form a classic 3-4-5 right triangle, so the distance is exactly 5 units.
Distance Examples
| Point 1 | Point 2 | Distance |
|---|---|---|
| (0, 0) | (3, 4) | 5 |
| (1, 2) | (4, 6) | 5 |
| (−2, −3) | (1, 1) | 5 |
| (2, 5) | (7, 17) | 13 |
Where the Distance Formula Is Used
The distance formula appears throughout geometry, physics and computer graphics: measuring how far apart two points or pixels are, computing the length of a line segment, checking whether a point lies inside a circle, and finding the magnitude of a vector. It is also the foundation of the midpoint and slope formulas that describe the same line segment.
Frequently asked questions
What is the distance formula?+
The distance formula gives the straight-line distance between two points (x₁, y₁) and (x₂, y₂) on a coordinate plane: d = √((x₂ − x₁)² + (y₂ − y₁)²). It comes directly from the Pythagorean theorem, treating the horizontal and vertical gaps as the two legs of a right triangle.
How do you find the distance between two points?+
Subtract the x-coordinates and the y-coordinates to get the horizontal and vertical changes, square each, add them, then take the square root. For points (1, 2) and (4, 6) the changes are 3 and 4, so the distance is √(9 + 16) = √25 = 5.
Is the distance formula the same as the Pythagorean theorem?+
Yes — the distance formula is the Pythagorean theorem applied to coordinates. The horizontal change (x₂ − x₁) and vertical change (y₂ − y₁) are the two legs of a right triangle, and the distance between the points is the hypotenuse.
Does it matter which point you call point 1?+
No. Because the differences are squared, swapping the points changes the sign of each difference but not the squared values, so the distance is identical either way. Distance is always a positive number.
How do I find distance in three dimensions?+
Extend the formula with a z-term: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). This calculator handles two-dimensional points; for 3D you simply add the squared difference of the z-coordinates before taking the square root.