What is the Slope Calculator?
The Slope Calculator finds the steepness of the line that connects two points on a coordinate plane. Slope, written as m, measures how much the line rises (or falls) vertically for each unit it moves horizontally. This tool also reports the change in x (run), change in y (rise), the angle of incline, the y-intercept of the line, and the straight-line distance between your two points.
Which slope tool do you need?
- Slope calculator (this page): slope, angle, distance and line equation between two points.
- Point-slope calculator: the slope m from two points, ready for the point-slope form y − y₁ = m(x − x₁).
- Slope-intercept calculator: the slope m and y-intercept b of the line y = mx + b through two points.
- Slope percentage calculator: the percent grade from rise and run (rise ÷ run × 100).
- Slope to degrees: the angle of a slope in degrees and radians.
- Degrees to slope percent: the percent grade of an angle given in degrees.
How to use it
Enter the coordinates of the first point (X1, Y1) and the second point (X2, Y2), then read the results. If the two x-values are equal the line is vertical and the slope is undefined — the calculator flags this for you.
The formula explained
Slope is defined as rise over run: $$m = \frac{y_2 - y_1}{x_2 - x_1}$$ The numerator \(y_2 - y_1\) is the vertical change and the denominator \(x_2 - x_1\) is the horizontal change. Once the slope is known, the y-intercept is found with $$b = y_1 - m \cdot x_1$$ and the distance between points uses the Pythagorean theorem: $$d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$$
Worked example
For the points (1, 2) and (4, 8): the run is \(4 - 1 = 3\), the rise is \(8 - 2 = 6\), so $$m = \frac{6}{3} = 2$$ The y-intercept is \(b = 2 - 2 \cdot 1 = 0\), and the distance is $$d = \sqrt{3^2 + 6^2} = \sqrt{45} \approx 6.708$$
FAQ
What does a negative slope mean? A negative slope means the line falls from left to right — as x increases, y decreases.
Why is a vertical line's slope undefined? Because \(x_2 - x_1 = 0\), and division by zero is undefined.
What is a slope of zero? A slope of zero is a perfectly horizontal line, where y stays constant.