How this calculator works
The distance formula is the Pythagorean theorem on a coordinate grid. The horizontal gap Δx and the vertical gap Δy are the legs of a right triangle, and the distance between the points is its hypotenuse: d = √(Δx² + Δy²). In three dimensions you add the Δz² term.
The midpoint is the average of the coordinates, and the slope is the rise over the run, Δy ÷ Δx.
Assumptions and tips
- Gives the straight-line (Euclidean) distance on a flat grid, not travel distance on a map.
Worked example
Using the default values in the calculator above:
| Input | Value |
|---|---|
| Points in | 2D (x, y) |
| x₁ | 1 |
| y₁ | 2 |
| x₂ | 7 |
| y₂ | 10 |
| Result | Value |
|---|---|
| Distance | 10 |
| Exact form | 10 |
| Midpoint | (4, 6) |
| Δx, Δy | 6, 8 |
| Slope (Δy ÷ Δx) | 1.333333 |
Step by step:
- Δx = 7 − 1 = 6; Δy = 10 − 2 = 8
- Square and add: 36 + 64 = 100
- d = √100 = 10
Common mistakes to avoid
- Subtracting x from y — pair the x-coordinates together and the y-coordinates together.
- Forgetting to square negative differences (squaring makes them positive).
Frequently asked questions
What is the distance between (1, 2) and (7, 10)?
√(6² + 8²) = √100 = 10.
Is the distance formula the same as the Pythagorean theorem?
Yes — Δx and Δy are the legs of a right triangle and the distance is the hypotenuse.
How do I find the distance in 3D?
Add the squared difference in z: d = √(Δx² + Δy² + Δz²).
Does the order of the points matter?
No. The differences are squared, so swapping the points gives the same distance.