Distance, Midpoint & Slope Calculator (Two Points)

The basics of coordinate geometry in one place. Everything runs in your browser; nothing you enter is uploaded or stored.

  • Free, no sign-up
  • Runs in your browser
  • Verified

How to use it

  1. Enter the two points.
  2. Read the distance, midpoint, slope and line.

How it works

Distance = √((x₂ − x₁)² + (y₂ − y₁)²). Midpoint = ((x₁ + x₂) ÷ 2, (y₁ + y₂) ÷ 2). Slope m = (y₂ − y₁) ÷ (x₂ − x₁), and the line is y = mx + b with b = y₁ − m·x₁. A vertical line (x₁ = x₂) has an undefined slope and the equation x = x₁.

Examples

  • (1, 2) and (4, 6): distance 5, midpoint (2.5, 4), slope 4/3.

Limitations

  • Flat (Cartesian) coordinates only. For positions given as latitude and longitude, the straight-line distance on a flat plane is wrong.

Last verified . See our Accuracy & Editorial Policy. Found a problem? Email contact@tools.gift.