📏 Distance & Midpoint Calculator
From (−2, 1) to (4, 5): distance = 2√13 exactly — the simplified radical form homework requires — with the decimal alongside, and the midpoint (1, 3).
Coordinates accept integers, decimals and fractions (1/2).
d = 2√13
distance (exact, ≈ 7.211103)
(1, 3)
midpoint (exact)
Working
- Differences: Δx = 4 − -2 = 6, Δy = 5 − 1 = 4
- Pythagoras: d² = Δx² + Δy² = 36 + 16 = 52
- Take the root and simplify: d = √52 = 2√13 (simplified radical form — the form homework answers expect)
- Midpoint = averages of the coordinates: ((x₁+x₂)/2, (y₁+y₂)/2) = (1, 3)
Distance comes out in simplified radical form — 2√13, not 7.2111 — with the decimal alongside. Runs locally.
How the distance & midpoint calculator works
The distance formula is Pythagoras in coordinates: d = √(Δx² + Δy²). The tool computes Δx and Δy as exact rationals, squares and sums them exactly, then simplifies the square root symbolically — extracting square factors so √52 becomes 2√13 — and only then offers a decimal approximation alongside. The midpoint is the coordinate-wise average ((x₁+x₂)/2, (y₁+y₂)/2), kept as exact fractions. Every step of the working is shown: the differences, the squares, the sum, the simplification.
The simplified radical answer is the genuinely rare feature: most online distance calculators jump straight to 7.2111, but "give your answer in simplified radical form" is how the question is actually asked in algebra and geometry courses — and 2√13 is the answer that scores. It also chains: the next line of many problems needs d², which is exact only if d stayed symbolic.
Frequently asked questions
What is the distance formula?
d = √((x₂ − x₁)² + (y₂ − y₁)²) — the Pythagorean theorem applied to the right triangle formed by the two points. From (−2, 1) to (4, 5): d = √(6² + 4²) = √52 = 2√13.
Why give the answer as a radical instead of a decimal?
Because 2√13 is exact and 7.2111 is not — and algebra/geometry courses explicitly ask for "simplified radical form". The tool gives both, exact first.
How is the radical simplified?
By extracting square factors: 52 = 4 × 13, so √52 = 2√13. The tool factorizes the sum of squares and pulls out every square factor automatically.
What is the midpoint formula?
The average of the coordinates: M = ((x₁+x₂)/2, (y₁+y₂)/2). It's the point exactly halfway along the segment — computed here as exact fractions, so the midpoint of (0,0) and (1,1) is (1/2, 1/2), not (0.5, 0.5) pretending to be exact.
Do fractional or decimal coordinates work?
Yes — coordinates parse as exact rationals, and the radical simplification handles the resulting fractions correctly (√(p/q) is rationalized to a clean coefficient times a square-free root).