The midpoint formula
M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2) Average the two x-coordinates and average the two y-coordinates. Those two averages give the coordinates of the point exactly halfway between the endpoints.
How to find the midpoint
For (1, 2) and (4, 6): the x-coordinate is (1 + 4) ÷ 2 = 5/2, and
the y-coordinate is (2 + 6) ÷ 2 = 4. The midpoint is
(5/2, 4).
Fractions are normal here and not a sign of a mistake. If a pair of corresponding coordinates adds to an odd number, dividing by 2 produces a fraction such as 5/2. That is completely normal for a midpoint.
How to calculate an endpoint
If you know one end and the middle, the other end follows from the same formula rearranged. Since the midpoint is the average of the two ends:
B = 2M − A Double the midpoint, subtract the endpoint you have, and what is left is the endpoint you want — coordinate by coordinate. It is worth seeing this as the midpoint formula read backwards rather than as a second thing to remember.
For example, if one endpoint is (1, 2) and the midpoint is (3, 4), the other endpoint is (5, 6) because 2(3, 4) − (1, 2) = (5, 6).
The midpoint is often used alongside slope in coordinate geometry. The midpoint tells you where a line segment is halfway along, while slope describes its direction. If you're working with two points and need to find how steep the line is, use the Slope Calculator.
If you already know one point and the slope of a line, the Point-Slope Form Calculator can help write the equation of the line.
Finding the distance between two points
d = √((x₂ − x₁)² + (y₂ − y₁)²) This is Pythagoras applied to the right-angled triangle formed by the horizontal and vertical gaps between the points. The horizontal gap is one side, the vertical gap the other, and the distance is the hypotenuse.
Example. From (1, 1) to (2, 2) the gaps are 1 and 1, so
the distance is √(1 + 1) = √2. Not 1.4142136
— that is a rounding, and if the question asks for an exact answer
it is the wrong one. This calculator simplifies the surd as well, so
(2.5, 1) to (4, −0.5) gives (3√2)/2 rather than
2.1213203.
With integer coordinate differences, a whole-number distance can occur when the two gaps form a Pythagorean triple. For example, (0, 0) to (3, 4) has distance exactly 5.
Related: the equation of the line
To go from two points to the equation of the line through them, the equation of the line through two points does it in one step, with the slope and intercept worked out separately.
Frequently asked questions
What is the midpoint formula?
M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). Average the two x-coordinates and the two y-coordinates separately. The two averages give the coordinates of the point halfway between the endpoints.
How do you find the midpoint between two points?
Add the two x-coordinates and divide by 2, then add the two y-coordinates and divide by 2. For example, the midpoint of (1, 2) and (4, 6) is (5/2, 4).
How do I find a missing endpoint?
Use B = 2M − A. Double each coordinate of the midpoint and subtract the matching coordinate of the endpoint you know. The result is the missing endpoint. This is the midpoint formula rearranged rather than a separate formula.
What is the distance formula between two points?
The distance formula is d = √((x₂ − x₁)² + (y₂ − y₁)²). It comes from the Pythagorean theorem: the horizontal and vertical gaps between the points form the two shorter sides of a right-angled triangle, and the distance is its hypotenuse.
Why is my midpoint a fraction?
A midpoint can have fractional coordinates when a pair of corresponding coordinates adds to an odd number. For example, (1 + 4) ÷ 2 = 5/2. The fraction is the exact midpoint, not a mistake.
Does the order of the two points matter?
No. Swapping the two points gives the same midpoint and the same distance. The midpoint uses addition, which is unaffected by order, while the distance formula squares the coordinate differences.