Distance and Midpoint Calculator
- Free
- No sign-up
- Works on phones
- Shows the working
This distance and midpoint calculator takes two points in the plane and returns the distance between them, the midpoint of the segment joining them, and the slope of that segment. Distances are given exactly, with square roots simplified (\( \sqrt{8} \) becomes \( 2\sqrt2 \)), plus a decimal.
It works as a distance formula calculator and a midpoint calculator in one, and it shows the set-up so you can copy the working into your notes. It’s free and needs no sign-up.
How to use the distance and midpoint calculator
- Enter the first point as x₁ and y₁.
- Enter the second point as x₂ and y₂. Negative numbers, fractions such as
3/4and decimals all work. - Press Calculate.
- Read the set-up line, the distance \( d \), the midpoint \( M \) and the slope.
Formulas
The distance formula is the Pythagorean theorem applied to the horizontal and vertical gaps between the points:
$$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
The midpoint formula averages the coordinates:
$$M = \left( \frac{x_1 + x_2}{2},\ \frac{y_1 + y_2}{2} \right)$$
Worked example: a 6-8-10 triangle
Find the distance and midpoint for \( (1, 2) \) and \( (7, 10) \), as loaded above.
Gaps. \( \Delta x = 7 - 1 = 6 \) and \( \Delta y = 10 - 2 = 8 \).
Distance. \( d = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = 10 \).
Midpoint. \( M = \left( \frac{1 + 7}{2}, \frac{2 + 10}{2} \right) = (4, 6) \).
Slope. \( \frac{8}{6} = \frac43 \).
Worked example: negative coordinates
For \( (-3, 5) \) and \( (2, -7) \): \( \Delta x = 2 - (-3) = 5 \) and \( \Delta y = -7 - 5 = -12 \). Squaring removes the sign, so
$$d = \sqrt{25 + 144} = \sqrt{169} = 13$$
The midpoint is \( \left( \frac{-3 + 2}{2}, \frac{5 + (-7)}{2} \right) = \left( -\frac12, -1 \right) \).
Worked example: a simplified root
From \( (0, 0) \) to \( (2, 2) \), \( d = \sqrt{4 + 4} = \sqrt8 = 2\sqrt2 \approx 2.828 \). That’s the diagonal of a square with side 2, the \( 45^\circ \)-\( 45^\circ \)-\( 90^\circ \) pattern covered in special right triangles.
Tips and common mistakes
- Adding instead of subtracting. Distance uses differences, \( x_2 - x_1 \). The midpoint uses sums, \( x_1 + x_2 \).
- Taking the root of each term. \( \sqrt{a^2 + b^2} \neq a + b \). For the first example, \( 6 + 8 = 14 \), not 10.
- Forgetting to halve. The midpoint divides each sum by 2.
- Finding an endpoint from a midpoint. If \( M = (4, 6) \) and one end is \( (1, 2) \), the other end is \( (2\cdot4 - 1,\ 2\cdot6 - 2) = (7, 10) \).
Distance in calculus
Arc length is the distance formula applied to tiny pieces of a curve: each piece has length \( \sqrt{(\Delta x)^2 + (\Delta y)^2} \), and adding them up as the pieces shrink gives \( \int_a^b \sqrt{1 + f'(x)^2}\,dx \). See the arc length formula guide and the arc length calculator.
Related guides
Further reading
- Euclidean distance (Wikipedia) — the distance formula in two, three and more dimensions.
- Midpoint (Wikipedia) — the midpoint formula and its geometric properties.
FAQ
What is the distance formula?
\( d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2} \). It’s the Pythagorean theorem with the horizontal and vertical gaps as the legs.
What is the midpoint formula?
\( M = \left( \frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2} \right) \), the average of the x-coordinates and the average of the y-coordinates.
Does the order of the points matter?
No. Squaring removes the sign of each difference, and averaging gives the same midpoint either way.
How do I find distance in 3D?
Add the third gap under the root: \( d = \sqrt{(\Delta x)^2 + (\Delta y)^2 + (\Delta z)^2} \). This calculator handles 2D points.
