Midpoint Formula Calculator – Find Midpoint of Line Segment (2D/3D)
Calculate the midpoint between two points in 2D or 3D using the midpoint formula, with step-by-step work and an interactive segment diagram.
What is the midpoint?
The midpoint of a segment \(\overline{AB}\) is the point exactly halfway between endpoints \(A\) and \(B\).
Coordinate-wise, that means each midpoint coordinate is the average of the two endpoint coordinates.
Midpoint formula
2D (x–y plane)
If \(A(x_1,y_1)\) and \(B(x_2,y_2)\), then the midpoint is:
\(M\left(\dfrac{x_1+x_2}{2},\dfrac{y_1+y_2}{2}\right)\).
3D (x–y–z space)
If \(A(x_1,y_1,z_1)\) and \(B(x_2,y_2,z_2)\), then:
\(M\left(\dfrac{x_1+x_2}{2},\dfrac{y_1+y_2}{2},\dfrac{z_1+z_2}{2}\right)\).
Why does it work?
A point halfway from \(A\) to \(B\) splits the segment in a \(1:1\) ratio. Along each axis, “halfway” means taking the average:
\[
x_M = \frac{x_1+x_2}{2},\quad y_M = \frac{y_1+y_2}{2}\quad (\text{and } z_M=\frac{z_1+z_2}{2}\text{ in 3D}).
\]
Worked example (2D)
Points \(A(1,2)\) and \(B(4,6)\):
- \(x_M=\dfrac{1+4}{2}=\dfrac{5}{2}=2.5\)
- \(y_M=\dfrac{2+6}{2}=\dfrac{8}{2}=4\)
So \(M(2.5,4)\).
Common mistakes
- Forgetting parentheses: \(\dfrac{x_1+x_2}{2}\) is not the same as \(x_1+\dfrac{x_2}{2}\).
- Mixing coordinates: average \(x\)’s with \(x\)’s, \(y\)’s with \(y\)’s (and \(z\)’s with \(z\)’s).
- Sign errors: if a coordinate is negative, include the sign in the sum.
Visualization tip
The interactive diagram shows \(\overline{AB}\) with the midpoint \(M\) highlighted. In 3D mode, rotate the view to see separation along \(z\).