Distance between two points in 2D or 3D with the distance formula, step by step
Distance formula: d = √((x₂ − x₁)² + (y₂ − y₁)²). Between (2, 3) and (8, 11) the distance is √(6² + 8²) = √100 = 10. In 3D, add (z₂ − z₁)² under the square root. Enter two points to get the distance step by step, together with the midpoint and slope.
Distance formula: d = √((x₂ − x₁)² + (y₂ − y₁)²). Between (1, 2) and (4, 6) the differences are 3 and 4, so d = √(3² + 4²) = √25 = 5. With differences of 6 and 8 the distance is 10, and with 5 and 12 it is 13. In 3D, add (z₂ − z₁)² under the square root.
| Δx | Δy = 1 | Δy = 2 | Δy = 4 | Δy = 8 | Δy = 12 |
|---|---|---|---|---|---|
| 1 | 1.4142 | 2.2361 | 4.1231 | 8.0623 | 12.0416 |
| 2 | 2.2361 | 2.8284 | 4.4721 | 8.2462 | 12.1655 |
| 3 | 3.1623 | 3.6056 | 5 | 8.544 | 12.3693 |
| 4 | 4.1231 | 4.4721 | 5.6569 | 8.9443 | 12.6491 |
| 5 | 5.099 | 5.3852 | 6.4031 | 9.434 | 13 |
| 6 | 6.0828 | 6.3246 | 7.2111 | 10 | 13.4164 |
| 8 | 8.0623 | 8.2462 | 8.9443 | 11.3137 | 14.4222 |
| 9 | 9.0554 | 9.2195 | 9.8489 | 12.0416 | 15 |
| 12 | 12.0416 | 12.1655 | 12.6491 | 14.4222 | 16.9706 |
| 15 | 15.0333 | 15.1327 | 15.5242 | 17 | 19.2094 |
d = √((x₂ − x₁)² + (y₂ − y₁)²). It gives the straight-line distance between the points (x₁, y₁) and (x₂, y₂) and follows from the Pythagorean theorem.
Subtract the x-coordinates and the y-coordinates, square both differences, add them and take the square root. For (1, 2) and (4, 6): √(3² + 4²) = √25 = 5.
The differences in x and y are the legs of a right triangle and the distance is the hypotenuse, so d² = Δx² + Δy², which is a² + b² = c².
d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). The distance between (1, 2, 3) and (4, 6, 15) is √169 = 13.
No. The differences are squared before they are added, so the distance is always zero or positive, no matter which point comes first.
The distance between two points (x₁, y₁) and (x₂, y₂) is d = √((x₂ − x₁)² + (y₂ − y₁)²). Subtract the coordinates, square both differences, add them and take the square root. The formula comes from the Pythagorean theorem: the horizontal and vertical differences are the legs of a right triangle, and the distance is its hypotenuse. The triangle calculator works with the same relationship.
For the points (2, 3) and (8, 11), the differences are 8 − 2 = 6 and 11 − 3 = 8. The distance is √(6² + 8²) = √(36 + 64) = √100 = 10. The order of the points does not matter, because both differences are squared.
For points in space, add the squared difference of the z-coordinates: d = √((x₂ − x₁)² + (y₂ − y₁)² + (z₂ − z₁)²). The distance between (1, 2, 3) and (4, 6, 15) is √(9 + 16 + 144) = √169 = 13. Tick 3D points in the calculator to enter z-coordinates.
If the coordinates are whole numbers and the distance is not, the calculator also shows the simplified square root. The distance between (0, 0) and (1, 1) is √2 ≈ 1.4142, and the distance between (1, 1) and (4, 3) is √13 ≈ 3.6056.
Along with the distance, the calculator shows the midpoint of the segment and the slope of the line through both points. For more detail, use the midpoint calculator and the slope calculator.