Midpoint Calculator
Enter the coordinates of two points. Fractions like 3/4 or 1 1/2 and decimals both work. The midpoint, distance and slope update as you type.
Two points
Use whole numbers, decimals (−2.5), fractions (3/4) or mixed numbers (1 1/2).
Midpoint, step by step
Distance
Slope and line
How to use the midpoint calculator
Enter the x and y coordinates of the two points. Switch to 3D to add z coordinates. The calculator finds the point exactly halfway between them, the straight-line distance between the points, and in 2D the slope and the equation of the line through them. Fractions stay exact: the midpoint of (0, 0) and (1/3, 1/3) is (1/6, 1/6), not 0.1667.
Midpoint, distance and slope formulas
Midpoint: M = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). Average the x values and average the y values (and the z values in 3D).
Distance: d = √((x₂ − x₁)² + (y₂ − y₁)²), which is the Pythagorean theorem applied to the horizontal and vertical gaps. In 3D add (z₂ − z₁)² under the root.
Slope: m = (y₂ − y₁) ÷ (x₂ − x₁), the rise over the run. The line is then y = mx + b with b = y₁ − m·x₁.
Worked example
Find the midpoint of (2, 3) and (8, 7). M = ((2 + 8) ÷ 2, (3 + 7) ÷ 2) = (10 ÷ 2, 10 ÷ 2) = (5, 5). The distance is √(6² + 4²) = √52 = 2√13 ≈ 7.21. The slope is 4 ÷ 6 = 2/3, so the line through the points is y = (2/3)x + 5/3.
FAQ
How do I find an endpoint if I know the midpoint?
Double the midpoint and subtract the known endpoint: x₂ = 2·Mx − x₁ and y₂ = 2·My − y₁. If M = (5, 5) and one end is (2, 3), the other end is (10 − 2, 10 − 3) = (8, 7).
What does an undefined slope mean?
When both points have the same x coordinate the run is 0, and you can't divide by 0. The line is vertical, written x = a number. A slope of 0 means a horizontal line, y = a number.
Does the order of the points matter?
No. Swapping the points gives the same midpoint, distance and slope, because the differences in the slope formula both change sign and cancel.
Is my data stored or sent anywhere?
No. CalculatorFly does every calculation in your browser with WebAssembly, using exact fraction arithmetic. Nothing is uploaded.