The distance formula is the Pythagorean theorem applied to coordinates.
How to use the Distance and Midpoint Calculator
- x₁
- y₁
- x₂
- y₂
Results update as you type, and every field accepts the units shown in its menu.
How it works
Subtract the coordinates, square and add the differences and take the square root.
Inputs explained
| Field | What to enter |
|---|---|
| x₁ | A number |
| y₁ | A number |
| x₂ | A number |
| y₂ | A number |
What each result means
- Distance = sqrt(([x₂] – [x₁])^2 + ([y₂] – [y₁])^2)
- Midpoint x = ([x₁] + [x₂])÷2
- Midpoint y = ([y₁] + [y₂])÷2
- Slope = ([y₂] – [y₁])÷([x₂] – [x₁])
Example values
How the main result changes when x₁ changes and everything else stays at the example values above:
| x₁ | Distance |
|---|---|
| 0.5 | 10.3078 |
| 0.75 | 10.152 |
| 1 | 10 |
| 1.25 | 9.852 |
| 1.5 | 9.7082 |
| 2 | 9.434 |
Formula
Distance = √((x₂ − x₁)² + (y₂ − y₁)²)Midpoint = ((x₁ + x₂)/2, (y₁ + y₂)/2)Worked example
Inputs — x₁: 1; y₁: 2; x₂: 7; y₂: 10.
Results — Distance = 10; Midpoint x = 4; Midpoint y = 6; Slope = 1.333333.
Frequently asked questions
What about 3D points?
Add (z₂ − z₁)² inside the square root.
What is Manhattan distance?
|x₂ − x₁| + |y₂ − y₁|, distance along grid lines.
What formula does the Distance and Midpoint Calculator use?
Distance = √((x₂ − x₁)² + (y₂ − y₁)²).