Midpoint Calculator
Free midpoint calculator: enter two points (x1,y1) and (x2,y2) to get the exact midpoint and segment length, with worked steps and formulas.
Midpoint Calculator
Background.
The Quanta midpoint calculator finds the exact halfway point of a line segment on the Cartesian plane — the single point that sits precisely equidistant from two given endpoints (x₁, y₁) and (x₂, y₂) — and, in the same pass, reports the straight-line length of that segment. Type in any two points, positive or negative, and the calculator returns the midpoint's x-coordinate, its y-coordinate, and the distance between the endpoints, all computed to full floating-point precision.
The midpoint is one of the oldest constructions in geometry. Euclid opens Book I of the Elements with the problem of bisecting a straight line (Proposition 10), showing with only a compass and straightedge how to find the exact centre of any segment — nearly two thousand years before coordinate geometry gave that construction its simple algebraic form, M = ((x₁+x₂)/2, (y₁+y₂)/2). The formula works because a midpoint splits each coordinate difference exactly in half: average the two x-values, average the two y-values, and the result is the point that lies on the segment and is the same distance from both ends.
Outside the classroom, the midpoint calculation shows up constantly. Surveyors use it to plant a boundary marker exactly between two established corners. GIS analysts use it to place a label between two mapped features, or to find a natural meeting point between two addresses on a coordinate grid. Structural engineers use the midpoint of a beam span to locate the point of maximum bending moment under a uniformly distributed load. Network engineers use it to size a fibre-splice enclosure exactly halfway along a cable run between two cabinets. Game and graphics programmers use it to subdivide a line for smoother curves, find the pivot point between two vertices, or interpolate a camera position exactly between two waypoints. Sports-field marking, furniture placement, and simple DIY tasks like centring a picture between two nails all reduce to the same two-line calculation.
A midpoint calculator differs from a general distance-formula tool in emphasis rather than mathematics: both share the same underlying coordinate geometry, but this page is built around the specific, common question "what is exactly halfway between these two points" rather than "how far apart are they." If you already know your primary need is the straight-line distance, Quanta's dedicated distance formula calculator returns the same midpoint as a secondary output alongside distance, slope, and bearing angle — use whichever tool matches the number you need first.
Negative coordinates are completely normal input here and are never rejected: a point at (−3, −7) is exactly as valid as a point at (3, 7), and the midpoint formula handles negative numbers exactly the same way it handles positive ones. The only inputs this calculator refuses are non-finite values, because the midpoint of an undefined point is itself undefined. Below the calculator you will find the classical derivation from Euclid's bisection proposition, a fully worked example using two points six units apart horizontally and eight vertically, and answers to the questions people ask most often about finding the middle of a segment.
What is midpoint calculator?
The midpoint of a line segment is the unique point that lies exactly halfway between its two endpoints — equidistant from both, and lying directly on the segment itself. Given two points P₁ = (x₁, y₁) and P₂ = (x₂, y₂) in the Cartesian plane, the midpoint M has coordinates M = ((x₁ + x₂)/2, (y₁ + y₂)/2): the arithmetic mean of the two x-coordinates, paired with the arithmetic mean of the two y-coordinates. This works because each coordinate axis can be treated independently — the x-coordinate of the midpoint depends only on x₁ and x₂, and the y-coordinate depends only on y₁ and y₂.
The segment length is a separate but related quantity: the straight-line (Euclidean) distance between the two endpoints, computed by the distance formula d = √((x₂−x₁)² + (y₂−y₁)²), itself a direct application of the Pythagorean theorem to the right triangle formed by the horizontal and vertical differences between the points. The midpoint always lies at distance d/2 from each endpoint — exactly half the segment length — which is a useful sanity check: the distance from the computed midpoint back to either original point should equal precisely half of the reported segment length.
Midpoints generalise cleanly. In three dimensions the same coordinate-averaging rule applies with a z-term added; for more than two points, the analogous idea is the centroid — the average of all the points' coordinates — which reduces to the two-point midpoint formula when there are exactly two points.
How to use this calculator.
- Enter the coordinates of the first point in the x₁ and y₁ fields. Any real number works, including negative values and decimals.
- Enter the coordinates of the second point in the x₂ and y₂ fields. The order of the two points does not matter — swapping P₁ and P₂ returns the same midpoint and the same segment length.
- Read the two midpoint outputs together — midpoint x and midpoint y — as a pair. That pair is the single point exactly halfway between your two inputs.
- Check the segment length output if you also need to know how far apart the two original points are; it is computed independently using the standard distance formula.
- Use the midpoint for centring, bisecting, or finding a fair meeting point between two locations, vertices, or boundary markers. Use the segment length for fencing, framing, cable-run, or material-length questions.
- If your two points are identical, the midpoint equals that point and the segment length is zero — a valid, correctly handled case, not an error.
The formula.
The midpoint formula follows directly from averaging each coordinate independently. Picture the segment from P₁ = (x₁, y₁) to P₂ = (x₂, y₂) projected onto the x-axis: the projection runs from x₁ to x₂, and its own midpoint is the arithmetic mean (x₁+x₂)/2 — a one-dimensional bisection, exactly the construction Euclid gives in Book I, Proposition 10 of the Elements, translated into algebra. The same argument applied to the y-axis projection gives (y₁+y₂)/2. Because horizontal and vertical position are independent coordinates in the plane, combining the two per-axis midpoints gives the midpoint of the full two-dimensional segment: M = ((x₁+x₂)/2, (y₁+y₂)/2).
A short proof that M is correct: the vector from P₁ to M is (Mx − x₁, My − y₁) = ((x₂−x₁)/2, (y₂−y₁)/2), and the vector from M to P₂ is (x₂ − Mx, y₂ − My) = ((x₂−x₁)/2, (y₂−y₁)/2) — identical. Since the two vectors are equal, M lies exactly on the segment P₁P₂, not merely somewhere collinear with it, and is exactly halfway along it, because both half-vectors have exactly the same length and direction.
The segment length is computed separately using the distance formula, itself the Pythagorean theorem written in coordinates: form the right triangle whose legs are the horizontal gap |x₂−x₁| and the vertical gap |y₂−y₁|, and whose hypotenuse is the segment itself. The length is therefore d = √((x₂−x₁)² + (y₂−y₁)²). A useful cross-check ties the two formulas together: the distance from the computed midpoint back to either endpoint always equals exactly d/2, because M splits the segment into two congruent halves by construction. The calculator performs both computations independently and to full precision, so this identity holds to the limits of floating-point arithmetic for every input pair, including pairs with negative or fractional coordinates.
A worked example.
Take the two points P₁ = (−1, −2) and P₂ = (5, 6) — deliberately chosen with a negative-coordinate endpoint to show the formula works identically regardless of sign. The midpoint's x-coordinate is (−1 + 5) / 2 = 4 / 2 = 2, and its y-coordinate is (−2 + 6) / 2 = 4 / 2 = 2, so the midpoint is M = (2, 2). The segment length uses the distance formula: Δx = 5 − (−1) = 6, Δy = 6 − (−2) = 8, so length = √(6² + 8²) = √(36 + 64) = √100 = 10 — the familiar 6-8-10 Pythagorean triple, twice the 3-4-5 triangle. As a check, the distance from the midpoint (2, 2) back to P₁ is √((2−(−1))² + (2−(−2))²) = √(3² + 4²) = √25 = 5, exactly half of 10, confirming the midpoint sits precisely in the centre of the segment. If these coordinates represented positions in metres on a site plan, the midpoint (2, 2) is exactly where you would place a marker to split a 10-metre boundary run into two equal 5-metre halves.
Frequently asked questions.
What is the formula for finding the midpoint of a line segment?
Can the midpoint formula be used with negative coordinates?
How is the midpoint different from the centroid?
Does the order of the two points matter?
What if both points are the same?
How do I find the midpoint in three dimensions?
What is the midpoint used for in real life?
References& sources.
- [1]Euclid, Elements, Book I, Proposition 10 — to bisect a given finite straight line, the classical construction underlying the midpoint formula (David E. Joyce edition, Clark University).
- [2]Euclid, Elements, Book I, Proposition 47 — the Pythagorean theorem, the basis of the distance formula used to compute segment length.
- [3]NIST Digital Library of Mathematical Functions, §1.7 — analytic geometry definitions including Cartesian coordinates and the Euclidean distance metric.
- [4]Coxeter, H. S. M. Introduction to Geometry, 2nd edition. Wiley, 1969 — classic reference geometry textbook covering Cartesian coordinates, the midpoint, and the distance formula.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 313 calculators remain free
- No billing is enabled