home / Math / slope calculator

Slope Calculator

The Slope Calculator is a free online tool for the steepness of a line. From two points it gives the slope, the equation in several forms, the angle of inclination, and the slopes of parallel and perpendicular lines.

Enter two points on the line.

Related: Distance Calculator | Pythagorean Theorem Calculator | Right Triangle Calculator

Rise Over Run

Slope measures how steeply a line rises as it moves right:

m = (y₂ − y₁) / (x₂ − x₁) = rise / run

A positive slope rises left to right, a negative one falls, zero is horizontal, and a vertical line has no slope at all — the run is zero and the division is undefined, which is different from being zero.

Slope and Grade Chart

SlopeAngleGradeWhere you meet it
00%Horizontal
0.021.1°2%Drainage fall on a flat roof
0.0834.8°8.3%Maximum accessible ramp in many codes
0.15.7°10%Steep road warning sign
0.526.6°50%Steep hillside
145°100%Equal rise and run
undefined90°Vertical

Grade is slope as a percentage, not an angle. A 100% grade is 45 degrees — which is why road signs never come close to it.

Forms of a Line Equation

  • Slope-intercept: y = mx + b. The most useful form, showing slope and y-intercept directly.
  • Point-slope: y − y₁ = m(x − x₁). The natural form when you have a point and a slope.
  • Standard: Ax + By = C. Handles vertical lines, which slope-intercept cannot.

Parallel and Perpendicular

Parallel lines share a slope. Perpendicular lines have slopes whose product is −1 — each is the negative reciprocal of the other. A line with slope 2 is perpendicular to one with slope −0.5. The exception is the horizontal and vertical pair, where one slope is 0 and the other undefined.

Slope as a Rate of Change

Beyond geometry, slope is rate of change. On a distance-time graph it is speed; on a cost-quantity graph it is marginal cost; on a demand curve it is price sensitivity. In calculus, the derivative is the slope of the tangent — the instantaneous rate of change at a point.

Frequently Asked Questions

What is the difference between zero slope and undefined slope?

Zero slope is a horizontal line: y stays constant. Undefined slope is a vertical line: x stays constant and the formula divides by zero.

How do I convert slope to an angle?

The angle is arctan(m). A slope of 1 gives 45°, and 0.5 gives 26.6°. Note this is not linear — doubling the slope does not double the angle.

Does the order of the points matter?

No, as long as you are consistent. Both differences reverse sign and the ratio stays the same. Reversing only one is the usual mistake and flips the sign.