Home / Math / Midpoint Calculator

Midpoint Calculator: Midpoint and Missing Endpoint

Find the exact middle of a line segment from its two endpoints, or work backwards to find the second endpoint when you know one endpoint and the midpoint. Includes segment length and slope.

By Adzita Editorial Team · Updated 2026-11-03 · How we build and check our tools

Endpoint B in midpoint mode, or the known midpoint M in missing-endpoint mode.

The midpoint formula

The midpoint of a segment is the average of its endpoints, taken one coordinate at a time. For endpoints A(x1, y1) and B(x2, y2):

M = ((x1 + x2) ÷ 2, (y1 + y2) ÷ 2)

This works because moving from A to B is a change of (x2 − x1, y2 − y1), and the middle is reached after half of that change. Adding half the difference to x1 gives x1 + (x2 − x1) ÷ 2, which simplifies to the average. The same rule extends to three dimensions by averaging the z coordinates as well.

Finding a missing endpoint

If you know one endpoint A and the midpoint M, the other endpoint B lies on the opposite side of M at the same distance. Rearranging the midpoint formula gives B = (2 × Mx − Ax, 2 × My − Ay). In other words, B is the reflection of A through M. Choose the missing-endpoint mode, enter A in the first pair of boxes and M in the second pair. For example, with A = (1, 2) and M = (4, 6), the other end is (7, 10), since 2 × 4 − 1 = 7 and 2 × 6 − 2 = 10.

Where midpoints are used

Common mistakes

The most frequent error is averaging x with y instead of x with x. Pair the coordinates by axis. A second slip is forgetting the factor of 2 when working backwards: the midpoint is not the difference between the points, and the missing endpoint is not simply M minus A. Negative values also deserve care, because (−3 + 5) ÷ 2 is 1, while many people subtract by habit. Finally, the midpoint of a segment is not the centroid of a shape with more points; for several points you average all of them, dividing by the count rather than by 2.

Worked example

A segment runs from (−3, 4) to (5, −10). Where is its midpoint?

Inputs

What do you want to find?Midpoint of two endpoints
Endpoint A: x1-3
Endpoint A: y14
Second point: x25
Second point: y2-10

Result

Midpoint = (1, -3)

The point exactly halfway between A and B.

WorkingM = ((-3 + 5) ÷ 2, (4 + -10) ÷ 2)
Segment length16.1245
Half-length (each side of the midpoint)8.0623
Slope of the segment-1.75

Accuracy note: Results use standard double-precision arithmetic, so very large or very small values may be rounded. Check important results by another method.

Frequently asked questions

How do you find the midpoint of two points?

Add the two x coordinates and divide by 2, then add the two y coordinates and divide by 2. The pair of averages is the midpoint of the segment.

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

Double each midpoint coordinate and subtract the matching coordinate of the known endpoint. This places the second endpoint the same distance beyond the midpoint.

Is the midpoint always on the line between the points?

Yes. The midpoint lies on the segment itself, exactly halfway along it, so it is equally far from both endpoints.

Does the midpoint formula work in three dimensions?

Yes. Average the z coordinates in the same way as x and y. The calculator here handles two dimensions, and the logic extends directly.

What if the midpoint has decimals?

That is normal when the sums of the coordinates are odd. A midpoint of (2.5, 4) simply means the middle falls between whole grid positions.

Distance CalculatorStraight-line distance between two points in 2D or 3D, with working and taxicab distance.Slope CalculatorSlope, line equation, y-intercept, angle and perpendicular slope from two points.Circle CalculatorRadius, diameter, circumference and area from any one value, with arc, sector and chord.Percentage CalculatorPercent of a number, percent change, and increase or decrease by a percent, with working.

References and sources

  1. Standard coordinate geometry: the midpoint formula and its use in bisectors and parallelogram properties.

Check primary sources for anything you rely on.