Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Slope (m)
2
rise / run
Change in X (run) 3
Change in Y (rise) 6
Angle of incline 63.43°
Y-intercept (b) 0
Distance between points 6.7082
Vertical line? No

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.

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}$$

Two points on a line in the coordinate plane showing rise and run
Slope is rise over run: the vertical change divided by the horizontal change between two points.

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$$

Three lines showing positive, negative, and zero slope
Lines with positive, negative, zero and undefined slope compared on the same axes.

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.

Last updated: