Midpoint Calculator
Result
Midpoint x
- Midpoint y
- 5.0000
- Distance from the midpoint to either end
- 3.6056
A midpoint calculator takes the two endpoints of a line segment and returns the point exactly halfway between them. To get it, average the two x values and average the two y values: the segment from (1, 2) to (5, 8) has its midpoint at (3, 5), because 1 and 5 average to 3 while 2 and 8 average to 5. That is the midpoint formula, and there is nothing to it beyond those two averages. Beside the two coordinates the page prints the length of half the segment, 3.6056 for that pair. The third row is not decoration. Coordinates on their own are hard to check: a midpoint of (500, 800) and a midpoint of (5, 8) look equally reasonable on a screen, and neither number carries any hint about which one the arithmetic produced. The half-length does carry one. It is the distance from the midpoint out to either endpoint, and those two distances have to match, because being equidistant from both ends is what makes a point the midpoint in the first place. Compare it against the segment you started with — the half-length should be half of the full length — and a misplaced decimal point stops being invisible. Three things about the inputs are worth knowing before you use the page. The coordinates are plain numbers rather than lengths, so there is no unit to pick and none is printed: if your points are in metres then the answer is in metres, if they came off a graph then they are in whatever the grid was drawn in, and if they are latitude and longitude then the half-length is in degrees, not kilometres. All four boxes accept anything from minus a billion to a billion. That ceiling is not a claim about how large coordinates get; it is there because the page computes the sum of two endpoints and then halves it, and past a certain size that sum stops being exact. Every number is written to four decimal places, trailing zeros included, so a midpoint that lands on a whole number still comes back as 3.0000.
Midpoints of some segments worth knowing by heart
| First x | First y | Second x | Second y | Midpoint x | Midpoint y | Half-length |
|---|---|---|---|---|---|---|
| 1 | 2 | 5 | 8 | 3 | 5 | 3.6056 |
| 0 | 0 | 10 | 0 | 5 | 0 | 5 |
| 4 | -7 | -4 | 7 | 0 | 0 | 8.0623 |
| 2.5 | -1.5 | 2.5 | -1.5 | 2.5 | -1.5 | 0 |
| -3 | 4 | 7 | -2 | 2 | 1 | 5.831 |
| 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Six segments, and the last three columns are what the page returns for each. Read the first row first, since it is the one the page loads with: a segment from (1, 2) to (5, 8) is four across and six up, its midpoint is two across and three up from the first end, and the half-length of 3.6056 is the diagonal of that step. The second row is the same shape lying flat — both y values are zero, so the midpoint y is zero too and the half-length is simply half of the ten across. The third row is the one to study if you keep getting a sign wrong: the endpoints are reflections of each other through the origin, so the origin is exactly halfway between them and both coordinates of the midpoint come back as zero. That is a real answer rather than an empty one, and a row of zeros on this page never means a field was left blank. The fourth row is a segment of no length, the only input that can drive the third column to zero, and the fifth row is a pair whose differences are both even, which is why coordinates that look awkward average out to whole numbers. The last row has both endpoints at the origin, so all seven columns are zero at once. Every number here is regenerated from the four coordinates each time the page is built, so none of them can drift out of step with what the calculator returns.
Formula
Midpoint x = (x₁ + x₂) ÷ 2 Midpoint y = (y₁ + y₂) ÷ 2 Half-length = √((x₂ − x₁)² + (y₂ − y₁)²) ÷ 2
- First endpoint
- One end of the segment, as an x and a y. Either end can be entered first — swapping the two pairs does not change the midpoint, since addition does not care about order
- Second endpoint
- The other end, with the same rules. Neither endpoint has to be larger than the other, so the second x may be smaller than the first and either coordinate may be negative
- Midpoint
- The two averages, one per axis, each rounded to four decimal places. This is the answer, and it always lies between the two endpoints — a midpoint outside them means a sign was dropped somewhere
- Half-length
- The distance from the midpoint to either endpoint, computed from the two endpoints directly rather than from the rounded midpoint. It is the same number for both ends, which is the check the row exists to give you
- Four decimal places
- The width every number on the page is written to, not a claim about precision. Coordinates are printed with their trailing zeros, and the half-length is often a square root that goes on forever, so four places is where it is cut
Reach for a midpoint when something has to sit evenly between two things you can name. Halfway between two towns on a map, the centre of a diameter, the point a surveyor sets a stake at, the middle of a wall you are about to hang something on, the balance point between two figures on a chart. In each case you have the two ends and you want what lies between them, and averaging each coordinate does it. It is also the fastest way to get the centre of a circle when you have two points on it that are opposite each other, because the centre of a circle is the midpoint of any diameter. The other half of the page is the part people forget to use. A midpoint is not just a pair of numbers produced by a rule; it is a point that is the same distance from both ends, and the half-length output lets you confirm that on the spot. If you measured the segment with a ruler you already know the full length, and half of it should equal what the page prints. When it does not, the input is wrong rather than the answer, and the most common cause is a sign: the difference between a y of minus 7 and a y of 7 is fourteen, not zero, and a dropped minus sign in the second endpoint moves the whole answer up or down by seven while still looking perfectly ordinary.
Worked examples
The default segment, one to five across and two to eight up
- Average the x values: (1 + 5) ÷ 2 = 3
- Average the y values: (2 + 8) ÷ 2 = 5
- The midpoint is (3, 5)
- Half-length: the x difference is 4 and the y difference is 6, so the full length is √(16 + 36) = √52 = 7.2111 and half of it is 3.6056
The pair that comes up on the page when it loads, and a good one to check by eye. Both averages are whole numbers, so the two coordinates are exact, while the half-length is a square root and therefore rounded — a fair picture of the page as a whole. Walking from (1, 2) to (5, 8) means four across and six up; the midpoint is two across and three up from the first end, which is what (3, 5) is, and the half-length of 3.6056 is the diagonal of that two by three step.
The three four five segment, where every number is exact
- Average the x values: (0 + 3) ÷ 2 = 1.5
- Average the y values: (0 + 4) ÷ 2 = 2
- The midpoint is (1.5, 2)
- The x difference is 3 and the y difference is 4, so the full length is √(9 + 16) = 5 and the half-length is 2.5
The three four five triangle appears all over this batch because it is the smallest right triangle whose sides are all whole numbers, and here it pays off twice: the full length is exactly 5 and the half-length is exactly 2.5, so nothing on the page is rounded. Use it as a calibration when you are unsure whether a surprising answer is a rounding artefact — on this input it cannot be. Note also the trailing zero in a different form: the x coordinate is 1.5 and prints as 1.5000, which is the four-place contract rather than a claim that the answer is known to four places.
Two ends on opposite sides of the origin
- Average the x values: (4 + (−4)) ÷ 2 = 0
- Average the y values: ((−7) + 7) ÷ 2 = 0
- The midpoint is the origin, (0, 0)
- The x difference is −8 and the y difference is 14, so the length is √(64 + 196) = √260 = 16.1245 and the half is 8.0623
A midpoint of zero is a real answer and not an empty box. The pair here is symmetric about the origin, so the origin is exactly halfway between them, and both coordinates come back as 0.0000. The same zero shows up on the page for every segment whose endpoints are reflections of each other, which is a large family rather than a curiosity. Note the sign handling in the differences: subtracting a negative coordinate adds, so the y difference is 14 even though the two y values are 7 and minus 7.
A midpoint that lands on a whole number from fractional-looking ends
- Average the x values: ((−3) + 7) ÷ 2 = 2
- Average the y values: (4 + (−2)) ÷ 2 = 1
- The midpoint is (2, 1)
- The x difference is 10 and the y difference is −6, so the length is √(100 + 36) = √136 = 11.6619 and the half is 5.831
Both differences are even here, which is why a couple of coordinates that look awkward average out to whole numbers. Ten across and six down gives a half-length of 5.831, a square root that never terminates, so this is also the case that shows the four-place cut doing its job. If you want to check the row by hand, square the printed half-length: 5.831 squared is 34.0 and 5.8309 squared is 33.999 — close enough to the 34 that the exact answer squares to, which is the best confirmation four digits can give.
Two endpoints that are the same point
- Average the x values: (2.5 + 2.5) ÷ 2 = 2.5
- Average the y values: ((−1.5) + (−1.5)) ÷ 2 = −1.5
- The midpoint is the point you started from
- Both differences are zero, so the length is 0 and the half-length is 0
A segment of zero length, which the page answers honestly: the midpoint of a point and itself is that point, and the half-length is zero. This is the only kind of input that can make the third row print 0, since a half-length of zero requires both endpoints to coincide. It is worth seeing once so that a page showing three numbers where one is zero does not read as a missing value — nothing here failed to compute.
Limitations
The page returns the midpoint of the segment you describe, and nothing else about it. It does not give you the line through the two points, so it will not tell you the slope, the intercepts or the equation of that line, and it does not give you the full length of the segment either — the third row is half of it, so double the half-length if the whole length is what you wanted. The coordinates are unitless, and no unit is attached to any output. If your points are in feet then the answers are in feet, if they are grid squares the answers are grid squares, but the page will not convert between anything and will not warn you if you mix metres with millimetres across the two endpoints. That is a real risk with a unitless page: it cannot see that (1, 2) and (5000, 8000) are probably the same segment typed in different units, and the midpoint it returns will simply be wrong by a factor. Coordinates are limited to plus or minus one billion. The limit exists for arithmetic reasons rather than mathematical ones, and the error message will tell you which field broke it, but it does mean the page is not a tool for coordinates on the scale of a continental survey or a satellite orbit expressed in metres. Finally, the half-length is rounded to four decimal places and is frequently an irrational number, so it is an approximation for most inputs; the multiplication by two at the end of a hand check will inherit that rounding, which is why a doubled half-length can differ from the full length in the last digit or two.
Frequently asked questions
- What is the midpoint formula?
- Average each coordinate separately. The midpoint x is the two x values added and halved, and the midpoint y is the two y values added and halved, which is why the answer always sits between the endpoints one axis at a time rather than anywhere else on the plane. For the endpoints (1, 2) and (5, 8) that gives 3 and 5, because 1 and 5 average to 3 while 2 and 8 average to 5. There is no second rule hiding behind the first: if you can average two numbers you can find a midpoint.
- Why does the page print a third number besides the two coordinates?
- Because two coordinates cannot be checked and a half-length can. Every point has coordinates, so a wrong midpoint is still a plausible-looking pair of numbers with nothing to give it away. The half-length is the distance from the midpoint out to either endpoint, and by definition those two distances are equal — so comparing it against half the length you measured is a check that either passes or fails on the spot. It is also frequently the number you actually wanted: the distance from the middle of something to its edge.
- Do the coordinates have units?
- No, and neither does the answer. The page treats your numbers as plain coordinates, which is deliberate: a coordinate plane has no inherent unit, and a calculator that forced you to choose centimetres or inches before you could type in a graph reading would be inventing a unit you never had. If your points came from a map in metres, read the output as metres; if they are longitude and latitude, read the half-length as degrees, which is not a distance in kilometres and cannot be converted into one without knowing where on the globe you are.
- Can the midpoint be outside the segment?
- No, and that is a useful thing to know when checking an answer. The midpoint of two numbers is their average, and an average never lies outside the range of the numbers it is built from, so the midpoint of a segment is always somewhere between its two ends — on the boundary only when both endpoints are equal. If the page returns a point that is not between your two endpoints, the inputs are wrong rather than the arithmetic. A dropped minus sign is the usual cause.
- What happens if the two endpoints are the same point?
- You get that point back and a half-length of zero, which is the correct answer rather than an error. A point and itself define a segment of no length, and the midpoint of that segment is the point itself. It is the only input that can produce a zero in the third row, since a half-length of zero requires both differences to vanish. The page will not complain, because there is nothing to complain about.
- How many decimal places does the answer have?
- Four, and the trailing zeros are printed rather than dropped, so the midpoint of (1, 2) and (5, 8) reads as 3.0000 and 5.0000. Those zeros are a statement about the display width and not about certainty: the coordinate is exactly 3, and the page prints it that way to keep a column of numbers aligned. The half-length is the one that is usually approximate, since it is a square root on most inputs, and four places is where the page stops writing it down.
- Is the midpoint the same if I swap the two endpoints?
- Yes. Addition does not care about order, so the average of 1 and 5 is the same as the average of 5 and 1, and the same holds for every other field. The one thing that does change when you swap the ends is the sign of the two differences used for the half-length — and because the differences get squared before they are added, the half-length comes out the same as well. Swap the pairs freely; nothing on the page depends on which end you called first.
References
- Midpoint — the point on a line segment equidistant from both endpoints, with the coordinate formula for it and the property that the midpoint of a diameter is the centre of a circle — Wolfram MathWorld (United States)
- Line segment — the part of a line bounded by two endpoints, and the object whose midpoint this page returns — Wolfram MathWorld (United States)
- Point — the coordinate pair this page takes in and gives back, and the reason a coordinate-plane problem carries no unit unless the axes were drawn with one — Wolfram MathWorld (United States)
- 教育部关于印发义务教育课程方案和课程标准(2022 年版)的通知——The fifth item in the annex list of this notice is the Mathematics Curriculum Standards for Compulsory Education (2022 edition); the coordinate plane and the distance between two points are part of the compulsory-education mathematics curriculum, and the wording of the standards and the grade-band breakdown are governed by that annex — 中华人民共和国教育部