Saved

Press the star next to a tool's name to save it.

All my tools

Midpoint Calculator

Use this midpoint calculator to find the point halfway between two points in 2D or 3D, the missing endpoint, a point that splits a segment in a ratio, and segment lengths.

Restored your last values ·

Enter the x and y coordinates of the two points, and add z for a point in 3D. For the other endpoint, enter one endpoint and the midpoint. For a point that divides the segment, enter the ratio m : n, where P is closer to B when m is larger. For segment addition, fill in two of the three lengths.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Choose what you want to find, enter the coordinates or lengths, then press Calculate.

See full result

A midpoint calculator finds the point halfway between two points, and it also goes the other way. Enter the coordinates of A and B to get the midpoint, enter one endpoint and the midpoint to find the other endpoint, or enter a ratio to find the point that divides the segment in that ratio. A fourth mode adds segment lengths. Everything is worked out in your browser, in two or three dimensions.

How to use the midpoint calculator

  1. Choose what you want to find.
  2. Enter the x and y coordinates of point A and point B, plus z for a point in 3D.
  3. For a ratio, enter the parts m and n and choose an internal or external division.
  4. Press Calculate.

The midpoint formula

The Wikipedia article on the midpoint says that the midpoint of a segment between A = (a₁, …, aₙ) and B = (b₁, …, bₙ) is (A + B) ÷ 2, so its i-th coordinate is (aᵢ + bᵢ) ÷ 2.[1] That one rule covers a plane and space. For A = (2, 4) and B = (8, 10), the midpoint is ((2 + 8) ÷ 2, (4 + 10) ÷ 2) = (5, 7). In three dimensions, (1, 2, 3) and (5, 6, 7) have the midpoint (3, 4, 5). The calculator also gives the length of the segment, from the usual distance formula, and half of that length.

Finding the other endpoint

If you know one endpoint A and the midpoint M, solve the midpoint formula for the other endpoint. Since M = (A + B) ÷ 2, the endpoint is B = 2M − A. This is derived from the formula above, and it is not a separate rule on the page. With A = (2, 4) and M = (5, 7), the endpoint is (2 × 5 − 2, 2 × 7 − 4) = (8, 10). The calculator checks that A, M and B lie on one line with M exactly halfway.

Dividing a segment in a ratio

The Wikipedia page on the section formula gives the point P that divides the segment from A = (x₁, y₁) to B = (x₂, y₂) internally in the ratio m : n as ((m·x₂ + n·x₁) ÷ (m + n), (m·y₂ + n·y₁) ÷ (m + n)).[2] For an external division, where P is on the extension of AB, the formula is ((m·x₂ − n·x₁) ÷ (m − n), (m·y₂ − n·y₁) ÷ (m − n)).[2] The page adds that the midpoint is the special case of an internal division in the ratio 1 : 1. Take A = (0, 0), B = (9, 6) and m : n = 2 : 1. The point is ((2 × 9 + 0) ÷ 3, (2 × 6 + 0) ÷ 3) = (6, 4), which is two-thirds of the way from A to B. With A = (1, 1), B = (3, 5) and an external ratio of 3 : 1, the point is (4, 7).

Segment addition

If B lies between A and C on a line, the length AB plus the length BC equals the length AC. The Wikipedia article on the line segment describes the idea as a definition of betweenness: a point B is between A and C if the distance |AB| added to the distance |BC| equals the distance |AC|.[3] The segment addition mode takes any two of the three lengths and gives the third. If AB is 5 and BC is 7, then AC is 12. If AC is 12 and AB is 5, then BC is 7. If the numbers cannot fit, for example when a part is longer than the whole, the calculator says so.

Midpoints in geometry

The midpoint is the center of a line segment and the point where a segment bisector crosses it. In a triangle, the segments that join the midpoints of two sides are parallel to the third side, and the centroid is the average of the three vertices, ((x₁ + x₂ + x₃) ÷ 3, (y₁ + y₂ + y₃) ÷ 3), as the section formula page notes.[2] Midpoints are also used to find the center of a circle from a diameter, because the center is the midpoint of the diameter's endpoints. When a problem gives you the center and one end of a diameter, the other endpoint mode gives the opposite end at once.

Worked example with a diameter

A circle has a diameter from A = (−3, 2) to B = (7, 8). The center is the midpoint, ((−3 + 7) ÷ 2, (2 + 8) ÷ 2) = (2, 5). The radius is half of the diameter, and the length AB is √(10² + 6²) = √136, about 11.66, so the radius is about 5.83. If you know the center (2, 5) and one end of the diameter, (−3, 2), the other endpoint mode gives (7, 8) again. These two modes are the quickest way to move between a circle's center and the ends of its diameter.

Typing negative numbers and decimals

You can use negative numbers and decimals in every box. The ratio parts must be more than zero, and for an external division they must be different, because the formula divides by m − n. For segment addition, leave exactly one of the three lengths blank. The calculator does not accept three lengths, because they would give no new information, and it would be unable to tell whether they agree.

Common mistakes

  • Adding the coordinates and forgetting to halve. The midpoint is the average, not the sum.
  • Mixing up m and n. A larger m moves the point toward B.
  • Using internal division for a point outside the segment. Choose external for points beyond B.
  • Typing mixed dimensions. If one point has a z value and the other does not, the blank z counts as 0.

What next

Use this often? Add Midpoint to your Home screen.

Frequently asked questions

What is a midpoint calculator?

A tool that finds the point halfway between two points, plus related answers such as the other endpoint, a point that divides a segment in a ratio, and a missing segment length.

What is the midpoint formula?

The midpoint of A and B is (A + B) ÷ 2, so each coordinate is the average of the two matching coordinates. For (2, 4) and (8, 10) it is (5, 7).

How do I find the other endpoint?

Double the midpoint and subtract the known endpoint: B = 2M − A. For A = (2, 4) and M = (5, 7), B is (8, 10).

How do I divide a segment in the ratio m : n?

Use ((m·x₂ + n·x₁) ÷ (m + n), (m·y₂ + n·y₁) ÷ (m + n)). For an external division, the plus signs between the terms become minus signs.

Does the midpoint calculator work in 3D?

Yes. Enter a z value for one or both points. A blank z counts as zero, so you can mix flat and 3D points.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools