Midpoint Calculator

Calculate the midpoint, distance, and slope between two points in a coordinate plane.

Enter Coordinates

Worked example: (2, 3) and (8, 11)

Enter Point 1 as (2, 3) and Point 2 as (8, 11). The calculator returns three separate results from the same two points:

Midpoint: M = ((x₁+x₂)/2, (y₁+y₂)/2) = ((2+8)/2, (3+11)/2) = (5, 7)

Distance: d = √[(x₂−x₁)² + (y₂−y₁)²] = √[(8−2)² + (11−3)²] = √[36 + 64] = √100 = 10

Slope: m = (y₂−y₁)/(x₂−x₁) = (11−3)/(8−2) = 8/6 ≈ 1.3333

These three formulas share the same two input points but answer different questions: the midpoint is a location exactly between them, the distance is a single scalar length (here, conveniently, a whole number thanks to the 6-8-10 right triangle formed by the coordinate differences), and the slope describes the line's steepness independent of how far apart the points are.

Vertical lines are a special case

If x₁ equals x₂ (say, both points have x = 4), the slope formula divides by zero. Rather than crashing, the tool detects this and reports the slope as "undefined (vertical line)" instead of a number — a true vertical line has no defined slope in standard algebra.

What the graph shows

Below the results, a canvas plots both input points along with the calculated midpoint on a scaled coordinate grid, with a dashed line connecting the two original points — useful for visually sanity-checking that the midpoint actually falls on the segment between them.