Midpoint Calculator
The midpoint of two points is the average of the matching coordinates. For (3, -1) and (7, 5) it is (5, 2), from (3 + 7) / 2 = 5 and (-1 + 5) / 2 = 2, and each half of the segment measures 3.6056. Enter any two points to see the sums, the averages, the distance and the slope.
Point A and point B, one box per coordinate. Leave both z boxes blank for a flat plane problem; fill all six boxes for points in space.
| Midpoint | |
| x coordinate, average of the two x values | |
| y coordinate, average of the two y values | |
| z coordinate | |
| Distance from A to B | |
| Slope of the segment, plane problems |
Everything runs in your browser, and nothing you type is uploaded or stored.
Enter two points, with optional z coordinates for space, and get the midpoint, the sums behind each average, the segment distance and the slope in one pass.
Key takeaways
- The midpoint averages matching coordinates: ((x1 + x2)/2, (y1 + y2)/2)
- (3, -1) and (7, 5) give (5, 2), with (3 + 7) / 2 = 5 and (-1 + 5) / 2 = 2
- Each half of the segment measures 3.6056, so the midpoint is equidistant from both ends
- Whole number endpoints can still produce a fractional midpoint, like (1.5, -2.5) for (-2, -8) and (5, 3)
- In 3D a third average joins: (1, 2, 3) and (4, 6, 15) balance at (2.5, 4, 9)
On this page
- What the midpoint formula says
- Worked example: (3, -1) and (7, 5)
- Why averaging the coordinates works
- Negative coordinates and fractional answers
- Midpoints in three dimensions
- Midpoint, distance and slope: which answer does the question want
- Bisect twice for quarter points, and one civic example
- Four mistakes the midpoint formula punishes
What the midpoint formula says
The midpoint of two points is the average of the matching coordinates. For points (x1, y1) and (x2, y2) the formula reads M = ((x1 + x2)/2, (y1 + y2)/2), and Khan Academy's analytic geometry review (2024) presents it as two averages side by side. No square roots appear at this stage: midpoint work is addition and division, done once per axis.
Wolfram MathWorld defines the midpoint as the point that divides a segment into two pieces of equal length, and credits Pedoe (1995) for a compass and straightedge construction that finds it without any numbers. The coordinate formula is the algebraic twin of that geometric idea: halve the horizontal gap, halve the vertical gap, and the two halves meet at one point.
Because each axis is handled on its own, the formula extends to three dimensions by averaging a third coordinate, and it accepts negatives and decimals without modification. Endpoints with whole numbers can still produce a midpoint with fractional coordinates, which is normal rather than a sign of trouble.
Worked example: (3, -1) and (7, 5)
Step one adds the x coordinates: 3 + 7 = 10, and 10 / 2 = 5. Step two adds the y coordinates: -1 + 5 = 4, and 4 / 2 = 2. The midpoint is (5, 2).
The distance formula turns the same gaps into a check. The segment runs 7 - 3 = 4 across and 5 - (-1) = 6 up, so its squared length is 4^2 + 6^2 = 52 and its length is 7.2111, the square root of 52. Half of that, 3.6056, should be the length from the midpoint to each end, and it is: the point (5, 2) stands the same distance from (3, -1) as from (7, 5).
| Step | Expression | Result |
|---|---|---|
| x coordinate | (3 + 7) / 2 | 5 |
| y coordinate | (-1 + 5) / 2 | 2 |
| horizontal gap | 7 - 3 | 4 |
| vertical gap | 5 - (-1) | 6 |
| full distance | square root of 52 | 7.2111 |
| half distance | 7.2111 / 2 | 3.6056 |
The widget prints all six rows, so the averages and the check arrive together.
Why averaging the coordinates works
Averaging works because the midpoint is the balance point of the segment. Walk from 3 to 7 on a number line: the gap is 4, half the gap is 2, and 3 + 2 = 5, which is 7 - 2 as well. The x average (3 + 7) / 2 = 5 does the same job in one move, and the y average repeats it independently.
Equidistance is the check that catches copied digits. From (5, 2) back to (3, -1) the steps are 5 - 3 = 2 and 2 - (-1) = 3, giving a leg of 3.6056, the square root of 13. From (5, 2) forward to (7, 5) the steps are the same 2 and 3. If the two legs ever disagree, a coordinate was copied wrong, not computed wrong.
| Leg | Horizontal step | Vertical step | Leg length |
|---|---|---|---|
| A (3, -1) to M (5, 2) | 2 | 3 | 3.6056 |
| M (5, 2) to B (7, 5) | 2 | 3 | 3.6056 |
Halving is the whole trick: the horizontal gap of 4 splits into 2 and 2, the vertical gap of 6 splits into 3 and 3. That is the geometric content of dividing each coordinate sum by 2.
Negative coordinates and fractional answers
Endpoints below or left of the origin follow the same arithmetic, provided the signs ride along. For (-4, 6) and (10, -2): (-4 + 10) / 2 = 3 and (6 + (-2)) / 2 = 2, so the midpoint is (3, 2). The negative y coordinate pulls the average down, and the result 2 lands halfway between 6 and -2.
Fractional midpoints are normal. The pair (-2, -8) and (5, 3) averages to (-2 + 5) / 2 = 1.5 and (-8 + 3) / 2 = -2.5, so the midpoint (1.5, -2.5) sits between grid lines. Rounding it to (2, -3) would move the balance point off the segment, so report the fraction.
| Endpoints | x average | y average | Midpoint |
|---|---|---|---|
| (3, -1) and (7, 5) | 5 | 2 | (5, 2) |
| (-4, 6) and (10, -2) | 3 | 2 | (3, 2) |
| (-2, -8) and (5, 3) | 1.5 | -2.5 | (1.5, -2.5) |
Midpoints in three dimensions
Space adds one more average. The midpoint of (x1, y1, z1) and (x2, y2, z2) is ((x1 + x2)/2, (y1 + y2)/2, (z1 + z2)/2), and the widget fills its z row as soon as both z boxes hold numbers.
For (1, 2, 3) and (4, 6, 15): (1 + 4) / 2 = 2.5, (2 + 6) / 2 = 4 and (3 + 15) / 2 = 9, so the midpoint is (2.5, 4, 9). The gaps run 3, 4 and 12, their squares give 9 + 16 + 144 = 169, and the square root of 169 is 13, so the segment measures 13 end to end and 6.5 per half. The gaps 3, 4 and 12 form a three dimensional cousin of the 3-4-5 triple, with 12 taking the place of the 5.
Midpoint, distance and slope: which answer does the question want
Three formulas travel with any pair of points, and homework mixes them freely. The midpoint averages; the distance squares, adds and takes a root; the slope divides rise by run. For (3, -1) and (7, 5) the three results are (5, 2), 7.2111 and 1.5, since the segment climbs 6 / 4 = 1.5 units for every unit of run.
The midpoint never leaves the segment, the distance measures it, and the slope describes its tilt. A question about where two towns should build a rest stop wants the midpoint; how far apart the towns sit wants distance; how steep the road between them runs wants slope. The widget prints all three so a wrong formula choice shows up at a glance, and the distance calculator and slope calculator take each quantity further on its own.
| Quantity | Built from | For (3, -1) and (7, 5) |
|---|---|---|
| Midpoint | averages of matching coordinates | (5, 2) |
| Distance | square root of the squared gaps | 7.2111 |
| Slope | rise over run | 1.5 |
Bisect twice for quarter points, and one civic example
Bisect a segment, then bisect the halves: quarter points appear. The segment from (1, 2) to (9, 10) has midpoint (1 + 9) / 2 = 5 by (2 + 10) / 2 = 6, written (5, 6). Bisecting from (1, 2) to (5, 6) gives (1 + 5) / 2 = 3 by (2 + 6) / 2 = 4, the quarter point (3, 4), and the other half bisects to (7, 8).
The averaging idea scales to real data. The Census Bureau computes the mean center of population by weighting each area's coordinates by its population, then dividing by the total (Census Bureau, 2020 documentation), and the 2020 mean center sits at 37.415725 north, 92.346525 west, near Hartville, Missouri. Treat the 2010 center (37.517534, -92.173096) and the 2020 center as two plain points and their midpoint is (37.517534 + 37.415725) / 2 = 37.4666 by (92.173096 + 92.346525) / 2 = 92.2598. That two point midpoint is an illustration of the arithmetic, not the official center, which weights every area and corrects longitude for latitude.
| Segment | Midpoint |
|---|---|
| (1, 2) to (9, 10) | (5, 6) |
| (1, 2) to (5, 6) | (3, 4) |
| (5, 6) to (9, 10) | (7, 8) |
Four mistakes the midpoint formula punishes
Mistake one is crossing the pairs: averaging x1 with y2 and y1 with x2 produces a point that looks plausible and balances nothing. Averages pair x with x and y with y, and Khan Academy's review flags the same slip.
Mistake two is halving only one coordinate. Skipping the division on the y side of the worked example turns (5, 2) into (4, 6), a point that lies off the segment because the y sum of 4 was never split.
Mistake three is dropping signs. The y sum here is -1 + 5 = 4; treating the -1 as +1 gives (1 + 5) / 2 = 3 and walks the midpoint away from the segment. Parentheses around negative inputs keep the arithmetic honest, and the widget's step row shows them.
Mistake four is forgetting the third coordinate. A plane answer like (2.5, 4) is incomplete for (1, 2, 3) and (4, 6, 15), which balances at (2.5, 4, 9). If the data live in space, fill both z boxes and let the third average run.
Frequently asked questions
What is the midpoint formula?
Average the matching coordinates: M = ((x1 + x2)/2, (y1 + y2)/2). For (3, -1) and (7, 5) that gives (5, 2).
What is the midpoint of (3, -1) and (7, 5)?
(5, 2). The x average is (3 + 7) / 2 = 5 and the y average is (-1 + 5) / 2 = 2. Each half of the segment then measures 3.6056, so the point sits equidistant from both ends.
Can midpoint coordinates be fractions or decimals?
Yes. The pair (-2, -8) and (5, 3) has midpoint (1.5, -2.5). Whole number endpoints often produce a half coordinate, and rounding it would move the point off the segment.
How do I find the midpoint with negative coordinates?
Keep the signs through the sums. For (-4, 6) and (10, -2): (-4 + 10) / 2 = 3 and (6 + (-2)) / 2 = 2, so the midpoint is (3, 2).
Does the formula work in three dimensions?
It extends by one more average: add the z coordinates and divide by 2. For (1, 2, 3) and (4, 6, 15) the midpoint is (2.5, 4, 9).
How is a midpoint related to an average?
On each axis the midpoint coordinate is the average of two numbers. The midpoint as a point is the pair of averages, which is why the formula needs no square roots.
How do I check a midpoint answer?
Measure both halves. From (5, 2) to each of (3, -1) and (7, 5) the leg is 3.6056, the square root of 13. If the two legs disagree, a coordinate was copied wrong.
What if both points are the same?
The midpoint is the point itself and the distance is 0. The formula still runs: averages of equal coordinates return those coordinates.
What is the midpoint of a vertical segment?
The shared x with a y average halfway between: the segment from (2, 3) to (2, 9) has midpoint (2, 6). Its slope is undefined, but its midpoint is not.
How do quarter points work?
Bisect twice. The midpoint of (1, 2) and (9, 10) is (5, 6), and bisecting from (1, 2) to (5, 6) gives the quarter point (3, 4).
Is this the same as the Census mean center of population?
The idea overlaps but the data work differs. The Census Bureau weights every area by population and corrects longitude for latitude, so its result is not a two point midpoint; the 2020 center sits at 37.415725 north, 92.346525 west.
Does the midpoint lie on the segment?
Always, in the straight line sense: it divides the segment into two pieces of equal length, which is the definition MathWorld gives the point.
Why does dividing by 2 work for both coordinates at once?
Each axis is independent: halving the horizontal gap and halving the vertical gap separately lands on the same balance point, and the two halves of the segment come out equal.
What distance does the calculator report for (3, -1) and (7, 5)?
7.2111, the square root of 4^2 + 6^2 = 52. Half of it, 3.6056, is the length from the midpoint (5, 2) to either endpoint.
Spotted a wrong number or a broken result?
More Math tools
Fee schedules, rates and rules change without notice. Always confirm important figures with the official source before you rely on them.