Distance Formula Calculator
Distance between two points, with the exact radical.
Inputs
Loading calculator…
Calculating…
Use this calculator on your own site
Free embed
- Two lines of HTML, unlimited views
- Shows a small CalculateEveryday bar, with a credit link under the calculator
Formula
d = √((x₂ − x₁)² + (y₂ − y₁)²)
The horizontal and vertical changes between the points are the two legs of a right triangle, and the distance is its hypotenuse — so this is the Pythagorean Theorem written in coordinates. When the coordinates are whole numbers the answer is also given as a simplified radical such as 2√5, which is what most textbooks expect.
Worked example
From (1, 2) to (7, 10) the change is 6 across and 8 up. 6² + 8² = 36 + 64 = 100, and √100 = 10 — a 6-8-10 right triangle.
Where this can give the wrong answer
- The exact radical form appears only when Δx² + Δy² is a whole number. With decimal coordinates there is no tidy radical, so only the decimal is shown.
- Squaring removes the sign, so it does not matter which point is first or whether a change is negative.
- This is straight-line distance on a flat plane. For three dimensions add (z₂ − z₁)² under the root; for places on a map use a great-circle formula instead.
FAQ
- They are the same number. 2√5 is the exact form — √20 with the perfect square 4 pulled out — and 4.4721 is its decimal rounded to four places. The page shows both when the coordinates are whole numbers.
Related calculators
Need this calculator, but different?
MakeACalc turns a plain-English description into an embeddable calculator — formula and worked example included. Launching soon.