Your Equation

Library / Foundations: Maths / FMA-51

Foundations: Maths

Midpoint of a line segment

Coordinate halfway between two points, found by averaging.

Ref
FMA-51
Rev
v1
Field
Foundations: Maths
Result
xM

The midpoint of a segment is the average of its end coordinates, applied separately to each axis: xM = (x1 + x2)/2 and yM = (y1 + y2)/2. Enter the two x values to get xM, or the two y values to get yM. The coordinates must use the same length unit.

Coordinate halfway between two points, found by averaging. The same formula applies separately to the x and y coordinates.

Calculator

Solve for
−5050
−5050
  • Distance between the two coordinates, |x2 − x1|3
  • Half the separation (the distance from the midpoint to each end)1.5
  • Sum x1 + x25

What drives the result

Each variable is moved across its typical range while the others stay at the values above. The longest bar is the key driver.

Midpoint coordinate () current value 2.5
x1Coordinate of the first pointKey driver
−2327
x2Coordinate of the second point
−24.525.5
  • The points 1 and 4 on an axis have a midpoint of 2.5. With the y coordinates 2 and 6 the midpoint of (1, 2) and (4, 6) is (2.5, 4).
  • The midpoint is as far from each end as from the other, 1.5 units here, which is a quick check.
Chart data as tables

Ranked variables

VariableTypical rangeLowest resultHighest resultSwing ()Local stepChange in result
x1 Coordinate of the first point−50 to 50 −232750+2 +40 %
x2 Coordinate of the second point−50 to 50 −24.525.550+2 +40 %

Sweep of Coordinate of the second point

Coordinate of the second pointMidpoint coordinate
−50−24.5
−37.5−18.25
−25−12
−12.5−5.75
00.5
12.56.75
2513
37.519.25
5025.5

Sweep one variable

Midpoint coordinate ()Hover, touch, or use the arrow keys on the chart
−20−1001020 −40−2002040 Coordinate of the second point now 2.5

Variables and how each one contributes

xM

Midpoint coordinate

Result ·

What the equation gives you. Everything else feeds it.

x1

Coordinate of the first point

· typical −50 to 50

The coordinate of the first end point along one axis, in any length unit used consistently. Moves the midpoint by half the change, because the midpoint is an average. Raising it by 1 (to 2) moves the result by +20 %, from 2.5 to 3.

x2

Coordinate of the second point

· typical −50 to 50

The coordinate of the second end point along the same axis, in the same unit. Moves the midpoint by half the change, in exactly the same way as x₁. Raising it by 1 (to 5) moves the result by +20 %, from 2.5 to 3.

Worked example with the values above

  1. Add the two coordinates: 1 + 4 = 5.
  2. Divide by 2: 5 / 2.
  3. xM = 2.5.

Assumptions and limits

  • Cartesian coordinates with matching length units.
  • A straight segment between the two points.

Common mistakes

  • Averaging an x with a y coordinate.
  • Mixing units, such as one end in mm and the other in m.

Statistics and uncertainty

Measurement errors in two independent end coordinates partly cancel in the average: each error of ±u gives a midpoint error of about ±0.7u. Errors from a shared cause, such as a common offset, do not cancel.

Where it is used

  • Finding the centre of a member, the middle of a span or a halfway point on a drawing.
  • Locating the centre of a circle from the ends of a diameter.

Maths you need

  • Mean (average): sum divided by the count
  • Coordinates: positions along perpendicular axes

Related formulas

Practise this formula