# What is the other endpoint?

Finds the other endpoint of a line segment from one endpoint and the midpoint, B = 2M − A, in 2D or 3D, in exact fractions, with the segment’s length.

- Page: https://www.acalculator.org/math/endpoint-calculator
- JSON spec: https://www.acalculator.org/math/endpoint-calculator.json
- Version: cbad5bc854d7

## Default answer

Example with the default inputs (Points in 2D (x, y), Endpoint A: x 7, Endpoint A: y -2, Midpoint M: x 8, Midpoint M: y 1.5): The other endpoint is B = (9, 5).

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| d | Points in | A flat plane (x, y) or space (x, y, z). |
| x1 | Endpoint A: x | The x coordinate of the endpoint you know, A. |
| y1 | Endpoint A: y | The y coordinate of A. |
| z1 | Endpoint A: z | The z coordinate of A. |
| mx | Midpoint M: x | The x coordinate of the midpoint, M. |
| my | Midpoint M: y | The y coordinate of M. |
| mz | Midpoint M: z | The z coordinate of M. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| endpoint | Other endpoint B | B = 2M − A, coordinate by coordinate, as exact fractions. |
| x2 | B: x | x₂ = 2 × Mx − x₁. |
| y2 | B: y | y₂ = 2 × My − y₁. |
| z2 | B: z | z₂ = 2 × Mz − z₁, in 3D. |
| length | Length of AB | The straight-line distance from A to B: twice the distance from A to M. |

## Method

B = 2M − A: x₂ = 2Mx − x₁, y₂ = 2My − y₁ (and z₂ = 2Mz − z₁ in 3D), from the midpoint formula M = (A + B) ÷ 2.

## Assumptions

- Every number is read exactly as typed (0.1 is 1/10), so B is exact. Coordinates are within ±10¹².
- The length of AB is the straight-line (Euclidean) distance, a double-precision number.
- In 3D the plot shows the x and y coordinates only (the view from above).

## Worked examples

1. d = 2, x1 = 7, y1 = -2, mx = 8, my = 1.5 gives endpoint = (9, 5), x2 = 9, y2 = 5, length = 7.28011. Source: OpenStax, Algebra and Trigonometry 2e, §2.1 The Rectangular Coordinate Systems and Graphs (midpoint formula M = ((x₁ + x₂)/2, (y₁ + y₂)/2); the midpoint of (7, −2) and (9, 5) is (8, 3/2)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-1-the-rectangular-coordinate-systems-and-graphs (retrieved 2026-10-02).
2. d = 2, x1 = 2, y1 = 3, mx = 5, my = 4 gives endpoint = (8, 5), length = 6.324555. Source: OpenStax, Algebra and Trigonometry 2e, §2.1 The Rectangular Coordinate Systems and Graphs (midpoint formula M = ((x₁ + x₂)/2, (y₁ + y₂)/2); the midpoint of (7, −2) and (9, 5) is (8, 3/2)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-1-the-rectangular-coordinate-systems-and-graphs (retrieved 2026-10-02).
3. d = 3, x1 = 1, y1 = -1, z1 = 2, mx = 0.5, my = 0.25, mz = -1 gives endpoint = (0, 3/2, −4), x2 = 0, y2 = 1.5, z2 = -4, length = 6.576473. Source: OpenStax, Algebra and Trigonometry 2e, §2.1 The Rectangular Coordinate Systems and Graphs (midpoint formula M = ((x₁ + x₂)/2, (y₁ + y₂)/2); the midpoint of (7, −2) and (9, 5) is (8, 3/2)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-1-the-rectangular-coordinate-systems-and-graphs (retrieved 2026-10-02).
4. d = 2, x1 = 0.1, y1 = 0.2, mx = 0.15, my = 0.3 gives endpoint = (1/5, 2/5), x2 = 0.2, y2 = 0.4. Source: OpenStax, Algebra and Trigonometry 2e, §2.1 The Rectangular Coordinate Systems and Graphs (midpoint formula M = ((x₁ + x₂)/2, (y₁ + y₂)/2); the midpoint of (7, −2) and (9, 5) is (8, 3/2)), https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-1-the-rectangular-coordinate-systems-and-graphs (retrieved 2026-10-02).

## FAQ

### How do I find an endpoint from the midpoint?

Double the midpoint and subtract the endpoint you know, one coordinate at a time: x₂ = 2Mx − x₁ and y₂ = 2My − y₁. With A = (7, −2) and M = (8, 3/2): B = (16 − 7, 3 + 2) = (9, 5).

### Where does the formula come from?

The midpoint formula says Mx = (x₁ + x₂) ÷ 2. Multiply both sides by 2 to get 2Mx = x₁ + x₂, then subtract x₁: x₂ = 2Mx − x₁. The same works for y and z.

### How can I check the answer?

Find the midpoint of A and the B you got. It must be M again. For (7, −2) and (9, 5): ((7 + 9) ÷ 2, (−2 + 5) ÷ 2) = (8, 3/2).

### Does it work in 3D?

Yes. Pick 3D and add the z coordinates: z₂ = 2Mz − z₁. From A = (1, −1, 2) and M = (0.5, 0.25, −1), B = (0, 3/2, −4).

### How long is the segment?

The distance from A to B, √((x₂ − x₁)² + (y₂ − y₁)²), which is twice the distance from A to M. For A = (2, 3) and B = (8, 5) it is √40 ≈ 6.3246.

### Why are some answers fractions?

Each number is read exactly as typed (0.1 is 1/10), so B is exact: 2 × 0.15 − 0.1 is exactly 1/5, with no rounding error. Each coordinate is also shown as a decimal.

## Sources

- OpenStax, Algebra and Trigonometry 2e, §2.1 The Rectangular Coordinate Systems and Graphs (midpoint formula M = ((x₁ + x₂)/2, (y₁ + y₂)/2); the midpoint of (7, −2) and (9, 5) is (8, 3/2)). https://openstax.org/books/algebra-and-trigonometry-2e/pages/2-1-the-rectangular-coordinate-systems-and-graphs (retrieved 2026-10-02)
