Skip to content
GeoCalcLab emblem
GeoCalcLab.com

Midpoint Calculator: Exact Center of a Line Segment

Average the x-values and the y-values to find the exact center of a segment — with distance, slope, and the midpoint formula shown.

FreeNo sign-upMetric + imperialStep-by-step formula
Unit
Try:

Same answer, other units: distance = 2.0447 m · midpoint = (0.762, 1.524) m

Midpoint
(2.5, 5)
Distance
6.7082 ft

One formula, three ways to check your work

The midpoint of a segment is the point exactly halfway between its endpoints. Its coordinates are simply the averages of the endpoint coordinates: M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2).

Midpoints appear in geometry proofs, map work, splitting a garden bed into equal halves, and framing a photograph. The same idea extends to three dimensions by averaging the z-coordinates as well.

This page also gives the distance between the endpoints and the slope of the segment, and shows how the same formula recovers a missing endpoint.

Midpoint formulas used on this page

← Swipe →
QuantityFormulaNotes
Midpoint xxM = (x₁ + x₂) ÷ 2Average of the two x-coordinates.
Midpoint yyM = (y₁ + y₂) ÷ 2Average of the two y-coordinates.
Missing endpoint (manual)B = 2M − AWorks it out by hand when one endpoint and the midpoint are known.
Distanced = √((x₂ − x₁)² + (y₂ − y₁)²)Half of this distance is the distance from M to either endpoint.
Slopem = (y₂ − y₁) ÷ (x₂ − x₁)The whole segment and each half share the same slope.
3D midpointM = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2)Average each coordinate independently.

Midpoint examples to check against

← Swipe →
Endpoint AEndpoint BMidpointDistance
(0, 0)(8, 6)(4, 3)10
(1, 2)(4, 8)(2.5, 5)6.7082
(−3, 4)(5, −2)(1, 1)10
(0, 5)(10, 5)(5, 5)10
(−2, −2)(2, 2)(0, 0)5.6569

Worked calculation examples

Center of a rectangular lot

A rectangular lot has opposite corners at (12, −8) and (48, 26), measured in metres.

  1. 1.xM = (12 + 48) ÷ 2 = 30
  2. 2.yM = (−8 + 26) ÷ 2 = 9
  3. 3.midpoint = (30, 9) m
  4. 4.distance = √(36² + 34²) = 49.5177 m
Takeaway: In a rectangle the diagonals bisect each other, so the midpoint of one diagonal is also the center of the lot — a handy way to place a feature exactly in the middle.

Finding the other endpoint

A fence line has one end at (5, 7) and a center post at (11, 10), in feet.

  1. 1.x₂ = 2 × 11 − 5 = 17
  2. 2.y₂ = 2 × 10 − 7 = 13
  3. 3.other endpoint = (17, 13) ft
  4. 4.distance = √(12² + 6²) = 13.4164 ft
Takeaway: Double the midpoint and subtract the known endpoint to recover the missing end — a fast check in coordinate geometry proofs.

Midpoint tips and common mistakes

Average, do not subtract

The midpoint uses a sum divided by two. Subtracting coordinates gives the distance components, not the center.

Negative coordinates are fine

Keep the signs inside parentheses: (5 + (−11)) ÷ 2 = −3. Dropping a minus sign is the most common arithmetic error here.

Halve the distance to check

The midpoint is exactly half the total distance from either endpoint. If your two half-distances disagree, the midpoint is wrong.

The midpoint is not the median

A median is a line from a vertex to the midpoint of the opposite side in a triangle. This page finds the midpoint itself, not a median line.

Extend to 3D by averaging z

For points in space, average the third coordinate the same way. Only add a z-term; the formula structure does not change.

Frequently asked questions

What is the midpoint formula?+

M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). Add the x-values and divide by two, then do the same for the y-values.

Can the midpoint have negative coordinates?+

Yes. If the endpoints lie on opposite sides of an axis, the average can be negative, zero, or positive. Keep the signs inside the parentheses while adding.

How do I find a missing endpoint?+

Use B = 2M − A. Double the midpoint coordinates and subtract the known endpoint. If A = (5, 7) and M = (11, 10), the other endpoint is (17, 13).

Is the midpoint the same as the average of the two points?+

Yes. The midpoint is the coordinate-wise average of the endpoints, which is why each coordinate is a sum divided by two.

Do units matter for the midpoint?+

The coordinates carry whatever unit you are working in — feet, metres, or grid squares. The centroid and midpoint calculations are identical; only the label changes.

What about a 3D midpoint?+

Average each coordinate independently: M = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2). The 2D formula is the same calculation with the z-term removed.