Midpoint Calculator

This calculator works the midpoint formula in both directions. Leave it in its default mode and it returns the midpoint of the segment joining two points you enter. Switch to back-solve mode and the second set of coordinates is read as the midpoint instead, so the calculator returns the missing endpoint — the exam question that trips people up far more often than the forward one. Both modes handle three dimensions: leave the z fields at zero for a plane problem, or fill them in for a point in space. The full segment length comes back alongside, and every step is shown.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
What do you want to find?In back-solve mode, the second group of coordinates is read as the midpoint rather than as a second endpoint.The midpoint, from two endpoints
x₁The x-coordinate of the endpoint you know.2
y₁The y-coordinate of that endpoint.4
z₁Leave at 0 for a flat, two-dimensional problem.0
x₂The x-coordinate of the second endpoint, or of the midpoint in back-solve mode.8
y₂The y-coordinate of that same point.10
z₂Leave at 0 for a flat, two-dimensional problem.0

It returns

  • Result — The midpoint, or the missing endpoint, depending on the mode you chose.
  • x-coordinate of the result
  • y-coordinate of the result
  • z-coordinate of the result
  • Length of the whole segment — End to end, not half.
  • Where the result sits

The formula

M=(x1+x22,y1+y22)
x2=2xMx1
zM=z1+z22

In plain text: M = ((x₁ + x₂)/2, (y₁ + y₂)/2)

  • MThe midpoint of the segment (coordinates)
  • x₁, y₁Coordinates of the first endpoint (coordinates)
  • x₂, y₂Coordinates of the second endpoint (coordinates)

The midpoint is the coordinate-by-coordinate average of the endpoints. Because averaging is independent in each axis, the formula extends to three dimensions simply by adding the same expression in z.

Updated Category Coordinate Geometry, Lines & Coordinate Systems Verified against published test cases Reading time 8 min

The midpoint is an average, one axis at a time

The midpoint of a segment is the point exactly halfway along it, and its coordinates are the plain averages of the endpoint coordinates. To get the midpoint's x, average the two x-values; to get its y, average the two y-values. Nothing couples the axes together, which is why the formula looks so much simpler than the distance formula even though both describe the same segment.

The reason the averaging works is that motion along a straight segment is linear in each coordinate separately. Travel a fraction t of the way from A to B and your position is x₁ + t(x₂ − x₁). Put t = ½ and that simplifies to (x₁ + x₂)/2. The same substitution in y gives the other coordinate, and the same substitution in z gives the third.

That general form is worth knowing, because it answers questions the midpoint formula alone cannot. Any point dividing the segment in the ratio t : (1 − t) from A is (x₁ + tΔx, y₁ + tΔy). Put t = 1/3 for the point a third of the way along, or t = 2/3 for two thirds. The midpoint is just the most useful special case.

Back-solving for a missing endpoint

The harder exam question runs backwards: you know one endpoint and the midpoint, and you need the other endpoint. Start from the midpoint relation x_M = (x₁ + x₂)/2, multiply both sides by 2 to get 2x_M = x₁ + x₂, and subtract x₁. That gives x₂ = 2x_M − x₁, with the identical form in y and z.

The pattern to remember is double the midpoint, subtract the known end. If A is (2, 3) and M is (5, 7), then B is (2 × 5 − 2, 2 × 7 − 3) = (8, 11). The near-universal error is to average again instead of doubling, which returns the midpoint of A and M rather than the missing endpoint — an answer that is plausible, wrong, and lands exactly a quarter of the way along the true segment.

Geometrically, back-solving is a reflection: B is the image of A reflected through the point M. That makes a special case easy to see. If the midpoint is the origin, the missing endpoint is simply A with both signs flipped, so A(3, −5) gives B(−3, 5).

Worked example: both directions on the same segment

Take A(2, 4) and B(8, 10) and find the midpoint, then run the process in reverse to check it.

  1. Average the x-values. (2 + 8) ÷ 2 = 10 ÷ 2 = 5.
  2. Average the y-values. (4 + 10) ÷ 2 = 14 ÷ 2 = 7.
  3. Write the midpoint. M = (5, 7).
  4. Find the segment length. Δx = 6 and Δy = 6, so the length is √(36 + 36) = √72 = 8.485281.
  5. Check the halves. From A(2,4) to M(5,7) the differences are 3 and 3, giving √18 = 4.242641 — exactly half of 8.485281, as it must be.
  6. Reverse it. Given A(2,4) and M(5,7), the missing endpoint is (2 × 5 − 2, 2 × 7 − 4) = (8, 10), recovering B.

Now a three-dimensional case. For A(1, 2, 3) and B(5, 6, 7), each coordinate averages independently: (1+5)/2 = 3, (2+6)/2 = 4, (3+7)/2 = 5, so M = (3, 4, 5). The segment length is √(16 + 16 + 16) = √48 = 6.928203, and half of that, 3.464102, is the distance from A to M. Nothing about the method changes when the third axis appears.

Sanity checks on a midpoint

The strongest check is containment: each coordinate of the midpoint must lie between the corresponding coordinates of the two endpoints, inclusive. If your endpoints have x-values 2 and 8, a midpoint x outside the interval from 2 to 8 is wrong, full stop. That single test catches almost every sign error.

The second check is the halving property. The distance from either endpoint to the midpoint must be exactly half the full segment length, so compute one of them with the distance formula calculator and compare. If they do not match, the midpoint is not on the segment.

The third is symmetry. A midpoint calculation must give the same answer whichever endpoint you enter first, because addition commutes. If swapping the two points changes your answer, you have used the subtraction of the distance formula where the addition of the midpoint formula belongs — a genuinely common slip, since the two formulas sit side by side in every textbook.

Midpoints and missing endpoints for worked pairs

The midpoint column averages each coordinate; the endpoint column applies 2M − A to the same A and the midpoint beside it.
Point APoint BMidpoint MSegment lengthB recovered as 2M − A
(0, 0)(6, 8)(3, 4)10.000000(6, 8)
(2, 4)(8, 10)(5, 7)8.485281(8, 10)
(−6, −2)(4, 8)(−1, 3)14.142136(4, 8)
(3, −5)(−3, 5)(0, 0)11.661904(−3, 5)
(1, 1)(4, 5)(2.5, 3)5.000000(4, 5)
(−7, 2)(1, −4)(−3, −1)10.000000(1, −4)
(1, 2, 3)(5, 6, 7)(3, 4, 5)6.928203(5, 6, 7)

Rows 1, 5 and 6 are Pythagorean triples in disguise: 6-8-10, 3-4-5 and 8-6-10 respectively.

Mistakes to avoid

  • Subtracting instead of adding. The midpoint formula adds the coordinates and halves; the distance formula subtracts them. Using subtraction here gives half the displacement, not the midpoint.
  • Averaging again when back-solving. To find a missing endpoint you double the midpoint and subtract the known end. Averaging A with M instead lands a quarter of the way along the segment.
  • Halving only one coordinate. Both x and y (and z) must be averaged. Halving the x while copying the y produces a point that is not on the segment at all.
  • Mishandling negatives. The midpoint of −6 and 4 is (−6 + 4)/2 = −1, not −5. Add first, then halve.
  • Confusing the segment length with the half-length. This calculator reports the full end-to-end distance; the distance from either end to the midpoint is exactly half of it.

What the midpoint is used for

In coordinate geometry the midpoint is the workhorse of proofs. To show a quadrilateral is a parallelogram, show its two diagonals share a midpoint. To find the perpendicular bisector of a segment, you need the midpoint for a point on the line and the negative reciprocal of the segment's slope for its direction — the slope calculator gives you the second half. To find a triangle's circumcentre, intersect two such bisectors.

The centroid of a triangle is a close relative: it is the average of all three vertices rather than two, and it lies two thirds of the way along each median from the vertex. The triangle centroid calculator handles that case directly.

Outside pure geometry, the midpoint is where you place a label between two nodes on a diagram, where you set a bisection method's next guess, and where a drafting program puts a snap point. Combined with the distance formula calculator and the line equation calculator, it gives you everything a two-point segment has to say.

Frequently asked questions

What is the midpoint formula?

M = ((x₁ + x₂)/2, (y₁ + y₂)/2). Average the two x-coordinates for the midpoint's x, and average the two y-coordinates for its y. For (2,4) and (8,10) that gives (5,7). In three dimensions, average the z-coordinates as well.

How do I find the other endpoint when I know the midpoint?

Double the midpoint and subtract the endpoint you have: x₂ = 2x_M − x₁, and the same in y. With A(2,3) and M(5,7), the missing endpoint is (10 − 2, 14 − 3) = (8,11). Switch this calculator to back-solve mode and it applies that formula and shows the working.

Does the midpoint formula work in three dimensions?

Yes, unchanged. Each coordinate averages independently, so you simply add z_M = (z₁ + z₂)/2. For (1,2,3) and (5,6,7) the midpoint is (3,4,5). The same is true in any number of dimensions, which is why the formula generalises far more easily than most of coordinate geometry.

Why is the midpoint an average and the distance a square root?

Because they answer different questions. The midpoint asks where you are halfway along, and position changes linearly in each coordinate, so a plain average does it. Distance asks how far apart the points are, which combines the two coordinate gaps through the Pythagorean theorem, and that introduces the squares and the root.

Can the midpoint have fractional coordinates when the endpoints do not?

Yes, whenever the two coordinates being averaged have different parity. The midpoint of (1,1) and (4,5) is (2.5, 3): the x-values 1 and 4 sum to an odd number, so halving leaves a fraction. There is nothing wrong with that — midpoints need not sit on lattice points.

How do I find a point one third of the way along a segment?

Use the general division formula: the point at fraction t from A is (x₁ + t(x₂ − x₁), y₁ + t(y₂ − y₁)). Put t = 1/3 for a third of the way. From (2,4) to (8,10) that gives (2 + 2, 4 + 2) = (4, 6). The midpoint is the same formula at t = ½.

What is the distance from an endpoint to the midpoint?

Exactly half the length of the whole segment, since the midpoint splits it into two congruent halves. This calculator reports the full end-to-end length, so halve that figure. For a segment of length 8.485281, each half is 4.242641, and that is a useful cross-check on any midpoint you compute.

How is the midpoint used to prove a shape is a parallelogram?

Show that the two diagonals have the same midpoint. In a parallelogram the diagonals bisect each other, so if the midpoint of AC equals the midpoint of BD, the quadrilateral ABCD is a parallelogram. It is a two-line proof once you have the midpoints, and it needs no slopes or lengths at all.

References

  • Precalculus: Mathematics for Calculus, 7th ed. — Cengage (Stewart, Redlin, Watson)
  • CRC Standard Mathematical Tables and Formulas, 33rd ed. — CRC Press
  • Geometry: Euclid and Beyond — Springer (Robin Hartshorne)