The midpoint is the point exactly halfway between two others, and it is one of the most useful results in coordinate geometry. This guide explains the midpoint formula, how it connects to distance and slope, what to do in 3D, and how to work backwards to find a missing endpoint.
The midpoint formula and why it is just an average
To find the point halfway between two values on a number line you average them — the number halfway between 2 and 8 is (2 + 8)/2 = 5. The midpoint formula does exactly that, one axis at a time: M = ((x1 + x2)/2, (y1 + y2)/2). In three dimensions you average the z-values too. Because each coordinate is handled independently, the formula extends to any number of dimensions without changing its shape.
The result is always on the straight segment connecting the two points, and it splits that segment into two equal halves — so the distance from A to M equals the distance from M to B.
Distance and slope of the same segment
Once you have two points, two more facts come almost for free. The distance between them is the segment's length, found with d = √(Δx² + Δy²) — the Pythagorean theorem with the coordinate differences as the legs of a right triangle. In 3D you add Δz² under the root.
The slope (a 2D idea) measures steepness as rise over run, m = Δy ÷ Δx. A positive slope rises to the right, a negative one falls, and a horizontal line has slope 0. When the two points share an x-value the run is zero, so the slope is undefined rather than infinite — this calculator says so explicitly instead of dividing by zero.
Working in three dimensions
Switching to 3D adds a z-coordinate to every point. The midpoint and distance formulas simply gain a z-term. Slope, however, has no single value in 3D: a line in space is described by a direction vector, not one rise-over-run number, so the calculator reports slope as 'N/A in 3D'. The coordinate sketch still helps by showing the segment's shadow on the xy-plane.
Reversing the formula to find an endpoint
Sometimes you know where the middle of a segment is and one of its ends, and you need the other end — for example, reflecting a point through a center. Rearranging the midpoint formula gives B = 2M − A: double the midpoint and subtract the known endpoint, coordinate by coordinate. The Find Endpoint tab does this automatically, and you can sanity-check it by feeding the answer back into the Midpoint tab.