Midpoint Calculator
Find the exact midpoint between two points — in 2D or 3D — plus the distance and slope connecting them. You can also solve for a missing endpoint when the other endpoint and the midpoint are known. Every step, exact fraction, decimal, and the plotted graph is included.
Choose your input
Result
Step-by-step calculation
Plot
How to use the Midpoint Calculator
- Pick the mode: 2D midpoint, 3D midpoint, or missing endpoint.
- Enter your coordinates. Decimals and negative numbers are fully supported.
- Press Calculate midpoint. You'll get the exact midpoint (with fraction form), the distance between the points, the slope of the connecting segment, and a plotted graph.
- Follow the step-by-step panel to see the formula with the numbers substituted.
Method and formula
The midpoint of two points is the point exactly halfway between them. It's found by averaging the x-coordinates and averaging the y-coordinates independently.
2D midpoint formula
M = ( (x₁ + x₂) ÷ 2 , (y₁ + y₂) ÷ 2 )
3D midpoint formula
M = ( (x₁ + x₂) ÷ 2 , (y₁ + y₂) ÷ 2 , (z₁ + z₂) ÷ 2 )
Missing endpoint formula
If one endpoint (x₁, y₁) and the midpoint (xₘ, yₘ) are known, solve for the other endpoint:
x₂ = 2·xₘ − x₁, y₂ = 2·yₘ − y₁
Bonus values: distance and slope
The distance between the two points uses the distance formula:
d = √[ (x₂ − x₁)² + (y₂ − y₁)² ]
The slope of the line through the two points is:
m = (y₂ − y₁) ÷ (x₂ − x₁) (undefined when x₁ = x₂)
Worked example: midpoint of (1, 2) and (5, 10)
- Identify the points: P₁ = (1, 2), P₂ = (5, 10).
- Average the x-coordinates: (1 + 5) ÷ 2 = 6 ÷ 2 = 3.
- Average the y-coordinates: (2 + 10) ÷ 2 = 12 ÷ 2 = 6.
- Midpoint: M = (3, 6).
- Distance: d = √[(5−1)² + (10−2)²] = √(16 + 64) = √80 ≈ 8.944.
- Slope: m = (10 − 2) ÷ (5 − 1) = 8 ÷ 4 = 2.
So the midpoint of (1, 2) and (5, 10) is (3, 6), the distance between them is about 8.944 units, and the line through them has slope 2.
How to interpret the result
- Midpoint — the point that splits the segment into two equal halves.
- Distance — the straight-line length of the segment joining the two points.
- Slope = 0 — the segment is horizontal.
- Slope undefined — the segment is vertical (x₁ = x₂).
- Fraction coordinates — when the sum of coordinates is odd, the midpoint falls on half-integer coordinates; the calculator shows the exact fraction.
Assumptions and limitations
- Coordinates are interpreted as real numbers in a standard Cartesian coordinate system.
- The two points in midpoint mode must be distinct; if they coincide, the midpoint equals them and the distance is 0.
- Slope is undefined when x₁ = x₂ (vertical segment); the calculator reports this explicitly.
- Very large or very small coordinates may lose precision beyond standard double-precision limits.
- No units are assumed; the output carries whatever units the user's inputs imply (metres, pixels, etc.).