Slope & Distance Calculator
Calculate the slope, distance, and midpoint between two points on a coordinate plane.
Three related two-point calculations in one: slope (rise over run, the steepness of the line between them), the straight-line distance via the distance formula (a direct application of the Pythagorean theorem), and the midpoint — the standard trio covered in an algebra or geometry unit on coordinate planes.
Example: The points (1, 2) and (7, 10) are a distance of exactly 10 apart, have a midpoint at (4, 6), and a slope of 8/6 = 1.333... — a vertical pair of points like (5, 2) and (5, 10) instead returns an undefined slope, since a vertical line has no defined rise-over-run.
How it works
- Enter the coordinates of two points, (x1, y1) and (x2, y2)
- Press Calculate
- Slope, distance, and midpoint appear instantly, computed on your device
Frequently asked questions
How is slope calculated between two points?
Slope is rise over run: (y2 − y1) / (x2 − x1) — how much y changes for every unit x changes. A slope of 2 means the line rises 2 units for every 1 unit it moves right.
What does an undefined slope mean?
It means the line is perfectly vertical — both points share the same x-coordinate, which would require dividing by zero (a run of 0) in the slope formula. Vertical lines are described by their x-value instead of a slope.
Is my numbers uploaded anywhere?
No — Slope & Distance Calculator runs entirely in your browser using JavaScript/WebAssembly. Your numbers is never sent to a server.