Slope Calculator

Calculate the slope (gradient) of a line from two points. Also finds the angle of inclination, the y-intercept, and the full equation of the line in slope-intercept and standard form.

Slope Formula

m = (y₂ − y₁) / (x₂ − x₁) = rise / run
Line equation: y = mx + b
y-intercept: b = y₁ − m·x₁
Angle: θ = arctan(m) in degrees

Slope Interpretations

Slope ValueMeaningLine direction
m > 0Positive slopeRising left to right ↗
m < 0Negative slopeFalling left to right ↘
m = 0Zero slopeHorizontal line →
undefinedVertical lineStraight up ↑ (x₁=x₂)
m = 145° slopeEqual rise and run

Parallel & Perpendicular Lines

Parallel lines: same slope (m₁ = m₂)
Perpendicular lines: slopes are negative reciprocals (m₂ = −1/m₁)

Frequently Asked Questions

What does a slope of 2 mean?

A slope of 2 means for every 1 unit you move right (run = 1), you move 2 units up (rise = 2). As a percentage grade (used for roads), slope × 100 = 200% — extremely steep. Road grades are typically 0–8%; mountain roads up to 12%.

What is the slope of a horizontal line?

A horizontal line has slope = 0 (no rise over any run). Its equation is y = c (a constant). A vertical line has an undefined slope because the run = 0 and division by zero is undefined. Its equation is x = c.

How is slope used in real life?

Road grade (steepness), roof pitch (rise/run ratio), ramp accessibility (ADA requires ≤1:12 = 8.33%), ski trail difficulty ratings, rate of change in data (e.g., $50/month spending growth = slope 50 on a spending graph), and engineering drawings all use slope.

Related Calculators