onlinecalculator.me

Free online midpoint calculator

The midpoint between two points is the exact middle of the line segment connecting them. This calculator also gives the distance, slope, and equation of the line through the two.

About this calculator

How to use

  1. Enter coordinates for the first point (x₁, y₁).
  2. Enter coordinates for the second point (x₂, y₂).
  3. Midpoint, distance, slope, and line equation appear instantly.
  4. Click “Share with my numbers” to copy a URL with your values.

Formulas

Midpoint M = ((x₁+x₂)/2, (y₁+y₂)/2)

Distance d = √((x₂−x₁)² + (y₂−y₁)²)

Slope m = (y₂−y₁) / (x₂−x₁)   (undefined when x₁ = x₂)

Line equation: y = mx + b
  where b = y₁ − m·x₁

Worked example

Points: (0, 0) and (4, 6)

  1. Midpoint = ((0+4)/2, (0+6)/2) = (2, 3)
  2. Distance = √(4² + 6²) = √52 ≈ 7.2111
  3. Slope = 6/4 = 1.5
  4. Line equation: y = 1.5x (b = 0)

Notes

  • Vertical lines (x₁ = x₂) show the equation as x = constant and slope as “undefined.”
  • Horizontal lines (y₁ = y₂) have slope 0.
  • Results are rounded to 8 significant figures.
What is the midpoint formula?
The midpoint of (x₁, y₁) and (x₂, y₂) is ((x₁+x₂)/2, (y₁+y₂)/2).
How is distance calculated?
Distance = √((x₂−x₁)² + (y₂−y₁)²). This is the Euclidean distance (straight-line length) between the two points.
What does slope undefined mean?
When the two points share the same x-coordinate the line is vertical. Vertical lines have an undefined slope and the equation is written as x = constant.
How is the line equation found?
The calculator uses point-slope form: y − y₁ = m(x − x₁), then rearranges to slope-intercept form y = mx + b.
Can I use negative coordinates?
Yes. Any real numbers are accepted for all four coordinate inputs.