Geometry

Distance Formula Calculator

Find the distance, midpoint, and slope between two points with the distance formula and step-by-step work.

Find distance between two points

Answer
d = 5
  1. Midpoint M = ((x1 + x2)/2, (y1 + y2)/2) = (2.5, 4)
  2. Slope m = (y2 - y1)/(x2 - x1) = 1.333333333

How to use the distance formula calculator

The distance formula is the Pythagorean theorem applied to two points on the coordinate plane. This page also reports the midpoint and slope so you get the full two-point toolkit at once.

  1. Enter two coordinate points.
  2. Subtract x-values and y-values.
  3. Square and add the differences, then take the square root for distance.
  4. Average the coordinates for the midpoint and divide rise by run for the slope.

Formula or method

d = sqrt((x2 - x1)^2 + (y2 - y1)^2); midpoint M = ((x1 + x2)/2, (y1 + y2)/2); slope m = (y2 - y1)/(x2 - x1).

Worked examples

Distance between points

Problem: (1, 2) and (4, 6)

Solution: d = sqrt(3^2 + 4^2) = 5.

Midpoint and slope

Problem: (1, 2) and (4, 6)

Solution: M = (2.5, 4); slope m = 4/3 ≈ 1.33.