Distance Formula Calculator
Distance formula calculator
Compute distance between two coordinate points in 2D.
InputsForm4 fieldsLive
Result
5
Using d = sqrt((x2 - x1)^2 + (y2 - y1)^2).
Live update
Auto
math
Formula
d = sqrt((x2 - x1)^2 + (y2 - y1)^2) Symbol legend
| Symbol | Meaning | Unit | Copy |
|---|---|---|---|
d | Distance between the two points | same as coordinate unit | |
x_1, y_1 | First point coordinates | (x, y) | |
x_2, y_2 | Second point coordinates | (x, y) |
- Take horizontal difference x2 - x1 and vertical difference y2 - y1.
- Square each difference and add them together.
- Take the square root to get the straight-line distance.
Example
Worked example: points (1, 2) and (4, 6)
- 1 x difference = 4 - 1 = 3
- 2 y difference = 6 - 2 = 4
- 3 d = sqrt(3^2 + 4^2) = sqrt(25) = 5
The distance is 5 units.
How
- Enter x1 and y1 for the first point.
- Enter x2 and y2 for the second point.
- Read the distance result and copy it when needed.
Avoid
- Forgetting to square both coordinate differences.
- Adding differences first and squaring once, which is not equivalent.
- Dropping the final square root and reporting squared distance.
FAQ
Is this the same as Euclidean distance?
Yes, this calculator uses Euclidean distance in two dimensions.
Can distance be negative?
No. Distance is always zero or positive.
Can I use negative coordinates?
Yes, negative and decimal coordinates are fully supported.
Switch
Switch12
No match.