Endpoint Calculator
Other endpoint = 2 x midpoint - known endpoint, one coordinate at a time. With midpoint (5, -3) and endpoint (8, 2), x is 2 x 5 - 8 = 2 and y is 2 x (-3) - 2 = -8, so the other end is (2, -8), 11.6619 units away with a slope of 1.6667.
Give the midpoint and one end of a straight segment to get the other end, the length, the slope and the line equation. Works in 2D and 3D.
Midpoint M
Endpoint A
| Other endpoint | |
| Segment length | |
| Half length (M to each end) | |
| Slope | |
| Line | |
| Distance from the origin | |
| Midpoint check | |
| Point C |
All calculations run in your browser, and nothing you type is uploaded or stored.
Enter a midpoint and one endpoint to get the other end, along with the segment length, slope and the line through all three points.
Key takeaways
- Other endpoint = 2 x midpoint - known endpoint, run once for x and once for y
- Midpoint (5, -3) with endpoint (8, 2) gives the other end (2, -8)
- In 3D add a third line: z = 2Mz - z1, which turns (1, -2, 4) and (3, 0, -1) into (-1, -4, 9)
- Segment (8, 2) to (2, -8) is 11.6619 long with a slope of 1.6667
- Check any answer by averaging the two ends; it has to land back on the midpoint
On this page
The endpoint formula: B = 2M - A
When a segment has one end at A and its middle at M, the far end B is 2M - A, worked once per coordinate. Take the x numbers on their own, then the y numbers on their own. With M at (5, -3) and A at (8, 2), the x of B is 2 x 5 - 8 = 2 and the y of B is 2 x (-3) - 2 = -8, so B sits at (2, -8).
Order matters. Doubling the midpoint and subtracting the known end gives the missing end. Doubling the known end and subtracting the midpoint gives a point past A, twice as far from M as A is, which is a common slip on homework and on job sites alike.
The calculator above takes 2D or 3D points, accepts negative and decimal coordinates, and can run the other way, turning two endpoints into a midpoint. It also reports the segment length, the slope, the line equation and a check on a third point, so the arithmetic is easy to audit instead of taken on faith.
Where B = 2M - A comes from
The midpoint formula is an average: M = ((x1 + x2) / 2, (y1 + y2) / 2). Multiply both sides by 2 and you get 2M = (x1 + x2, y1 + y2). Subtract the known end from both sides and the unknown stands alone: x2 = 2Mx - x1 and y2 = 2My - y1. No new idea is needed, just one algebra step on a formula most people already know.
Read the result as a distance statement. The midpoint sits the same distance from each end, so the trip from A to M covers half the segment. Walk the same distance again in the same direction and you reach B. In vector form M - A = B - M, and rearranging gives B = 2M - A.
That is why the check works. Average A and B and you must land back on M, every time. The Purdue MA 15200 lesson notes list the midpoint and distance formulas on one page, and this Ashworth College geometry handout works an endpoint problem from a midpoint and one end in its second example.
| Quantity | x | y | z, 3D only |
|---|---|---|---|
| Other end B, from M and A | 2Mx - Ax | 2My - Ay | 2Mz - Az |
| Midpoint M, from A and B | (Ax + Bx) / 2 | (Ay + By) / 2 | (Az + Bz) / 2 |
| Distance from A to B | square of Bx - Ax | square of By - Ay | square of Bz - Az |
Add the three squared gaps and take the square root for the length. In 2D drop the z column and the sum has two terms instead of three.
Worked example: midpoint (5, -3), endpoint (8, 2)
Work one coordinate at a time. x: 2 x 5 - 8 = 2. y: 2 x (-3) - 2 = -8. The other endpoint is (2, -8). Nothing in that pair of lines needs a diagram, which is the point of the formula.
Check it with the midpoint formula. The average of the x values is (8 + 2) / 2 = 5, and the average of the y values is (2 + -8) / 2 = -3. Both match the midpoint you started with, so the answer holds.
The segment is 11.6619 units long. The x gap is 8 - 2 = 6, the y gap is 2 - (-8) = 10, and the square root of 36 + 100 = 136 is 11.6619. Half of that is 5.831, the distance from M to either end. The slope is 10 / 6 = 1.6667, so the line reads y = 1.6667x - 11.3333 and it passes through all three points.
Negative and decimal coordinates
Sign errors show up once a coordinate goes below zero, and the fix is to slow down on the subtraction. Midpoint (-4.5, 6) with endpoint A at (2, -3): x is 2 x (-4.5) - 2 = -11 and y is 2 x 6 - (-3) = 15, so B is (-11, 15). The double minus in the y line is the step people drop, and dropping it turns 15 into 9.
Decimals behave the same way. Midpoint (2.5, -1.5) with A at (6, 4): x is 2 x 2.5 - 6 = -1 and y is 2 x (-1.5) - 4 = -7, so B is (-1, -7). Keeping the decimals instead of rounding early keeps the answer exact.
A quick test that catches most slips: B should be as far from M as A is, on the other side. From (2, -3) to (-4.5, 6) the steps are -6.5 in x and +9 in y. From (-4.5, 6) to (-11, 15) the steps are -6.5 and +9 again. Matching steps in both coordinates means the midpoint is where it should be.
Three dimensions: one more component
Add a z line and nothing else changes: z2 = 2Mz - z1. With M at (1, -2, 4) and A at (3, 0, -1), the answers are x = 2 - 3 = -1, y = -4 - 0 = -4 and z = 8 - (-1) = 9, so B is (-1, -4, 9).
Distance uses all three gaps: the square root of 16 + 16 + 100 = 132, which is 11.4891. Average each coordinate with its partner and you land back on (1, -2, 4), so the same check that works in 2D works here.
One thing 3D does not give you is a single slope. A line in space has a direction vector instead of a rise over run, so the calculator reports the direction rather than inventing a slope. Watch for a z value that quietly stays at 0: a 3D point typed into a 2D form flattens onto the plane and the answer looks right while being wrong.
Length, slope and the halfway check
Three numbers keep the answer honest. Length is the square root of (x2 - x1) squared plus (y2 - y1) squared. Half length is that divided by 2, and it should match the distance from either end to the midpoint. Slope is the y gap over the x gap, and a vertical line has none.
For the (8, 2) to (2, -8) case: x gap -6, y gap -10, length 11.6619, half length 5.831, slope 1.6667. Multiply the slope by the x gap and you get back the y gap: 1.6667 x -6 = -10.0. That single multiplication is a fast way to catch a flipped sign before it reaches a drawing.
A vertical segment breaks the slope step because the x gap is zero. Length and midpoint still work, and the line is written x = c instead of y = mx + b. A segment of zero length has no direction at all: both ends are the same point, and the calculator says so instead of dividing by zero.
| Midpoint M | Endpoint A | Other end B | Length |
|---|---|---|---|
| (5, -3) | (8, 2) | (2, -8) | 11.6619 |
| (-4.5, 6) | (2, -3) | (-11, 15) | 22.2036 |
| (2.5, -1.5) | (6, 4) | (-1, -7) | 13.0384 |
| (1, -2, 4) | (3, 0, -1) | (-1, -4, 9) | 11.4891 |
The last row is a 3D case. Its length uses three gaps, so it is easy to compare against a 2D answer and see whether the z term was included.
Where this comes up: courts, boards, maps
Court and field layout. A high school basketball court is 94 feet by 50 feet, so with the origin in one corner the center circle sits at (47, 25). The baseline point that pairs with (0, 25) is (94, 25), from 2 x 47 - 0 and 2 x 25 - 25. Crews mark those points before they snap a chalk line, because one wrong end throws the whole layout off.
Woodwork. To center a 72 inch board, the midpoint is at 36. If a hole has to sit 14 inches from the center, the two marks are 36 + 14 = 50 and 36 - 14 = 22, each 14 inches from the middle and 22 inches from one end.
Spreadsheets. Put x values in one column and y values in the next, then write =2*Mx - Ax once and drag it down. Every row gets its missing end, and the sheet doubles as a record of the check.
Maps, with a caveat. Averaging latitude and longitude gives the middle of the straight line on a flat drawing, which is what a site plan wants. It is not the halfway point along a curved route, and it fails at the dateline: the average of 170 and -170 is 0, while the real middle of those two longitudes is 180. For ground distance on a globe, use the distance calculator instead of the flat formula.
Mistakes that flip the answer
Five mistakes cover most wrong answers. Using the midpoint as if it were an endpoint puts B halfway between A and M. Swapping x and y rotates the answer. Dropping a double minus shortens one coordinate. Doubling the endpoint instead of the midpoint puts B past A. And mixing 2D with 3D flattens a point onto the plane.
| Mistake | What you see | Fix |
|---|---|---|
| Midpoint used as an end | B lands halfway between A and M | Double the midpoint first |
| x and y swapped | The answer mirrors across the line y = x | Keep one column per coordinate |
| Double minus dropped | One coordinate is short by twice the negative part | Write 2 x (-3) - (-2) on paper |
| Endpoint doubled | B sits past A, twice as far from M as A is | Doubling belongs on the midpoint |
| 2D form for a 3D point | z comes out 0 and the point flattens | Enter z on both M and A |
Another person's work is easy to test with a third point. Three points are collinear when the cross product of two direction vectors is zero. Take A(1, 2), B(5, 10) and C(3, 6): the vector AB is (4, 8) and AC is (2, 4), and 4 x 4 - 8 x 2 = 0, so C sits on the line. Move C to (4, 7) and the cross product becomes 4 x 5 - 8 x 3 = -4, so it does not.
The K20 Center lesson Meet Me in the Middle builds the midpoint idea from population estimates and ends with real layout tasks, which is close to how the formula shows up on the job.
Frequently asked questions
What is the endpoint formula?
Other endpoint = 2 x midpoint - known endpoint, applied to each coordinate. With midpoint (5, -3) and endpoint (8, 2) the x is 2 x 5 - 8 = 2 and the y is 2 x -3 - 2 = -8, so the other end is (2, -8).
How do I find the other endpoint from a midpoint and one end?
Double each coordinate of the midpoint, then subtract the matching coordinate of the known end. Do x first, then y, then z if you have one. Write the two lines separately and sign errors drop fast.
Can I use this with 3D points?
Yes, and the rule gains one line: z = 2Mz - z1. For midpoint (1, -2, 4) and endpoint (3, 0, -1) the other end is (-1, -4, 9), and the distance between the ends is 11.4891.
What if the midpoint is the origin?
Then 2M is (0, 0), so B is just -A. With A at (3, -4) the other end is (-3, 4), and the segment is 10 units long because each end sits 5 from the origin.
How do I check the answer?
Average the two endpoints. The midpoint of (8, 2) and (2, -8) is (5, -3), which matches the input. The distance from the midpoint to each end should also match: 5.831 in this case.
How long is the segment from (8, 2) to (2, -8)?
The x gap is 6 and the y gap is 10, so the length is the square root of 36 + 100 = 136, which is 11.6619. Half of that, 5.831, is the distance from either end to the midpoint.
Does the formula work with negative or decimal coordinates?
It works with any real numbers. Midpoint (-4.5, 6) with endpoint (2, -3) gives (-11, 15), and midpoint (2.5, -1.5) with endpoint (6, 4) gives (-1, -7). No rounding is needed at any step.
How do I get the midpoint when both endpoints are known?
Average them: ((x1 + x2) / 2, (y1 + y2) / 2). For (8, 2) and (2, -8) that is (5, -3). The calculator has a second mode for this, and it keeps the length and slope readouts.
What is the slope of the line through those two endpoints?
The y gap over the x gap: 10 / 6 = 1.6667. The line reads y = 1.6667x - 11.3333, and all three points, the two ends and the midpoint, sit on it.
What happens when the two endpoints are the same point?
The segment has zero length and no slope. The midpoint is that same point, and the calculator reports zero length instead of dividing by zero.
Is the midpoint on a map the same as the halfway point on a drive?
No. Averaging coordinates gives the middle of a straight line on a flat drawing. A road bends, so the halfway point by distance sits somewhere else, and near the dateline the average of 170 and -170 even lands at 0 instead of 180.
How do I tell whether three points are on one line?
Compare the slopes, or take the cross product of two direction vectors. For A(1, 2), B(5, 10) and C(3, 6) the cross product is 0, so they line up. For A(1, 2), B(5, 10) and C(4, 7) it is -4, so they do not.
Why does the formula use 2M instead of M?
Because M sits halfway, so the trip from A to M is half the segment. Going that same distance a second time lands on B, which is the same as saying M + (M - A) = 2M - A.
Can I use the endpoint formula for a diagonal on a plan?
Yes. Site plans, court layouts and cabinet drawings are flat coordinate grids, so 2M - A gives the corner or mark you need, and the length readout gives the dimension to write on the drawing.
Spotted a wrong number or a broken result?
More Everyday tools
- 1 Hour Cycling Calories Calculator
- 1 Hour Lunch Break Calculator
- 1 Million in Numbers
- 1 Weeks Ago From Today
- 1 in 60 Rule Calculator
- 10 Day Payoff Calculator
- 10 Hour Shift Schedule Calculator
- 10 Minutes From Now
- 10 Months Ago From Today
- 10 to 1 Arm Workout Calculator
- 10207 2: Log Base 2 Calculator
- 1099 Hourly Rate Calculator
- 11 Months Ago From Today
- 11 Weeks Ago From Today
- 12 Hour Shift Pay Calculator
- 12 Months Ago From Today
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.