free tool, no sign-up
Midpoint Calculator
Find the midpoint and the distance between two points in 2D or 3D with the midpoint formula and the distance formula.
Point 1
Horizontal coordinate
Vertical coordinate
Optional. Blank stays in 2D
Point 2
Horizontal coordinate
Vertical coordinate
Optional. Blank stays in 2D
Midpoint formula
((x₁ + x₂) / 2, (y₁ + y₂) / 2)
Distance formula
√((x₂ − x₁)² + (y₂ − y₁)²)
Enter x and y for both points to see both formulas with your numbers, then the midpoint and the distance. Leave z blank to stay in two dimensions.
This midpoint calculator finds the halfway point and the straight-line distance between two coordinates. Enter x1, y1, x2, and y2, and the page writes the midpoint formula and the distance formula with those numbers filled in. Optional z values on both points extend the same averages and the same square root into three dimensions. When both coordinates on an axis are whole numbers or end in .5, an average that is not a whole number is shown as a simplified fraction and as a decimal.
Midpoint formula and distance between two points
The midpoint is the point halfway between two endpoints. Average the x-coordinates and average the y-coordinates: ((x1 + x2) / 2, (y1 + y2) / 2). That is the midpoint formula, and the result is the same distance from each end of the segment.
The distance between two points is the length of that segment. Square the change in x, square the change in y, add those squares, and take the square root. For (1, 2) and (4, 6) the midpoint is (5/2, 4), or (2.5, 4) as a decimal, and the distance is 5. Add z on both points for three dimensions; if both z boxes are blank, the calculation stays on the plane.
Frequently Asked Questions
What is the midpoint formula?
The midpoint of (x1, y1) and (x2, y2) is ((x1 + x2) / 2, (y1 + y2) / 2). Average the x-coordinates, then average the y-coordinates. The result is the point halfway between the endpoints of the segment.
What is the distance formula?
The distance between (x1, y1) and (x2, y2) is the square root of (x2 − x1) squared plus (y2 − y1) squared. It is the straight-line length of the segment that joins the points. Swapping the two points does not change the distance.
What is the midpoint of (1, 2) and (4, 6)?
The midpoint is ((1 + 4) / 2, (2 + 6) / 2), which is (2.5, 4). As a simplified fraction that is (5/2, 4). The distance is the square root of (4 − 1) squared plus (6 − 2) squared, which is the square root of 25, so the distance is 5.
How does the midpoint formula work in 3D?
Enter z1 and z2 with the x and y coordinates. The midpoint averages z as well: ((x1 + x2) / 2, (y1 + y2) / 2, (z1 + z2) / 2). The distance adds (z2 − z1) squared inside the square root. From (0, 0, 0) to (1, 2, 2) the midpoint is (1/2, 1, 1), or (0.5, 1, 1), and the distance is 3. Both z boxes blank keeps the calculation in two dimensions. One z without the other is not enough for a 3D point.