Skip to main content
🔢 Geometry

Distance Calculator

Enter two points to find the straight-line distance between them with the distance formula — plus the midpoint and the change in x and y. Works for any coordinates, positive or negative.

Distance formula
Midpoint
Δx and Δy
Any coordinates
100% Free
🔢 Open All Math Calculators 📖 Read the Guide

Distance — Quick answer

The distance formula is the Pythagorean theorem on the horizontal and vertical changes.

d = √((x₂ − x₁)² + (y₂ − y₁)²)  ·  midpoint = ((x₁+x₂)/2, (y₁+y₂)/2)

Worked example: (1, 2) → (4, 6): d = √(3² + 4²) = 5, midpoint (2.5, 4).

More examples

PointsDistanceMidpoint
(1,2)→(4,6)5(2.5, 4)
(−2,−3)→(4,5)10(1, 1)
(0,0)→(5,12)13(2.5, 6)
(0,0)→(3,4)5(1.5, 2)

Distance is the same in either direction and never negative.

🔢 Distance Calculator

Enter the coordinates of two points, (x₁, y₁) and (x₂, y₂).

Distance
Midpoint
Change in x (Δx)
Change in y (Δy)

⚠️ This is the straight-line (Euclidean) distance in the coordinate plane. Distance is always non-negative and the same whichever point you enter first.

The distance formula gives the straight-line gap between two points: d = √((x₂ − x₁)² + (y₂ − y₁)²). It's just the Pythagorean theorem in disguise — the horizontal change and the vertical change are the two legs of a right triangle, and the distance is the hypotenuse. This calculator returns the distance, the midpoint (the average of the coordinates), and the separate x and y changes, for any points you enter.

Reviewed: June 20, 2026 · Author: Naveen P N, Founder — AI Calculator · Verified against: the Euclidean distance and midpoint formulas, recomputed in code.

The formulas

Distance
d = √((x₂ − x₁)² + (y₂ − y₁)²)
Midpoint
M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)

To find the distance, take the horizontal change (x₂ − x₁) and vertical change (y₂ − y₁), square each, add them, and take the square root. Squaring removes any sign, so the order of the points doesn't matter and the result is never negative. The midpoint is simply the average of the two x-coordinates and the two y-coordinates — the exact centre of the segment.

Worked example — (1, 2) to (4, 6)

Scenario: find the distance and midpoint between (1, 2) and (4, 6).

Changes
Δx = 4 − 1 = 3 · Δy = 6 − 2 = 4
Distance
√(3² + 4²) = √(9 + 16) = √25 = 5
Midpoint
((1+4)/2, (2+6)/2) = (2.5, 4)

The two points are exactly 5 units apart — a clean 3-4-5 right triangle — with midpoint (2.5, 4). The formula handles every case the same way: (−2, −3) to (4, 5) gives changes of 6 and 8, distance √(36 + 64) = 10, and a (0, 0) to (5, 12) pair gives 13. Negative coordinates and decimals work just as well.

Frequently Asked Questions

What is the distance formula?

d = √((x₂ − x₁)² + (y₂ − y₁)²). For (1,2)→(4,6): √(9+16) = 5.

How do I find the midpoint?

Average the coordinates: ((x₁+x₂)/2, (y₁+y₂)/2). E.g. (2.5, 4).

Why is it Pythagoras?

Δx and Δy are the legs of a right triangle; the distance is the hypotenuse.

Does point order matter?

No — the differences are squared, so distance is the same either way and never negative.

Negative coordinates?

Yes. (−2,−3)→(4,5): distance 10, midpoint (1, 1).

Need more math tools?

Explore slope, Pythagorean, quadratic, percentage and more across the AI Calculator math suite.

🔢 Open Math Calculators — Free

No registration required · 350+ calculators · PDF report export