Distance and Midpoint Formula

Two formulas, one calculator, side-by-side comparison

Reviewed by [email protected], Geometry Calculator Developer & Online Math Educator Last updated May 8, 2026

The distance and midpoint formulas are two of the most-used results in coordinate geometry. They take two points and give you (a) how far apart they are, and (b) the exact center of the segment connecting them.

The Formulas

Name Formula Notes
Distance d = √((x₂−x₁)² + (y₂−y₁)²) Length of the segment from (x₁,y₁) to (x₂,y₂).
Midpoint M = ((x₁+x₂)/2, (y₁+y₂)/2) Coordinates of the exact center.
3D Distance d = √((x₂−x₁)² + (y₂−y₁)² + (z₂−z₁)²) Same idea, z-axis included.
3D Midpoint M = ((x₁+x₂)/2, (y₁+y₂)/2, (z₁+z₂)/2) Average of each coordinate.

Worked Examples

Example 1: Points A(2, 3) and B(8, 11)

  1. Distance: d = √((8−2)² + (11−3)²) = √(36 + 64) = √100 = 10
  2. Midpoint: M = ((2+8)/2, (3+11)/2) = (5, 7)

Example 2: 3D points P(1, 2, 3) and Q(4, 6, 8)

  1. Distance: d = √((4−1)² + (6−2)² + (8−3)²) = √(9 + 16 + 25) = √50 ≈ 7.07
  2. Midpoint: M = (2.5, 4, 5.5)

Skip the manual calculation

Plug in your numbers and get instant step-by-step results.

Use Distance/Midpoint Calculator See All Geometry Formulas