Midpoint Calculator

Enter two points to get the exact midpoint between them — the average of the coordinates — or switch modes to enter a midpoint and one endpoint and recover the missing endpoint. You also get Δx, Δy, and the distance between the points.

Put this calculator on your website — free

Copy one snippet and give your visitors a working Midpoint Calculator.

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

Midpoint: M = ( (x₁ + x₂) ÷ 2 , (y₁ + y₂) ÷ 2 )
Missing endpoint: B = ( 2mₓ − x₁ , 2mₔ − y₁ )

(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.

Frequently asked questions

How do I find the midpoint between two points?

Average the coordinates: M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). Add the two x-values and halve them, add the two y-values and halve them, and the pair of results is the point exactly halfway along the segment.

How do I find a missing endpoint if I know the midpoint?

Double the midpoint and subtract the endpoint you know: B = (2mₓ − x₁, 2mᵧ − y₁). It works because the midpoint is the average of the two endpoints, so twice the midpoint equals their sum — subtract one endpoint and the other is what's left.

Is the midpoint just the average of the two points?

Yes, exactly. 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. Each axis is handled independently, which is why the formula is so easy to remember.

Does the midpoint formula work with negative coordinates?

Yes — averaging doesn't care about sign. The midpoint of (−3, 5) and (7, −1) is ((−3 + 7) ÷ 2, (5 + (−1)) ÷ 2) = (2, 2). Just keep the signs attached to the numbers when you add, and the arithmetic takes care of itself.

How far is the midpoint from each endpoint?

Exactly half the distance between the two endpoints — that's what makes it the midpoint. This calculator reports the full endpoint-to-endpoint distance; halve it to get the distance from either endpoint to the midpoint.

Related calculators