How do you calculate slope from two points?
Subtract the y coordinates to find the rise, subtract the x coordinates in the same order to find the run, then divide: m = (y₂ − y₁) / (x₂ − x₁).
FREE MATH TOOL
A slope calculator finds the steepness of a line from two points or rise over run. Enter your values to see the exact simplified slope, step-by-step working, a line equation, and a printable coordinate diagram.
−10000 to 10000; up to 3 decimal places. Results update as you type.
Line equation
y = (3/2)x + 1/2
Positive slope: y increases as x increases.
Choose two points and enter x₁, y₁, x₂, y₂, or choose rise over run and enter the two changes.
Read the coordinate differences and the simplified slope fraction, or the explanation for an undefined slope.
For two points, review y = mx + b and the labeled coordinate diagram. Print the working for class or practice.
The slope-intercept form is y = mx + b, where m is slope and b is the y-intercept. Keep the point order consistent in both subtractions. Swapping both points leaves the slope unchanged.
Subtract the y coordinates to find the rise, subtract the x coordinates in the same order to find the run, then divide: m = (y₂ − y₁) / (x₂ − x₁).
A vertical line has an undefined slope because its run is zero. Its equation is x = a constant. Undefined slope does not mean a slope of zero.
A slope of zero means the line is horizontal. The y coordinates are equal, so the rise is zero and the equation is y = a constant.
No. Identical points produce 0/0, which is indeterminate. Infinitely many lines pass through one point, so you need a different second point.
Yes. Enter coordinates from −10000 to 10000 with up to three decimal places. The calculator reduces slope and intercept to exact fractions, including for decimal inputs.
Turn math ideas into games and apps. Build with Zap Code →