The midpoint of a segment is simply the average of the two endpoints, taken one coordinate at a time. It has to be, because averaging is precisely the operation that lands halfway between two numbers. The result is the centre of the segment and also the centre of the circle for which the segment is a diameter.
The same idea generalises to any fraction along the line, which is the linear interpolation used throughout graphics and animation. Setting the fraction to 0.25 gives the quarter point, 0.5 gives the midpoint and values beyond one extrapolate past the second endpoint. That single parameter is enough to reach every point on the infinite line through the two.
The formula
x₁, y₁- First endpoint
x₂, y₂- Second endpoint
t- Fraction along the segment, 0.5 for the midpoint
How it works, step by step
- Enter the coordinates of both endpoints.
- Set the fraction along the segment — leave it at 0.5 for the true midpoint.
- The gauge shows the x coordinate of the resulting point.
- The full coordinates and the segment length appear below.
Worked examples
Midpoint of (2, 4) and (14, 10)
Averaging each coordinate gives (8, 7). The segment length is 13.4164, so the midpoint sits 6.7082 from either end.
A quarter of the way along
Setting the fraction to 0.25 gives (5, 5.5), which is 3.3541 from the first endpoint.
How to read your score
Frequently asked questions
Why is the midpoint just the average?
Because averaging two numbers lands exactly between them. Doing it separately for x and for y places the point halfway in both directions at once, which is the definition of the midpoint.
What is linear interpolation?
Moving a fraction t along the line from the first point to the second. At t = 0 you are at the start, at t = 1 at the end, and at 0.5 at the midpoint.
How do I find a third endpoint given one end and the midpoint?
Double the midpoint and subtract the known endpoint, coordinate by coordinate. The midpoint of (2,4) and (14,10) is (8,7), and 2 × 8 − 2 is 14 as expected.
Does this work in three dimensions?
Yes, with a third averaged coordinate. The midpoint of a segment in space is the componentwise mean of its endpoints.
Points along a segment
| Fraction t | x | y | Distance from start |
|---|---|---|---|
| 0.00 | 2.000 | 4.000 | 0.0000 |
| 0.10 | 3.200 | 4.600 | 1.3416 |
| 0.25 | 5.000 | 5.500 | 3.3541 |
| 0.33 | 5.960 | 5.980 | 4.4274 |
| 0.50 | 8.000 | 7.000 | 6.7082 |
| 0.67 | 10.004 | 8.002 | 8.9487 |
| 0.75 | 11.000 | 8.500 | 10.0623 |
| 0.90 | 12.800 | 9.400 | 12.0748 |
| 1.00 | 14.000 | 10.000 | 13.4164 |
At t = 0.5 the point is the midpoint; the total segment length is 13.4164.