What the Endpoint Calculator Does
This calculator finds the missing endpoint of a 2D line segment when you already know one endpoint and the midpoint. The midpoint of a segment sits exactly halfway between its two ends, so if you know where you started and where the middle is, the other end is fully determined. Enter four numbers and the tool returns the coordinates of the second endpoint (x2, y2) — plus the total length of the segment.
The Inputs You Enter
- Starting point x-coordinate (x1) – the horizontal position of the known endpoint.
- Starting point y-coordinate (y1) – the vertical position of the known endpoint.
- Midpoint x-coordinate (xm) – the horizontal position of the segment's midpoint.
- Midpoint y-coordinate (ym) – the vertical position of the segment's midpoint.
The Formula
The midpoint is the average of the two endpoints, so each midpoint coordinate equals (endpoint1 + endpoint2) ÷ 2. Rearranging for the unknown endpoint gives:
$$\left( x_2,\, y_2 \right) = \left( 2\,\text{x}_m - \text{x}_1,\ \ 2\,\text{y}_m - \text{y}_1 \right)$$The calculator also reports the segment length using the distance formula:
$$L = \sqrt{\left( x_2 - \text{x}_1 \right)^{2} + \left( y_2 - \text{y}_1 \right)^{2}}$$Worked Example
Suppose the starting point is (2, 3) and the midpoint is (5, 7). The other endpoint is:
- \(x_2 = 2 \times 5 - 2 = 8\)
- \(y_2 = 2 \times 7 - 3 = 11\)
So the missing endpoint is (8, 11). The length of the full segment is $$\sqrt{\left( 8 - 2 \right)^{2} + \left( 11 - 3 \right)^{2}} = \sqrt{36 + 64} = \sqrt{100} = 10 \text{ units}.$$
Frequently Asked Questions
Why multiply the midpoint by 2? Because the midpoint is the average of both endpoints, doubling it recovers the sum of the two endpoints. Subtracting the known endpoint then isolates the unknown one.
Can I use negative or decimal coordinates? Yes. The formula works for any real numbers, so negative values and decimals are fully supported — for example a midpoint of (−1.5, 0) is handled normally.
What does the length result mean? It is the straight-line distance between the two endpoints, measured in whatever units your coordinates use. In the example above, the segment from (2, 3) to (8, 11) is 10 units long.