The Distance Formula and Where It Comes From
The distance between (x₁, y₁) and (x₂, y₂) is d = √[(x₂ − x₁)² + (y₂ − y₁)²]. It is Pythagoras' theorem in disguise: the horizontal gap and the vertical gap are the two legs of a right triangle, and the distance is the hypotenuse.
Distance from (1, 2) to (7, 10)
- Horizontal gap: 7 − 1 = 6. Vertical gap: 10 − 2 = 8.
- d = √(6² + 8²) = √(36 + 64) = √100.
Answer: d = 10
Distance from (0, 0) to (5, 5)
- d = √(25 + 25) = √50.
- √50 = √(25 × 2) = 5√2.
Answer: 5√2 ≈ 7.0711
Distance in 3D
Add the third gap: d = √[(Δx)² + (Δy)² + (Δz)²]. From (1, 2, 3) to (4, −2, 15): Δ = (3, −4, 12), so d = √(9 + 16 + 144) = √169 = 13. From (0, 0, 0) to (2, 3, 6) is √(4 + 9 + 36) = 7. Many 3D examples come out whole because of Pythagorean quadruples like (2, 3, 6, 7).
Midpoint and Dividing a Segment in a Ratio
The midpoint averages the coordinates: for (−2, 3) and (6, 7) it is (2, 5). To split a segment in a ratio m : n measured from the first point, use ((m·x₂ + n·x₁)/(m + n), (m·y₂ + n·y₁)/(m + n)). With 2 : 3 on the same points you get (6/5, 23/5). The calculator also finds trisection points, external division points, and an unknown endpoint given the midpoint: if A(1, 1) and the midpoint is (4, 5), then B = (7, 9).
Distance from a Point to a Line
The shortest distance from (x₀, y₀) to the line Ax + By + C = 0 is |Ax₀ + By₀ + C| ÷ √(A² + B²). For the point (3, 4) and the line 2x − y + 1 = 0, the top is |6 − 4 + 1| = 3 and the bottom is √5, so d = 3/√5 = 3√5/5 ≈ 1.342. The calculator also gives the foot of the perpendicular, which is the closest point on the line.
For two parallel lines use the same idea with the constants: 3x + 4y = 5 and 3x + 4y = 15 are |15 − 5| ÷ √(3² + 4²) = 10 ÷ 5 = 2 apart.
Point and Circle
Measure from the point to the centre. If that distance exceeds the radius, the shortest distance to the circle is the distance minus the radius, and the tangent length is √(d² − r²). A point (7, 1) and a circle with centre (1, 1) and radius 4 are 6 from the centre, so the gap to the circle is 2 and the tangent length is √20 = 2√5.
Triangle and Polygon Measurements
Three vertices give three distances. The calculator then finds the perimeter, area (by the shoelace formula), the angles, whether it is right, acute or obtuse, and the centroid, circumcentre and orthocentre. For (0, 0), (6, 0), (2, 5) the area is 15 and the perimeter is 6 + √29 + √41 ≈ 17.79. The Polygon tab applies the shoelace formula to up to ten vertices in order.
Find an Unknown Coordinate
If A is (1, 2), B is (x, 6) and the distance is 5, then (x − 1)² + 16 = 25, so x − 1 = ±3 and x = −2 or 4. Two answers are normal: B can be on either side of A. If the distance is too small to reach, as with (0, 0), (x, 10) and d = 6, there is no real solution.
Our Take: What Is Overrated, Underrated and Plain Wrong
Overrated: memorising the formula as a separate fact. It is the Pythagorean theorem on the horizontal and vertical gaps.
Underrated: leaving the answer as an exact surd. √50 = 5√2 is more useful than 7.07 when you continue working.
Plain wrong: using the flat formula for latitude and longitude. Over long distances Earth is curved, so GPS distances use the haversine formula instead. New York to Los Angeles is roughly 3,900 km along the surface.
A Worked Example With Real Numbers
From (1, 2) to (7, 10): the horizontal gap is 6 and the vertical gap is 8, so d = √(36 + 64) = √100 = 10. That is the 6-8-10 right triangle, a scaled 3-4-5. The midpoint is (4, 6).
Practice with Answers
- Distance from (−3, 4) to (2, −8)
Answer
13 - Midpoint of (4, −2) and (10, 8)
Answer
(7, 3) - Distance from (0, 0) to the line 3x + 4y = 10
Answer
2 - Distance between (1, 1, 1) and (3, 3, 2)
Answer
3 - Area of the triangle (0, 0), (4, 0), (0, 3)
Answer
6
Why Students Get Stuck on The Distance Formula, and What a Good Calculator Should Do
Searching for help with the Distance Formula usually starts late at night with one problem that will not work out. It is the Pythagorean theorem in disguise, and the signs get tangled. A good calculator fixes that by showing each step, checking its own answer and explaining the idea in plain words. This section covers what students struggle with, what they want, and how this page responds.
In short: students need to see the right triangle behind the formula and use it for distance and midpoint, not just see a final number, and a calculator earns trust only when its steps can be checked.
Understand the pain points
What students get stuck on
Most mistakes here are not about arithmetic. They come from one rule applied the wrong way round, which is why seeing every step matters.
- Forgetting to square the differencesDistance between (1,2) and (4,6)↗
- Subtracting x from y by mistakeMidpoint of (2,-3) and (8,5)↗
- Mixing up the midpoint (add, then halve) with the distanceDistance between (-2,3) and (4,-1)↗
- Leaving a square root unsimplifiedSlope between (1,2) and (5,10)↗
Understand the frustrations and desires
What they feel, and what they want
Each frustration points to a wish: a clearer step, a built-in check, an explanation in plain words.
- Wants distance, midpoint and slope in one go
- Wants a sketch of the segment
- Wants the radical simplified
Build the page around their intent
Each intent has a place on this page
The page follows intent, not features, so each need has a clear starting point.
- I need an answer now: type the problem into the calculator at the top of this page.Distance between (1,2) and (4,6)↗
- I need to understand: the sections below explain the idea in plain words and list the common mistakes.
- I need to check my work: every step is shown, so the first line that differs from yours is the one to study.
- I need practice: open the solver, tap + and choose Create Practice Test.
- I need it explained aloud: in the solver, tap + and choose Create Video.