Distance Formula Calculator

Find the straight-line distance between two points (x₁, y₁) and (x₂, y₂) using the distance formula.

( , ) ( , )
Distance
Δx
Δy

How to Use the Distance Formula

Enter the coordinates of the two points.

1

Enter the two points

Type the coordinates (x₁, y₁) and (x₂, y₂).

2

Read the distance

The distance is the square root of the squared horizontal and vertical differences.

3

Check the differences

Δx and Δy — the horizontal and vertical gaps — are shown alongside.

Frequently Asked Questions

What is the distance formula?
The distance between (x₁, y₁) and (x₂, y₂) is d = √[(x₂ − x₁)² + (y₂ − y₁)²]. For (1, 2) and (4, 6) that is √(3² + 4²) = √25 = 5. It comes straight from the Pythagorean theorem applied to the horizontal and vertical gaps. In three dimensions the same pattern adds a (z₂ − z₁)² term under the root.
How is it related to the Pythagorean theorem?
In the distance formula, the horizontal and vertical differences between the two points form the legs of a right triangle, and the distance is its hypotenuse. So a² + b² = c² becomes (x₂ − x₁)² + (y₂ − y₁)² = d². Taking the square root of both sides gives the distance formula exactly. That is why the two always agree: legs of 3 and 4 give a hypotenuse of 5, and points 3 across and 4 up are 5 apart.
Does the order of the points matter?
The order of the two points makes no difference to the distance. Each difference is squared, and (x₂ − x₁)² equals (x₁ − x₂)², so the sign cancels. Swapping (1, 2) and (4, 6) still gives √25 = 5. The midpoint is unaffected too, though anything directional such as slope does change sign.
Is my data sent anywhere?
Nothing you enter into the distance formula calculator leaves your device. The distance formula calculator does all of its arithmetic client-side in JavaScript, so your coordinates are never uploaded to a server. No account is needed and no calculation is stored or logged. Once the page has loaded it works with no network connection at all.