acalculator

What is the other endpoint?

Type the endpoint you know and the midpoint of the segment. The endpoint calculator gives the other endpoint, B = 2M − A, in exact fractions, in 2D or 3D, with the length of the segment and a plot of the three points.

Your numbers

Points in
Other endpoint B
(9, 5)

The other endpoint is B = (9, 5).

B: x
9
B: y
5
Length of AB
7.28011

Other endpoint B: (9, 5). The other endpoint is B = (9, 5).

Where are the points?

How to calculate

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.

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).

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

  • 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).

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. Points in 2D (x, y), Endpoint A: x 7, Endpoint A: y -2, Midpoint M: x 8, Midpoint M: y 1.5 gives Other endpoint B (9, 5), B: x 9, B: y 5, Length of AB 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. Points in 2D (x, y), Endpoint A: x 2, Endpoint A: y 3, Midpoint M: x 5, Midpoint M: y 4 gives Other endpoint B (8, 5), Length of AB 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. Points in 3D (x, y, z), Endpoint A: x 1, Endpoint A: y -1, Endpoint A: z 2, Midpoint M: x 0.5, Midpoint M: y 0.25, Midpoint M: z -1 gives Other endpoint B (0, 3/2, −4), B: x 0, B: y 1.5, B: z -4, Length of AB 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. Points in 2D (x, y), Endpoint A: x 0.1, Endpoint A: y 0.2, Midpoint M: x 0.15, Midpoint M: y 0.3 gives Other endpoint B (1/5, 2/5), B: x 0.2, B: y 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)

How it works

The midpoint M of A and B is the average of their coordinates, M = (A + B) ÷ 2. Solved for B:

  • x₂ = 2 × Mx − x₁
  • y₂ = 2 × My − y₁
  • z₂ = 2 × Mz − z₁ (3D only)

The length of AB is √((x₂ − x₁)² + (y₂ − y₁)² (+ (z₂ − z₁)² in 3D)), computed in double precision from the decimal values of B and A with a scaled square root, like Python’s math.hypot. It is twice the length of AM.

Rules

  • Every number is read exactly as typed, as a fraction (0.1 is 1/10), so B is exact.
  • Every coordinate of A and M is from −10¹² to 10¹²; a value outside gets a field message. So B is within ±3 × 10¹².
  • In 2D, z is not used. In 3D the plot of the points shows only x and y (the view from above); the answer uses z.

Output format. B is written (x, y) or (x, y, z), with fractions in lowest terms such as 3/2, whole numbers without a denominator, and a true minus sign (−). Each coordinate is also given as a decimal (the exact value rounded to double precision).

Worked examples by hand

A = (7, −2), M = (8, 3/2). B = (2 × 8 − 7, 2 × 3/2 − (−2)) = (9, 5). The length is √(2² + 7²) = √53 ≈ 7.2801.

A = (2, 3), M = (5, 4). B = (10 − 2, 8 − 3) = (8, 5); the length is √(6² + 2²) = √40 ≈ 6.3246.

3D: A = (1, −1, 2), M = (0.5, 0.25, −1). B = (1 − 1, 0.5 + 1, −2 − 2) = (0, 3/2, −4); the length is √(1 + 6.25 + 36) = √43.25 ≈ 6.5765.

A = (0.1, 0.2), M = (0.15, 0.3). B = (0.3 − 0.1, 0.6 − 0.2) = (1/5, 2/5), which is (0.2, 0.4).

Other questions people ask

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.