Skip to content
Math

Midpoint Calculator

Find the point exactly halfway between two points on a coordinate plane, or work backwards to find a missing endpoint from a known midpoint. Switch to 3D mode to add a z-axis, and see both the midpoint coordinates and the distance between the original endpoints in a single calculation.

Your details

Midpoint
(5, 5)
Midpoint x5
Midpoint y5
Midpoint z-
Distance between endpoints7.211103
Midpoint x (fraction)5
Midpoint y (fraction)5
Midpoint z (fraction)-

The midpoint of (2, 3) and (8, 7) is (5, 5).

  • The x-midpoint 5 is the average of 2 and 8.
  • The y-midpoint 5 is the average of 3 and 7.
  • The full distance between the two endpoints is 7.2111 units.

Next stepUse the slope calculator to find the slope of the line through these two points.

Formula

M=(x1+x22,  y1+y22)Endpoint: x2=2xMx1,  y2=2yMy1M = \left(\dfrac{x_1+x_2}{2},\;\dfrac{y_1+y_2}{2}\right)\quad\text{Endpoint: }x_2=2x_M-x_1,\;y_2=2y_M-y_1

Worked example

For points (2, 3) and (8, 7): midpoint x = (2 + 8) / 2 = 5, midpoint y = (3 + 7) / 2 = 5, so the midpoint is (5, 5). The distance is sqrt((8-2)^2 + (7-3)^2) = sqrt(36 + 16) = sqrt(52) = 7.2111 units. Reverse: if midpoint is (5, 5) and one endpoint is (2, 3), then the other endpoint x = 2*5 - 2 = 8, y = 2*5 - 3 = 7, giving (8, 7).

How the midpoint formula works

The midpoint of a line segment is the single point that sits exactly halfway between its two endpoints. You find it by averaging each coordinate axis independently: add the two x-values and divide by 2 to get the midpoint x, then add the two y-values and divide by 2 to get the midpoint y. Because averaging is symmetric, the midpoint always lies on the segment and divides it into two pieces of equal length. When a result has a fractional part (for example, (7/2, 5)), the calculator shows both the fraction and the decimal so you can use whichever form your work requires.

Finding a missing endpoint (reverse-solve mode)

Sometimes you know the midpoint and one endpoint but need to find the other endpoint. Rearranging the midpoint formula gives x₂ = 2xM - x₁ and y₂ = 2yM - y₁. Switch the calculator to "missing endpoint" mode and enter the known endpoint and the midpoint; it applies those rearranged formulas instantly. This is useful when, for example, you know the center of a circle and one end of a diameter and need the other end.

Distance between the endpoints

This calculator also reports the distance between the two endpoints using the Pythagorean theorem: distance = sqrt((x₂ - x₁)^2 + (y₂ - y₁)^2). In 3D mode a third term (z₂ - z₁)^2 is added under the square root. The distance tells you the full length of the segment, while the midpoint tells you where its center is. Together, those two values completely describe the segment.

Working in three dimensions

Switch to 3D mode to handle coordinates in space. The midpoint formula extends naturally: average x, average y, and average z separately. The result is the point equidistant from both endpoints along all three axes. Three-dimensional midpoints appear in computer graphics (finding the center of an edge in a mesh), physics (center of mass of two equal masses), and engineering (centerline of a 3D beam or pipe).

Where midpoints appear in practice

Midpoints appear across geometry, design, and data work. They find the center of a circle given the two endpoints of a diameter, locate the centroid of a triangle (the average of all three vertex coordinates), bisect a segment when constructing perpendicular bisectors in compass-and-straightedge geometry, and place objects halfway along a path in graphics and game layouts. The same averaging idea extends to any number of points by averaging each axis across all of them, which is how you compute a geometric center or center of mass.

Midpoint and related formulas

FormulaEquationWhen to use
Midpoint (2D)M = ((x1+x2)/2, (y1+y2)/2)Find the halfway point between two 2D coordinates
Midpoint (3D)M = ((x1+x2)/2, (y1+y2)/2, (z1+z2)/2)Extend to three-dimensional space
Missing endpointx2 = 2xM - x1, y2 = 2yM - y1Recover an endpoint from midpoint + other endpoint
Distance (2D)d = sqrt((x2-x1)^2 + (y2-y1)^2)Full length of the segment
Distance (3D)d = sqrt((dx)^2 + (dy)^2 + (dz)^2)Segment length in 3D space
Circle centerCenter = midpoint of diameter endpointsFind the circle center from a diameter

All formulas assume a standard Cartesian coordinate system.

Frequently asked questions

Does the order of the two points matter?

No. Because addition is commutative, averaging x₁ and x₂ gives the same result as averaging x₂ and x₁, and the same is true for every other axis. You can enter the endpoints in either order and get the identical midpoint.

Can the midpoint have decimal or negative coordinates?

Yes. If the two endpoints are an odd integer distance apart, the midpoint will have a half-value such as 4.5 or 7/2. Negative coordinates work the same way: averaging -3 and 5 gives 1, and averaging -7 and -3 gives -5. The calculator shows fraction form when the result is a half-integer, such as 7/2 instead of 3.5.

How is the midpoint different from the distance between two points?

The midpoint is a location, the single point halfway between the endpoints, found by averaging each coordinate axis. The distance is a length, found by applying the Pythagorean theorem to the differences of the coordinates. One answers "where is the halfway point," the other answers "how long is the segment between them." This calculator gives you both at once.

How do I find a missing endpoint if I know the midpoint?

Rearrange the midpoint formula: if xM = (x₁ + x₂) / 2, then x₂ = 2 x xM - x₁. Switch this calculator to "missing endpoint" mode, enter the known endpoint and the midpoint, and it solves for the other endpoint automatically. The same approach works in 3D with the z-axis added.

How does the 3D midpoint formula work?

Extend the 2D formula by a third axis: average z₁ and z₂ the same way you average x and y. The midpoint of (x₁, y₁, z₁) and (x₂, y₂, z₂) is ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2). The distance in 3D adds a third squared-difference term under the square root: sqrt((x₂-x₁)^2 + (y₂-y₁)^2 + (z₂-z₁)^2).

What does the midpoint have to do with the center of a circle?

If you know the two endpoints of a diameter, the center of the circle is exactly the midpoint of that diameter. Plug those two points into the midpoint formula to get the center, then use the distance formula to get the radius (half the full diameter length). This calculator shows both the midpoint and the distance, so you get the center and the diameter length in one step.

Sources

Written by Dr. Rajiv Menon, PhD Applied Mathematician · Bengaluru, India

Applied mathematician bridging algebraic theory and computational tools for students, engineers, and everyday problem-solvers.

Search 3,500+ calculators

Loading search…