Skip to main content
Midpoint calculator

Find the midpoint between two points.

Enter two points and get the exact midpoint coordinates, the distance between them and the slope of the segment, updated live as you type.

Your two points

First point (x₁, y₁)
Second point (x₂, y₂)
Midpoint (x, y)
0, 0
halfway between the two points

What this means

    Step by step

    StepValue

    How the midpoint works

    The midpoint formula

    The midpoint of a line segment is the point that sits exactly halfway between its two endpoints. You find it by averaging the x-coordinates and averaging the y-coordinates: Mx = (x1 + x2) / 2 and My = (y1 + y2) / 2. The result is a single point that divides the segment into two equal halves.

    For example, with the points (2, 3) and (8, 7), the midpoint x is (2 + 8) / 2 = 5 and the midpoint y is (3 + 7) / 2 = 5, so the midpoint is (5, 5). The same rule works for negatives and decimals: just keep the signs and the averages take care of the rest.

    Distance and slope of the segment

    Alongside the midpoint, two related values describe the same segment. The distance between the points comes from the Pythagorean theorem: distance = square root of ((x2 - x1) squared + (y2 - y1) squared). This is the true straight-line length, and the midpoint splits it into two equal pieces.

    The slope tells you how steep the segment is: slope = (y2 - y1) / (x2 - x1). When the two points share the same x-value the run is zero, division by zero is not allowed, and the slope is undefined (a vertical line). The midpoint still exists in that case, sitting halfway up the vertical segment.

    Common questions

    What is the midpoint formula?

    The midpoint of two points is ((x1 + x2) / 2, (y1 + y2) / 2). You average the two x-values to get the midpoint x and average the two y-values to get the midpoint y.

    Does the order of the points matter?

    No. Because you are averaging, swapping the first and second point gives the same midpoint. (x1 + x2) / 2 is identical to (x2 + x1) / 2.

    Can I use negative numbers or decimals?

    Yes. The calculator accepts negative values and decimals for every coordinate. The averaging keeps the correct signs, so a point at (-4, 2) works just like any other.

    How is the distance between the points found?

    The distance uses the Pythagorean theorem: the square root of ((x2 - x1) squared plus (y2 - y1) squared). The midpoint always divides that distance into two equal halves.

    Why is the slope sometimes undefined?

    Slope is (y2 - y1) / (x2 - x1). When both points have the same x-value the denominator is zero, which is not allowed, so the segment is vertical and its slope is undefined. The midpoint is still valid.

    What is the midpoint used for?

    It is used to find the center of a segment, the center of a circle from a diameter, the balance point between two locations, and to bisect segments in geometry and coordinate proofs.

    Results are computed from the two points you enter. The slope of the segment is undefined when x₁ = x₂ (a vertical line).