The midpoint of a line segment is the point that lies exactly halfway between two endpoints. In coordinate geometry it is found by averaging the two x-coordinates and averaging the two y-coordinates, which gives you the center of the segment as cleanly as finding the middle of a number line. This midpoint calculator takes the coordinates of your two points and instantly returns the center point, the total length of the segment, the distance from either endpoint to that center, and the slope of the line the segment sits on.
Type in any four numbers and the result card updates on the fly. Because the midpoint is just an average, it works just as well for negative coordinates, points that start at the origin, and very large engineering-scale coordinates — you do not need to reorder the points first, since swapping (x1, y1) with (x2, y2) does not change the result.
How to Use
- Enter the x coordinate of the first point as Point 1 — x coordinate (x1).
- Enter the y coordinate of the first point as Point 1 — y coordinate (y1).
- Enter the x coordinate of the second point as Point 2 — x coordinate (x2).
- Enter the y coordinate of the second point as Point 2 — y coordinate (y2).
- Read the result card: Midpoint — x coordinate and Midpoint — y coordinate give the center point; Distance Between Points is the full segment length; Distance to Midpoint is half of that; Slope of Segment tells you how steep the line is.
You may use decimals, fractions entered as decimals, negative numbers, or zero. There is no requirement that the numbers be positive or sorted left-to-right. If the two points share the same x-coordinate, the segment is vertical and the slope cannot be defined — the calculator will flag this instead of dividing by zero, while the midpoint itself would still be the average of the y-values.
The Midpoint Formula
The midpoint M of a segment joining (x1, y1) and (x2, y2) is:
M = ((x1 + x2) / 2, (y1 + y2) / 2)
In words: add the two x-values and divide by 2 for the center's x, then add the two y-values and divide by 2 for the center's y. The same idea applies on a number line — the midpoint of two numbers is just their average — and it extends naturally to three dimensions by averaging the z-coordinate as well.
Because the midpoint splits the segment into two equal halves, the distance from point 1 to the midpoint is exactly the same as the distance from the midpoint to point 2. The whole-segment length comes from the distance formula (Pythagoras): d = sqrt((x2 − x1)² + (y2 − y1)²), and the distance to the midpoint is d / 2. The slope is rise over run, (y2 − y1) / (x2 − x1), which describes the angle of the line containing the segment.
Why the Midpoint Matters
The midpoint is one of the most-used results in coordinate geometry and its applied cousins. In geometry it anchors proofs about triangles and circles: the center of a circle whose diameter endpoints you know is simply their midpoint, and the medians of a triangle intersect at a point that is a weighted average of the vertices. In map work and navigation, the midpoint between two known coordinates gives you a halfway meeting point. In computer graphics and design, the midpoint of a bounding box is where you place centered text or a rotated pivot.
It is also the inverse operation people need most often: if you know one endpoint and the midpoint, you can double the midpoint and subtract the known endpoint to recover the missing end. That "endpoint reverse" calculation is just the same average rearranged, which is why midpoint problems show up so often in algebra homework and standardized tests.
Examples
Example 1 — The default segment. Points (2, 3) and (8, 11). The midpoint x is (2 + 8) / 2 = 5, and the midpoint y is (3 + 11) / 2 = 7. The segment runs 6 units across and 8 units up, so its length is sqrt(6² + 8²) = 10, meaning the distance to the midpoint is 5. The slope is 8 / 6 ≈ 1.33.
Example 2 — Starting at the origin. Points (0, 0) and (4, 6). The midpoint is ((0+4)/2, (0+6)/2) = (2, 3). The segment length is sqrt(4² + 6²) ≈ 7.21, so each endpoint is about 3.61 from the center, and the slope is 6 / 4 = 1.5.
Example 3 — Negative coordinates. Points (−3, 1) and (5, 5). The midpoint is ((−3+5)/2, (1+5)/2) = (1, 3). Notice the negative x-value is averaged exactly like a positive one — the center does not have to lie in the first quadrant. The length is sqrt(8² + 4²) ≈ 8.94, the half-distance is about 4.47, and the slope is 4 / 8 = 0.5.
Example 4 — Large engineering coordinates. Points (1,000,000, 2,000,000) and (3,000,000, 4,000,000). The midpoint is (2,000,000, 3,000,000), the segment length is about 2,828,427, and the distance to the midpoint is about 1,414,214. The midpoint always lands exactly 50% of the way along, regardless of how large the numbers are.
FAQ
What is the midpoint between two points?
The midpoint is the point exactly halfway along the segment connecting two endpoints. You find it by averaging the x-coordinates, Mx = (x1 + x2) / 2, and averaging the y-coordinates, My = (y1 + y2) / 2. The result is a single point (Mx, My) that is the same distance from both endpoints.
Do I have to order the points left to right?
No. The midpoint uses addition and division, both of which are symmetric, so swapping point 1 and point 2 gives the identical result. You can also enter negative or zero coordinates freely — the average is computed the same way regardless of sign or magnitude.
How do I find the missing endpoint if I know the midpoint?
If one endpoint is (x1, y1) and the midpoint is (Mx, My), the other endpoint is (2·Mx − x1, 2·My − y1). This just rearranges the average formula: double the midpoint and subtract the known endpoint. Use this whenever you are given a midpoint and only one end of a segment.
What is the distance from the midpoint to an endpoint?
It is exactly half of the total segment length. First compute the full distance d = sqrt((x2 − x1)² + (y2 − y1)²), then divide by 2. Because the midpoint is defined as the halfway point, each endpoint is the same distance away, and that distance equals d / 2.
What does the slope tell me about the segment?
The slope m = (y2 − y1) / (x2 − x1) describes the steepness and direction of the line through the two points. A positive slope rises from left to right, a negative slope falls, and zero means a perfectly horizontal line. If x1 and x2 are equal the segment is vertical and the slope is undefined, which this calculator flags as an error rather than dividing by zero.
Can the midpoint formula work in three dimensions?
Yes. The two-dimensional midpoint extends directly to 3D by averaging the third coordinate as well: M = ((x1+x2)/2, (y1+y2)/2, (z1+z2)/2). The same averaging logic also works on a single number line, where the midpoint of two numbers is simply their arithmetic mean.
Disclaimer
This midpoint calculator is provided for informational purposes only and is intended for educational and estimation use. Results are based on the coordinates you enter and the standard midpoint and distance formulas; while the arithmetic is exact to floating-point precision, you should independently verify any result used for engineering, surveying, construction, or academic grading. The authors are not responsible for errors or losses arising from reliance on these results.