Distance Between Two Points Calculator
Compute the straight-line distance between two points using the distance formula, plus the horizontal and vertical gaps.
How it works
d = √( (x₂ − x₁)² + (y₂ − y₁)² )
The distance formula is the Pythagorean theorem applied to coordinates: the horizontal gap and vertical gap between the points form the two legs of a right triangle, and the straight-line distance is the hypotenuse. Squaring removes any sign, so the order of the points never changes the result.
Worked example
For (0, 0) and (3, 4): Δx = 3, Δy = 4, so d = √(3² + 4²) = √(9 + 16) = √25 = 5.
Sources: Distance — Wikipedia
Frequently asked questions
Why does the distance formula use squares and a square root?
The gaps in x and y are the legs of a right triangle. By the Pythagorean theorem the hypotenuse (the direct distance) is the square root of the sum of the squared legs.
Can distance be negative?
No. Squaring the differences makes every term non-negative, and a square root of a non-negative number is non-negative, so distance is always zero or positive.
What if both points are identical?
Then Δx and Δy are both 0 and the distance is 0 — the points coincide.
Related calculators
This calculator is for educational purposes. Double-check important results before acting on them.