Midpoint Formula
Midpoint formula: average x, then average y
Label the endpoints A = (x₁, y₁) and B = (x₂, y₂). The midpoint is M = ((x₁ + x₂) / 2, (y₁ + y₂) / 2). Add the two horizontal coordinates and halve the sum; repeat with the two vertical coordinates. Swapping the endpoints does not change the midpoint.
Think of walking half the horizontal change and half the vertical change from A toward B. This works for a sloping line, a horizontal line or a vertical line. The midpoint is a point with two coordinates—not a length.
A worked example with a negative coordinate
Suppose a drawing places A at (-2, 3) and B at (6, -1). Halfway along their segment:
- x coordinate: (-2 + 6) / 2 = 4 / 2 = 2.
- y coordinate: (3 + (-1)) / 2 = 2 / 2 = 1.
- The midpoint is M = (2, 1).
From A to M, move 4 units right and 2 units down. From M to B, move the same 4 units right and 2 units down. The equal-scale graph above shows those two equal halves.
Missing endpoint: undo the average
Knowing Mₓ = (Aₓ + Bₓ) / 2 lets you multiply by 2 and subtract Aₓ: Bₓ = 2Mₓ − Aₓ. Do the same for y. With A = (-2, 3) and M = (2, 1), B = (2 × 2 − (-2), 2 × 1 − 3) = (6, -1).
Choose Missing endpoint in the tool to try your own coordinates. Each answer includes a reverse check: averaging A and the calculated B must return M. This catches the common mistake of subtracting the midpoint from the endpoint instead.
Three common mistakes to avoid
- Mixing x and y: do not average x₁ with y₁. Pair x with x and y with y.
- Losing a minus sign: 3 + (-1) is 2, while 3 − (-1) is 4. Parentheses in the steps keep the signs visible.
- Using the distance formula: distance gives a nonnegative length. The midpoint formula gives an ordered pair and can include negative values.
Exact answers, with a visual graph
Decimal and fraction inputs are calculated as exact rational numbers. Results are shown as integers, exact terminating decimals up to 8 places, or simplified fractions. For example, (1/3 + 2/3) / 2 = 0.5 exactly; a result such as 2/3 stays a fraction instead of becoming an unlabeled approximation.
The diagram projects those coordinates to screen pixels and fits the segment using equal units per pixel on both axes. It is a visual aid: use the exact coordinates and steps for your answer. All calculations run in your browser; Copy steps includes the inputs, formula, substituted working and reverse check.
Frequently asked questions
What is the midpoint formula?
For endpoints A = (x₁, y₁) and B = (x₂, y₂), the midpoint is M = ((x₁ + x₂)/2, (y₁ + y₂)/2). Average the two x coordinates, then average the two y coordinates. The resulting point lies halfway along the line segment.
How do I find a missing endpoint?
If you know endpoint A and midpoint M, the other endpoint is B = (2Mₓ − Aₓ, 2Mᵧ − Aᵧ). Choose Missing endpoint above and enter A and M. The tool shows the substituted steps and checks that the average of A and the resulting B returns your midpoint.
Does the formula work with negative coordinates or fractions?
Yes. Keep the signs and average matching coordinates. For example, A = (-1/3, 2) and B = (5/3, -4) give M = (2/3, -1). This tool calculates exact fractions internally, so repeating decimals are not silently rounded into an exact-looking answer.
Why do we divide by 2?
Halfway from x₁ to x₂ is x₁ + (x₂ − x₁)/2, which simplifies to (x₁ + x₂)/2. The same reasoning applies to y. Dividing each coordinate sum by two takes its average; it does not calculate the distance between the endpoints.
Can the two endpoints have the same x or y coordinate?
Yes. A vertical segment has the same x at A, M and B; a horizontal segment has the same y. If both endpoints are the same point, the midpoint is that same point. The graph groups overlapping labels so all three point names remain readable.
What inputs and graph limits apply?
Enter coordinates between -1,000,000 and 1,000,000, with at most 6 decimal places, or integer fractions with a nonzero denominator whose absolute value is at most 1,000,000. Mixed numbers, scientific notation and coordinate-pair text are not accepted; use one coordinate per field. Answers are exact. Graph positions are approximate, use the same scale on both axes, and zoom to your points. This is a 2D Cartesian tool, not a latitude/longitude midpoint calculator.