CalculatorBee

Midpoint calculator

The midpoint is the average of the two x values and the average of the two y values. Distance and slope come free from the same inputs.

Result

Midpoint
(5.00, 7.00)
Distance
10.0000
Slope
1.3333

Worked examples

Midpoint of a line segment

Points (2, 3) and (8, 11).

  1. x: (2 + 8) ÷ 2 = 5
  2. y: (3 + 11) ÷ 2 = 7

The midpoint is (5, 7).

The midpoint is just two averages

The midpoint formula looks like something to memorise, but it is the mean applied twice — once to the x coordinates and once to the y coordinates. Averaging the ends of a segment gives its centre in exactly the way averaging two numbers gives the value halfway between them.

The same idea extends to three dimensions by averaging the z coordinates too, and to any number of dimensions after that.

Distance and slope from the same two points

Distance comes from Pythagoras: the horizontal and vertical gaps are the two short sides of a right triangle, and the segment itself is the hypotenuse, so distance is √(Δx² + Δy²).

Slope is the vertical gap divided by the horizontal gap. When the horizontal gap is zero the line is vertical and the slope is undefined — not infinite, undefined, because division by zero has no value.

Formula

midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2)

Worked coordinate pairs

Point APoint BMidpointDistanceSlope
(2, 3)(8, 11)(5, 7)101.333
(0, 0)(6, 8)(3, 4)101.333
(−4, 2)(4, 2)(0, 2)80 (horizontal)
(3, 1)(3, 9)(3, 5)8undefined (vertical)
(−2, −5)(4, 7)(1, 1)13.4162

Frequently asked questions

What is the midpoint formula?

Average the coordinates: midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). For (2, 3) and (8, 11) the midpoint is (5, 7).

How do I find the distance between two points?

Use √((x₂ − x₁)² + (y₂ − y₁)²). For (2, 3) and (8, 11) that is √(36 + 64) = 10.

What is the slope between two points?

Divide the change in y by the change in x. From (2, 3) to (8, 11): 8 ÷ 6 = 1.33.

Does the order of the points matter?

Not for the midpoint or the distance — both are symmetric. Slope also comes out the same, as long as you keep the same order in the numerator and denominator.

How do I find the midpoint in three dimensions?

Average each coordinate separately, including z: ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2).

What is the midpoint used for?

Finding the centre of a line segment, the perpendicular bisector of a chord, the centre of a circle from two endpoints of a diameter, and the centre point between two map locations.

How do I find an endpoint given the midpoint?

Double the midpoint and subtract the known endpoint. If the midpoint is (5, 7) and one end is (2, 3), the other is (8, 11).

Why is the slope undefined for a vertical line?

Slope is the change in y divided by the change in x, and for a vertical line the change in x is zero. Division by zero has no value, so the slope is undefined rather than infinite.

More math calculators