Enter two points and the calculator returns the slope, the y-intercept, the equation of the line, and the distance between the points, with each step shown.
Point 1 is (x1, y1); point 2 is (x2, y2).
Slope tracks how steep a line runs: the change in y for every unit of change in x, a ratio most people learn as rise over run. Two points are all the algebra needs to pin it down.
Once the slope is known, the rest of the line follows from it. The y-intercept comes from b = y₁ - m x₁, which then plugs into slope-intercept form, y = mx + b. The straight-line distance between the same two points uses the distance formula, which is really the Pythagorean theorem measured on a coordinate grid instead of a triangle.
The most frequent slip is mixing up which point is "first" partway through the subtraction, so the x and y values no longer line up the same way in the numerator and denominator. A close second: treating a vertical line as having zero slope. A vertical line, where x₁ equals x₂, has an undefined slope because the run is zero and division by zero has no answer. Zero slope belongs only to a flat, horizontal line. If your answer comes out with the wrong sign, redo the subtraction in a consistent order rather than guessing which term to flip.
For a deeper look at the algebra behind lines, see Wolfram MathWorld's entry on the line.
Need the roots of a quadratic next, or want to check a square root by hand?
Slope m = (y2 - y1) / (x2 - x1). It is the change in y divided by the change in x between two points on the line.
Once you have the slope m, use b = y1 - m times x1. The intercept b is where the line crosses the y-axis.
A slope of zero is a flat, horizontal line. An undefined slope, where x1 equals x2, is a vertical line.
With the distance formula, sqrt((x2 - x1)^2 + (y2 - y1)^2), which comes straight from the Pythagorean theorem.