Slope Calculator

ALGEBRA
runriseslope m = 2 rise 6 run 3
Slope (m)
Angle of incline
y-intercept (b)
Line equation
Distance between points

Slope from two points

Slope measures how steep a line is — the rise over the run between any two points on it. Enter two points and this calculator returns the slope, the angle of incline, the y-intercept, the full line equation, and the distance between the points.

The formula

For points (x₁, y₁) and (x₂, y₂), the slope is m = (y₂ – y₁) / (x₂ – x₁) — the change in y divided by the change in x. The angle the line makes with the horizontal is the arctangent of the slope. Once you have m, the intercept is b = y₁ – m x₁, giving the line y = m x + b.

Special cases

A horizontal line has slope zero. A vertical line has an undefined slope, because the run is zero and you cannot divide by it — the calculator flags this and reports the line as x = constant.

Related algebra tools

For the point halfway between the two, use the midpoint calculator; for the straight-line distance alone, the distance formula calculator.

Worked example

Through (1, 2) and (4, 8): the rise is 6 and the run is 3, so m = 2. The intercept is b = 2 – 2(1) = 0, the line is y = 2x, and the incline is about 63.4 degrees.

FAQ

Does point order matter?

No — swapping the two points negates both the rise and the run, so the slope is unchanged. Just keep x and y paired correctly for each point.

What is a negative slope?

It means the line falls from left to right; y decreases as x increases. The steeper the negative value, the sharper the descent.

Related reference chart: Coordinate Plane Reference
Spotted an error or have a suggestion for this calculator? Let us know →
Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.