Distance, Midpoint & Slope Calculator
Find the distance, midpoint, and slope between two coordinate points using the standard coordinate-geometry formulas.
- Distance
- 5
- Midpoint
- (2.5, 4)
- Slope
- 1.3333
How it works
Given two points (x₁, y₁) and (x₂, y₂), distance is the Pythagorean theorem applied to the horizontal and vertical gap between them: distance = √((x₂−x₁)² + (y₂−y₁)²). Midpoint is simply the average of each coordinate: ((x₁+x₂)/2, (y₁+y₂)/2). Slope is rise over run: (y₂−y₁) ÷ (x₂−x₁).
Slope is undefined when x₁ equals x₂ — the line through the two points is vertical, and a vertical line has no well-defined 'rise per unit of run,' so this calculator reports that explicitly instead of dividing by zero.
FAQ
Why do I need two different points?
A single point doesn't determine a line, so distance, midpoint, and slope aren't meaningful for two identical points — distance would be zero and slope would be 0÷0, which is undefined, not just zero.
What does a negative slope mean?
A positive slope means the line rises as x increases (left to right); a negative slope means it falls. A slope of zero means a perfectly horizontal line, and an undefined slope (shown when x₁ = x₂) means a perfectly vertical one.