Calcylator
Coordinate Geometry

The midpoint formula:
finding the centre of a segment

Averaging two coordinates gives the exact centre of the line between them. Here is how to use it, undo it, and apply it to a wall.

Calcylator Editorial Team

Updated · 4 min read

What the midpoint is

Take any two points on a plane and join them with a straight line. The midpoint is the single point on that line exactly halfway along it, so it lies the same distance from each end. It is the centre of the segment, and also the centre of every circle that has the segment as a diameter.

The idea is much older than coordinates: a carpenter marks the middle of a plank by folding a string. Coordinates make it exact. If you know where the two ends sit on a grid, the centre sits at the average of their positions, one direction at a time.

This works because moving from A to B changes x by a certain amount and y by a certain amount, and stopping halfway means taking half of each change.

Because the midpoint is built from averages, it responds sensibly to scaling and shifting. Moving both endpoints three units to the right moves the midpoint three units to the right, and doubling all coordinates doubles the midpoint's. That property is what makes the midpoint reliable in graphics and mapping work.

The formula and a first example

Midpoint =M = ( (x₁ + x₂) ÷ 2 , (y₁ + y₂) ÷ 2 )
(x₁, y₁):
coordinates of the first endpoint
(x₂, y₂):
coordinates of the second endpoint
For three dimensions, add (z₁ + z₂) ÷ 2 as a third coordinate.
  • Point A

    (2, −3)

  • Point B

    (10, 7)

  • x average

    (2 + 10) ÷ 2 = 6

  • y average

    (−3 + 7) ÷ 2 = 2

Midpoint

(6, 2)

Check: the distance from A to B is √(8² + 10²) = 12.81, and the midpoint is half of it, 6.40, from each end.

Negative coordinates need no special rule. Add them with their signs and halve the total, as in (−3 + 7) ÷ 2 = 2. A slip with the sign of a negative number is the most common mistake in this topic.

A fast sanity check is to see whether each coordinate of the midpoint lies between those of the endpoints. Here 6 is between 2 and 10, and 2 is between −3 and 7. If one of them falls outside, there is an arithmetic slip somewhere.

Working backwards to a missing endpoint

A frequent exam question gives the midpoint and one end and asks for the other. Since M is the average of the two ends, the missing end must be as far beyond M as A is before it. Rearranging the formula gives a simple rule.

Missing endpoint =B = ( 2 × Mx − x₁ , 2 × My − y₁ )
M:
known midpoint
A = (x₁, y₁):
known endpoint
  • Midpoint M

    (4, 1)

  • Endpoint A

    (−2, 5)

  • x of B

    2 × 4 − (−2) = 10

  • y of B

    2 × 1 − 5 = −3

Other endpoint B

(10, -3)

Check: the average of −2 and 10 is 4, and the average of 5 and −3 is 1, which returns the given midpoint.

A practical use: centring something on a wall

The same arithmetic places a picture, a shelf or a TV in the middle of a wall. Treat the left edge of the wall as 0 and the right edge as the wall's width. The centre is the midpoint of 0 and the width.

  • Wall width

    4.2 m

  • Picture width

    1.2 m

  • Wall centre

    (0 + 4.2) ÷ 2 = 2.1 m

Picture's left edge from wall corner

1.5 m

The picture's centre sits at 2.1 m, so its left edge is 2.1 − 1.2/2 = 1.5 m from the corner and its right edge is 2.7 m.

Heights work the same way. Many galleries aim to put the centre of a picture at roughly 1.45 m above the floor, a figure close to average eye level. For a wall 2.7 m high, the midpoint of the full height would be 1.35 m, which is a good reminder that the wall's centre and the eye-level guideline are not always the same place.

Hanging several pictures as a group uses the same idea twice: find the midpoint of the group's overall width, then centre the group on the wall midpoint. Gaps between frames of 5 to 8 cm are a common choice, and the total width is the sum of the frames plus the gaps.

The midpoint idea outside geometry

Averaging two endpoints is useful whenever something runs between two limits. The midpoint of two numbers on a line is their mean: the midpoint of 18 and 46 is 32. The midpoint of two times works the same way, once the times are written as minutes. Halfway between 9:30 and 14:10 is 11:50, because 570 and 850 minutes after midnight average to 710.

In spreadsheets and maps the same rule gives the centre of a selected range or of a bounding box. A delivery app that places a pin between two addresses, or a game that spawns an item halfway between two players, is applying the midpoint formula to latitude and longitude or to screen coordinates.

  • Start

    09:30 (570 min)

  • End

    14:10 (850 min)

  • Average

    (570 + 850) ÷ 2 = 710 min

Halfway time

11:50

710 minutes is 11 hours 50 minutes after midnight.

Where students go wrong

  • Subtracting instead of adding. The difference of the coordinates gives the length of a side, not the centre.
  • Dividing only one coordinate by two, and copying the other.
  • Mishandling negatives: (−6 + 2) ÷ 2 is −2, not 4.
  • Mixing the order, so that x from one point is combined with y from the other.
  • Forgetting to check. A midpoint must lie between the endpoints in both coordinates, and the distances from it to each end must be equal.

Related ideas worth knowing

  • Section formula: a point that divides the segment in the ratio m : n is ((m·x₂ + n·x₁) ÷ (m + n), (m·y₂ + n·y₁) ÷ (m + n)). The midpoint is the case m = n.
  • Centroid of a triangle: average all three vertices. It is the balance point, not the midpoint of any one side.
  • Perpendicular bisector: the line through the midpoint at right angles to the segment, which is the set of points equally far from both ends.
  • Midpoint of a diameter: the centre of the circle, so the centre and radius follow directly from the two ends of a diameter.
  • In navigation, the straight-line midpoint on a flat map is only an approximation for long distances on the curved earth.

Common questions

What is the midpoint formula?

The midpoint of (x₁, y₁) and (x₂, y₂) is ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). You average the x-coordinates and average the y-coordinates separately. For (2, −3) and (10, 7), that gives (6, 2).

How do you find the other endpoint when the midpoint is known?

Double the midpoint's coordinates and subtract the known endpoint's coordinates. With midpoint (4, 1) and endpoint (−2, 5), the other end is (2×4 − (−2), 2×1 − 5) = (10, −3).

Is the midpoint the same as the average of two numbers?

On a number line, yes: the midpoint of 3 and 11 is (3 + 11) ÷ 2 = 7. On a plane the same averaging is done for x and y separately, which is exactly what the midpoint formula does.

Does the midpoint formula work in three dimensions?

Yes. Average each of the three coordinates. The midpoint of (1, 2, 3) and (7, 8, 9) is (4, 5, 6). The same idea extends to any number of dimensions by averaging each coordinate.

How do I find the centre of a wall to hang a picture?

Take half the wall's width as the centre line, then subtract half the picture's width to find where its left edge goes. For a 4.2 m wall and a 1.2 m picture, the left edge is at 2.1 − 0.6 = 1.5 m from the corner.

Was this guide helpful?

Continue reading

View all blogs