How the midpoint calculator works
The midpoint is the point exactly halfway along the segment joining two points, and finding it takes nothing fancier than averaging. Each axis is its own little world: the midpoint's x-coordinate is the plain average of the two x-coordinates, and its y-coordinate is the average of the two y-coordinates. If two friends stand at 2 and 8 on a number line, they meet at 5 — do that once for x and once for y and you've got the midpoint.
The second mode runs the formula in reverse: if you know the midpoint and one endpoint, the other endpoint has to be just as far past the midpoint as the known one is before it — so you double the midpoint and subtract the endpoint you have.
The formulas
(x₁, y₁) and (x₂, y₂) are the endpoints, and (mₓ, mₔ) is the midpoint. The second formula is just the first solved for the unknown endpoint: since M is the average of A and B, 2M = A + B, so B = 2M − A.
Worked example
Finding a midpoint: take A = (2, 3) and B = (8, 7).
M = ( (2 + 8) ÷ 2 , (3 + 7) ÷ 2 ) = (5, 5)
Finding a missing endpoint: the midpoint is M = (4, 1) and one endpoint is A = (1, −2).
B = ( 2×4 − 1 , 2×1 − (−2) ) = (7, 4) — and sure enough, the midpoint of (1, −2) and (7, 4) is back to (4, 1).
The reverse trick, and why it never lies
The missing-endpoint formula B = 2M − A feels like a trick worth memorizing, but it's better to see why it can't fail: the walk from A to M and the walk from M to B are the same walk — same Δx, same Δy — because M is dead center. So to find B, just repeat the A-to-M step starting from M. Doubling the midpoint and subtracting A is that same idea compressed into one line of algebra. A quick sanity check catches most slip-ups: your answer B should make M the average of A and B, and the calculator's table verifies exactly that. If your recovered endpoint ever lands on the same side of M as your known point, a sign got flipped somewhere.