Skip to content

Midpoint Calculator: Midpoint, Endpoint and Section Formula

Midpoint of a segment in 2D or 3D, the missing endpoint from a midpoint, and the point dividing a segment in a ratio.

Your details

Find
Space

Results update as you type

Midpoint M

(5, −1)

Length AB
10
Half-length AM = MB
5

Step-by-step solution
  1. x coordinate: (2 + 8) / 2 = 5
  2. y coordinate: (3 + (−5)) / 2 = −1
  3. Midpoint: M = (5, −1)

The midpoint of a segment is the point exactly halfway between its two endpoints. In coordinates it is simply the average of the endpoints: add the xx-coordinates and halve, then do the same for yy (and zz in space). This calculator gives the midpoint of AA and BB in 2D or 3D, with exact fractions like (2,12)\left(2, \frac{1}{2}\right) when the answer is not a whole number.

It also solves the two questions that usually follow in class. Missing endpoint: you know one end AA and the midpoint MM, and you need the other end BB. Section formula: you need the point PP that splits [AB][AB] in a given ratio m:nm:n — one third of the way, three quarters of the way, or even outside the segment (external division). Each answer comes with the length of the segment and the working, coordinate by coordinate.

To measure the segment itself, use the distance between two points calculator; for its direction and equation, see the slope calculator.

How to use this calculator

  1. Choose what to find: Midpoint, Missing endpoint or Ratio m : n.
  2. Pick 2D or 3D.
  3. Enter point AA, then point BB (midpoint and ratio modes) or the midpoint MM (endpoint mode).
  4. In ratio mode, enter mm and nn so that AP:PB=m:nAP : PB = m : n, and choose internal or external division.
  5. Read the point. Fractions appear in the exact line, and the steps show the calculation for each coordinate.

The formula

For A(x1,y1)A(x_1, y_1) and B(x2,y2)B(x_2, y_2), the midpoint averages each coordinate:

M=(x1+x22,y1+y22)M = \left(\frac{x_1 + x_2}{2}, \frac{y_1 + y_2}{2}\right)

In 3D, add z1+z22\frac{z_1 + z_2}{2}. Solving this for BB gives the missing endpoint:

x2=2xM−x1,y2=2yM−y1,i.e. B=2M−Ax_2 = 2x_M - x_1, \qquad y_2 = 2y_M - y_1, \qquad \text{i.e. } B = 2M - A

The section formula generalises the midpoint. The point PP on [AB][AB] with AP:PB=m:nAP : PB = m : n is

P=(nx1+mx2m+n,ny1+my2m+n)P = \left(\frac{n x_1 + m x_2}{m + n}, \frac{n y_1 + m y_2}{m + n}\right)

Note the crossing: mm, the part next to AA, multiplies BB's coordinates. With m=nm = n you get the midpoint again. For external division (P outside the segment, on line ABAB), replace m+nm + n by m−nm - n and nx1+mx2n x_1 + m x_2 by mx2−nx1m x_2 - n x_1.

Worked example

Midpoint of A(−1,4)A(-1, 4) and B(5,−3)B(5, -3): $\left(\frac{-1 + 5}{2}, \frac{4 + (-3)}{2}\right) = $ (2, 0.5), or exactly (2, 1/2).

Missing endpoint: one end is A(1,−2)A(1, -2) and the midpoint is M(4,3)M(4, 3). Then $B = (2 \times 4 - 1, 2 \times 3 - (-2)) = $ (7, 8). Check: the average of (1,−2)(1, -2) and (7,8)(7, 8) is (4,3)(4, 3).

Ratio 1 : 2 from A(1,2)A(1, 2) to B(10,8)B(10, 8): $P = \left(\frac{2 \times 1 + 1 \times 10}{3}, \frac{2 \times 2 + 1 \times 8}{3}\right) = $ (4, 4), one third of the way from AA to BB.

Finding the endpoints of a segment

The endpoint formula B=2M−AB = 2M - A says that MM is halfway, so the step from AA to MM is repeated once more to reach BB. Thinking in steps avoids sign errors: from A(1,−2)A(1, -2) to M(4,3)M(4, 3) you move +3+3 in xx and +5+5 in yy; another identical step lands on (7,8)(7, 8).

When both endpoints are unknown, one midpoint is not enough — infinitely many segments share it. You need extra information: the length and direction of the segment, a second condition such as "AA lies on the xx-axis", or the fact that the segment is a diameter of a known circle. Each condition becomes an equation you can solve together with xA+xB=2xMx_A + x_B = 2x_M and yA+yB=2yMy_A + y_B = 2y_M.

Where the midpoint is used

  • Parallelograms: a quadrilateral is a parallelogram exactly when its diagonals have the same midpoint.
  • Circles: the centre of a circle is the midpoint of any diameter; the radius is half the diameter's length.
  • Perpendicular bisector: the line through the midpoint, perpendicular to [AB][AB], is the set of points equidistant from AA and BB.
  • Triangles: the three medians join each vertex to the midpoint of the opposite side and meet at the centroid, at the ratio 2:12 : 1 from the vertex — a direct use of the section formula.

Frequently asked questions

What is the midpoint formula?

M = ((x₁ + x₂)/2, (y₁ + y₂)/2): average the x-coordinates and average the y-coordinates. For (2, 3) and (8, −5), the midpoint is (5, −1). In 3D, average the z-coordinates too.

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

Double the midpoint and subtract the known endpoint: B = 2M − A, coordinate by coordinate. With A(1, −2) and M(4, 3): B = (8 − 1, 6 + 2) = (7, 8).

What is the section formula?

It gives the point P dividing AB internally in the ratio m : n: P = ((n·x₁ + m·x₂)/(m + n), (n·y₁ + m·y₂)/(m + n)). For example, (4, −3) and (8, 5) split 3 : 1 give P = (7, 3).

Can the midpoint have fractional coordinates?

Yes, whenever the sum of two matching coordinates is odd. The midpoint of (−1, 4) and (5, −3) is (2, 1/2). The calculator shows both the decimal and the exact fraction.

What is the difference between internal and external division?

Internal division places P between A and B. External division places P on the line AB but beyond one end, still with AP : PB = m : n; it needs m ≠ n.

Sources

Last updated:

More Math calculators

People also use