Skip to content
Toolcroft

Math Calculators

Midpoint & Distance Calculator - Two-Point Formula

Find the midpoint, distance, and slope between two points (x₁,y₁) and (x₂,y₂) instantly with step-by-step solutions.

Point A

Point B

Results

Midpoint(1.5, 2)
Distance5
Slope1.33333333
Step-by-step solution
  1. Point A = (0, 0), Point B = (3, 4)
  2. Midpoint M = ((x₁+x₂)/2, (y₁+y₂)/2) = ((0+3)/2, (0+4)/2) = (1.5, 2)
  3. Distance d = √((x₂−x₁)² + (y₂−y₁)²) = √(9 + 16) = 5
  4. Slope m = (y₂−y₁)/(x₂−x₁) = 4/3 = 1.33333333

Formulas used

  • Midpoint: M = ((x₁+x₂)/2, (y₁+y₂)/2)
  • Distance: d = √((x₂−x₁)² + (y₂−y₁)²)
  • Slope: m = (y₂−y₁) / (x₂−x₁)

Examples

  • Points (0,0) and (3,4): distance = 5, midpoint = (1.5, 2), slope = 4/3
  • Points (−3,−4) and (3,4): distance = 10, midpoint = (0, 0), slope = 4/3

Notes

Slope is undefined when the two points share the same x-coordinate (vertical line). All inputs accept negative values and decimals.

Geometric interpretations

  • Center of a segment: the midpoint is equidistant from both endpoints and represents the geometric center of the line segment. It bisects the segment into two equal halves.
  • GPS midpoint: finding a meeting point equidistant between two locations uses a spherical version of the midpoint formula (accounting for Earth's curvature), but for short distances the flat-plane formula is a good approximation.

3D midpoint

The midpoint formula extends naturally to three dimensions. For points (x₁, y₁, z₁) and (x₂, y₂, z₂), the midpoint M is:

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

This is used in 3D graphics (finding the center of an edge), physics simulations, and geographic coordinate calculations.

Section formula (m:n ratio)

The midpoint is a special case of the section formula where the ratio is 1:1. For a point dividing a segment from (x₁, y₁) to (x₂, y₂) in ratio m:n:

P = ((m·x₂ + n·x₁) / (m+n),  (m·y₂ + n·y₁) / (m+n))

When m = n = 1, this simplifies to the standard midpoint formula.