Slope Calculator
Enter two points. You get the slope as an exact fraction and a decimal, the y-intercept, and the finished equation, with the rise-over-run substitution written out line by line.
Two Points In
Decimals and negatives are fine. Fractions come back exact, so 0.5 turns into a clean 1/2.
The Slope Formula from Two Points
Slope measures steepness: how much a line rises for every step it runs. The formula is m = (y₂ − y₁) / (x₂ − x₁). Subtract the y-values for the rise, subtract the x-values in the same order for the run, then divide.
A worked example
Take (1, 2) and (3, 6). Rise: 6 − 2 = 4. Run: 3 − 1 = 2. Slope: 4/2 = 2. Plug either point into y = mx + b to find b: 2 = 2(1) + b, so b = 0 and the line is y = 2x. The calculator runs that same substitution with your points, and keeps everything as exact fractions so decimal inputs like 0.5 and 1.25 come out as clean halves and quarters instead of rounded approximations.
Reading the slope you get
| Slope | What the line does |
|---|---|
| m > 0 | Rises from left to right |
| m < 0 | Falls from left to right |
| m = 0 | Horizontal line, written y = b |
| Undefined | Vertical line, written x = k |
The undefined case trips people up. When both points share an x-value, the run is 0, and dividing by zero has no answer. That gives a vertical line, written x = k. It is not the same as slope 0, which is a flat, horizontal line.
Order of subtraction
It doesn't matter which point you call point 1, as long as you subtract in the same order on top and bottom. Swap both, and the two sign flips cancel out.
Slope shows up constantly in the same units as factoring on this site: if your homework mixes the two, the factoring calculator shows its work the same way.