Midpoint Calculator

Free midpoint calculator that averages the coordinates of two endpoints to find the point exactly halfway along a line segment, including the special case of the section formula when the ratio is 1:1.

Midpoint calculator

Find the midpoint of a line segment given two endpoints.

Point 1 (x₁, y₁)
Point 2 (x₂, y₂)

Midpoint

(1, 4)

M = ((-3 + 5) / 2, (2 + 6) / 2)

Midpoint calculator guide

The midpoint of a line segment is the unique point that sits equally far from both endpoints. On the coordinate plane that point is just the average of the x-coordinates and the average of the y-coordinates: M = ((x1 + x2)/2, (y1 + y2)/2). Each coordinate is handled independently, so negative values, decimals, and vertical or horizontal segments all use the same two averages.

This calculator is the 1:1 case of the section formula. A point that divides the segment from (x1, y1) to (x2, y2) in the ratio m:n is ((n·x1 + m·x2)/(m + n), (n·y1 + m·y2)/(m + n)). When m = n the weights are equal and the section formula collapses to the midpoint. Related ideas on the same segment are the slope (y2 − y1)/(x2 − x1) and the distance √((x2 − x1)² + (y2 − y1)²); together they describe where the middle is, how steep the segment is, and how long it is.

How to use this midpoint calculator

  1. Enter Point 1: Type the x1 and y1 coordinates of the first endpoint. Decimals and negatives are allowed; empty or non-numeric values are rejected.
  2. Enter Point 2: Type the x2 and y2 coordinates of the second endpoint. The two points may be the same — the midpoint is then that point.
  3. Select Calculate: Press Calculate to average each coordinate. The default example (−3, 2) and (5, 6) is already evaluated when the page loads, giving midpoint (1, 4).
  4. Read the midpoint: The result is shown as (mx, my). Integers appear without trailing zeros; other values use up to six significant digits.
  5. Reset or share: Use Reset to return to the example points, or copy the link to share the current coordinates — the inputs are stored in the page URL.

Formula and variables

Add the two x-coordinates and divide by 2; add the two y-coordinates and divide by 2. The result is the midpoint of the segment joining (x1, y1) and (x2, y2). This is the section formula with equal weights m = n = 1: the internal division point ((n·x1 + m·x2)/(m + n), (n·y1 + m·y2)/(m + n)) reduces to the same pair of averages. Order of the endpoints does not matter, and if the two points coincide the midpoint is that shared point.

M = ((x1 + x2) / 2, (y1 + y2) / 2)
(x1, y1)First endpoint
Coordinates of Point 1 on the Cartesian plane. (same length units as Point 2)
(x2, y2)Second endpoint
Coordinates of Point 2; may equal Point 1. (same length units as Point 1)
M (mx, my)Midpoint
The point halfway between the endpoints; mx = (x1 + x2)/2 and my = (y1 + y2)/2. (same length units as the endpoints)
m : nSection ratio
Weights in the section formula; the midpoint is the special case m = n. (unitless ratio)

Worked example: midpoint of (−3, 2) and (5, 6)

Find the midpoint of the default example segment from Point 1 (−3, 2) to Point 2 (5, 6), which is the 1:1 case of the section formula.

Point 1 (x1, y1)
(−3, 2)
Point 2 (x2, y2)
(5, 6)
  1. Average the x-coordinates: mx = (x1 + x2) / 2 = (−3 + 5) / 2 = 2 / 2 = 1.
  2. Average the y-coordinates: my = (y1 + y2) / 2 = (2 + 6) / 2 = 8 / 2 = 4.
  3. Section-formula check with m = n = 1: ((1·(−3) + 1·5)/(1 + 1), (1·2 + 1·6)/(1 + 1)) = (2/2, 8/2) = (1, 4).
  4. Related checks on the same segment: slope = (6 − 2)/(5 − (−3)) = 4/8 = 1/2, and distance = √(8² + 4²) = √80 = 4√5. Each half-segment from an endpoint to (1, 4) has length 2√5.

Result: M = (1, 4)

The point (1, 4) is exactly halfway from (−3, 2) to (5, 6). Swapping the two endpoints yields the same midpoint, and the two half-segments have equal length, confirming the average is the geometric middle of the segment.

Understanding your results

What (mx, my) means

The displayed pair is the midpoint in the same units as the endpoints. Each coordinate is independently the arithmetic mean of the corresponding endpoint coordinates, so a vertical segment keeps the shared x-value and a horizontal segment keeps the shared y-value.

Equal distance from both ends

The Euclidean distance from M to Point 1 equals the distance from M to Point 2, and each is half the length of the full segment. If those distances disagree, an arithmetic error occurred in one of the averages.

Same point input

When both endpoints are identical, the segment has length zero and the midpoint is that point. The calculator allows this instead of treating it as an error, because the formula remains defined.

Assumptions

  • Both points lie in the Cartesian plane with the same length units on each axis.
  • Coordinates are finite real numbers; empty strings and non-numeric tokens are rejected.
  • The midpoint uses equal weights (the 1:1 section). Unequal ratios m:n are a different tool.
  • The two endpoints may coincide; the midpoint is then that shared point.

Limitations

  • Only two-dimensional points are supported; a 3D midpoint would also average a z-coordinate.
  • The calculator reports the midpoint coordinates, not the slope or distance of the segment.
  • An external division (a point beyond an endpoint) is not the midpoint and needs the section formula with a negative ratio.
  • Very large coordinates that overflow to Infinity are rejected rather than approximated.

Common mistakes

  • Subtracting coordinates instead of adding them; the midpoint averages, so you add then divide by 2.
  • Dividing only one coordinate by 2, or dividing the pair as if it were a slope (y2 − y1)/(x2 − x1).
  • Dropping a negative sign: (−3 + 5)/2 is 1, not (−3 − 5)/2 or (3 + 5)/2.
  • Expecting integer results whenever the endpoints are integers; (0, 0) and (1, 1) have midpoint (0.5, 0.5).
  • Confusing the midpoint with the centroid of more than two points, which averages every vertex, not just a pair.
  • Treating two identical points as invalid; the midpoint of a point with itself is that point.

Practical use cases

Bisect a segment on the coordinate plane

Homework and constructions often ask for the center of a segment. Averaging the endpoints gives the point that a perpendicular bisector would pass through.

Meet halfway between two locations

On a map with consistent units, the midpoint is a first estimate of a meeting point. Combine it with the distance formula if you also need how far each person travels.

Recover an endpoint from a midpoint

If M is the midpoint of A and B, then B = 2M − A. Rearranging the averages is how you finish “find the other endpoint” problems after you know one end and the middle.

Connect midpoint, slope, and distance

The same two points determine a slope and a length. Use this calculator for the middle, then a slope or distance tool if you need the steepness or the length of the segment.

Planning and decision guide

Use the section formula when the split is not 1:1

If a problem says a point divides a segment in the ratio 2:1, that is not the midpoint. Apply the weighted section formula with m = 2 and n = 1, or rescale: two-thirds of the way from Point 1 toward Point 2 is ((1·x1 + 2·x2)/3, (1·y1 + 2·y2)/3).

Check with slope and distance when a sketch looks wrong

A midpoint must lie on the segment, so the slope from Point 1 to M equals the slope from M to Point 2 (when the segment is not vertical), and the two distances to the endpoints must match. Those two related ideas catch most arithmetic slips.

Keep units consistent

Averaging mixed units (metres with feet, or pixels with kilometres) still produces numbers, but they no longer mean “halfway” in physical space. Convert both points to the same units before calculating.

Frequently asked questions

What is the midpoint formula?

For endpoints (x1, y1) and (x2, y2), the midpoint is M = ((x1 + x2)/2, (y1 + y2)/2). Each coordinate of M is the average of the corresponding endpoint coordinates.

How is the midpoint related to the section formula?

The section formula finds the point that divides a segment in the ratio m:n. When m = n the weights are equal, and that internal division point is exactly the midpoint. Any other ratio (for example 2:1) is a different point on the same line.

Can the two points be the same?

Yes. If both endpoints are identical, the segment has length zero and the midpoint is that point. For example, the midpoint of (0, 0) and (0, 0) is (0, 0).

How do midpoint, slope, and distance fit together?

All three come from the same pair of points. The midpoint tells you where the middle is, the slope (y2 − y1)/(x2 − x1) tells you how steep the segment is, and the distance formula tells you how long it is. The midpoint is always half the distance from each endpoint.

Does the order of the two points change the midpoint?

No. Addition is commutative, so ((x1 + x2)/2, (y1 + y2)/2) equals ((x2 + x1)/2, (y2 + y1)/2). Swapping Point 1 and Point 2 leaves M unchanged.

Can I enter negative numbers or decimals?

Yes. The formula is ordinary arithmetic: (−6 + 4)/2 = −1, and (0 + 1)/2 = 0.5. Empty fields and non-numeric tokens such as abc are rejected instead of being treated as zero.

How do I find an endpoint if I already know the midpoint?

If M is the midpoint of A and B, then each coordinate of B is twice the midpoint minus the corresponding coordinate of A: B = (2·mx − xA, 2·my − yA). That identity is the midpoint formula solved for the unknown end.

Sources and review

Reviewed 2026-08-23.

Continue with calculators that answer nearby questions and help compare the next step.