Audited 27 Jul 2026·Last updated 27 Jul 2026·4 citations·Tier 2·0 uses

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

The horizontal coordinate of the first point. Negative, positive, decimal, or zero — all are valid.
The vertical coordinate of the first point. Make sure x₁ and y₁ use the same unit as x₂ and y₂.
The horizontal coordinate of the second point. The order of the two points does not change the midpoint.
The vertical coordinate of the second point. The calculator returns the midpoint and the segment length in one pass.
Midpoint x
2
The x-coordinate of the midpoint, equal to (x₁ + x₂) ÷ 2 — the average of the two x-values.
Midpoint y
2
Segment length
10

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.

  1. Enter the coordinates of the first point in the x₁ and y₁ fields. Any real number works, including negative values and decimals.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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.

M = ( (x₁+x₂)⁄2 , (y₁+y₂)⁄2 )

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.

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.

y1-2
x1-1
y26
x25

Frequently asked questions.

What is the formula for finding the midpoint of a line segment?
Given two endpoints (x₁, y₁) and (x₂, y₂), the midpoint is M = ((x₁+x₂)/2, (y₁+y₂)/2) — average the two x-coordinates for the midpoint's x-value, and average the two y-coordinates for its y-value. This works in any quadrant, with any mix of positive, negative, whole, or decimal coordinates, because averaging is defined identically for all real numbers.
Can the midpoint formula be used with negative coordinates?
Yes, without any modification. If P₁ = (−4, 6) and P₂ = (2, −8), the midpoint is ((−4+2)/2, (6+(−8))/2) = (−1, −1). Negative numbers add and average exactly like positive numbers; there is nothing special about the arithmetic when one or both coordinates are negative. Some calculators mistakenly reject negative inputs — this one does not, because negative coordinates simply describe points left of the y-axis or below the x-axis, and they are just as legitimate as any other point in the plane.
How is the midpoint different from the centroid?
The midpoint applies to exactly two points and is their coordinate-wise average. The centroid generalises the same idea to three or more points — it is the average of all the x-coordinates and the average of all the y-coordinates across the whole set. For a triangle, the centroid is the average of its three vertices, not the midpoint of any one side. When you have exactly two points, midpoint and centroid give the same answer, since averaging two numbers is the same calculation either way.
Does the order of the two points matter?
No. Swapping P₁ and P₂ leaves the midpoint unchanged, because addition is commutative — (x₁+x₂)/2 equals (x₂+x₁)/2, and the same holds for y. The segment length is also unaffected by order, since it depends on the squared difference between the coordinates, and squaring removes the sign. Order only matters for calculators that also report a directional bearing or slope, which this calculator does not — for that, use the distance formula calculator.
What if both points are the same?
Then the segment has zero length, and the midpoint is simply that same point. This is a valid, well-defined case rather than an error: a single point can be thought of as a segment of length zero, and its own midpoint is trivially itself. The calculator returns a segment length of 0 rather than rejecting the input.
How do I find the midpoint in three dimensions?
Add a z-coordinate and average it the same way: for P₁ = (x₁,y₁,z₁) and P₂ = (x₂,y₂,z₂), the 3D midpoint is ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2). The two-dimensional formula this calculator uses is the same coordinate-averaging idea restricted to a flat plane; it extends to any number of dimensions without any change in logic.
What is the midpoint used for in real life?
Common uses include bisecting a property boundary for a survey marker, placing a label exactly between two points on a map, finding the centre of a beam span in structural engineering, splicing a cable exactly halfway along a run, centring furniture or artwork between two fixed points, and computing a fair meeting point between two addresses on a coordinate grid. Anywhere the question is "what point is exactly in between these two," the midpoint formula is the tool.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon