Distance Calculator · Practical guide

How to Find the Distance Between Two Points

Subtract, square, add, square-root — the four steps behind every distance problem, with worked examples.

At a glance

The Distance Formula

The straight-line distance between two points (x₁, y₁) and (x₂, y₂) is the Pythagorean theorem in disguise: d = √((x₂−x₁)² + (y₂−y₁)²). Subtract the x-coordinates and the y-coordinates, square each difference, add the squares, and take the square root. The calculator above shows every one of these steps for your numbers.

Interactive tool

Distance Calculator

Enter your own values, then compare the result with the examples below.

Results

Distance-
Midpoint-
Formula Used-
Step-by-Step-

Worked Example

Find the distance from (3, 4) to (7, 1). The differences are 7 − 3 = 4 and 1 − 4 = −3. Squared: 16 and 9. Sum: 25. Square root: d = 5. Notice the sign of the difference does not matter, because squaring removes it — (3, 4) to (7, 1) and (7, 1) to (3, 4) are the same distance.

Practice Problems and Answers

Point 1Point 2Distance
(0, 0)(3, 4)5
(1, 2)(4, 6)5
(2, 3)(14, 8)13
(5, 5)(5, 5)0

Why It Is Just the Pythagorean Theorem

Draw a right triangle between the points: the horizontal leg has length |x₂−x₁|, the vertical leg has length |y₂−y₁|, and the distance is the hypotenuse. That is why the formula squares the legs and square-roots the sum — exactly c = √(a² + b²). Recognizing the triangle also helps you set up word problems: differences in east-west position are one leg, north-south the other.

Frequently Asked Questions

Does the order of the points matter?

No. Swapping the points only flips the signs of the differences, and squaring removes signs. The distance from A to B always equals the distance from B to A.

What if the distance comes out as a decimal?

Most distances are irrational. From (0, 0) to (1, 1), d = √2 ≈ 1.4142; from (0, 0) to (2, 3), d = √13 ≈ 3.6056. Round to whatever precision the problem requests.

How is this different from the slope formula?

Slope measures steepness — the ratio of rise to run — while distance measures length. Both use the same two differences; distance squares and adds them, slope divides them.

Can the distance formula handle decimal coordinates?

Yes. Decimals, fractions, and negatives all work identically: subtract, square, add, and square-root. The calculator accepts any real numbers.