Slope is rise over run: how far the line goes up for each step to the right. Drag two points to see the slope, the y-intercept and the equation of the line.
Answer
Slope m
3
Liney = 3x − 1
y-intercept−1
Angle71.57°
Drag P or Q (they snap to halves), or focus one and use the arrow keys.
Why this answer
Rise. y₂ − y₁ = 8 − 2 = 6.
Run. x₂ − x₁ = 3 − 1 = 2.
Rise ÷ run. m = 6 ÷ 2 = 3. Positive: the line goes up to the right.
Find b. Put P into y = mx + b: 2 = 3 × 1 + b, so b = 2 − 3 = −1.
The line.y = 3x − 1. Check with Q: 3 × 3 + −1 = 8 ✓
Put it to use
Slope in real life
Ramps: ADA ramps max out at 1:12, a slope of 1/12 ≈ 0.083.
Roofs: a “6/12 pitch” rises 6 in for every 12 in across, slope 0.5.
The slope calculator finds how steep a line is from two points, P(x₁, y₁) and Q(x₂, y₂). Slope is rise over run: how far the line goes up or down for each step to the right.
It subtracts the y-values to get the rise and the x-values to get the run, then divides. It also finds the y-intercept b by putting P into y = mx + b, and writes the full equation of the line. A check with Q confirms the equation.
If both points have the same x-value, the run is zero. You can't divide by zero, so the page reports the slope as undefined and gives the vertical line's equation, x = constant.
m = (y₂ − y₁) ÷ (x₂ − x₁) = rise ÷ runb = y₁ − m × x₁Line: y = mx + bVertical line (x₁ = x₂): slope undefined, equation x = x₁
Worked example: Slope through P(−1, 4) and Q(3, −2)
Rise: y₂ − y₁ = −2 − 4 = −6.
Run: x₂ − x₁ = 3 − (−1) = 4.
Slope: m = −6 ÷ 4 = −1.5. It is negative, so the line goes down to the right.
Intercept: 4 = −1.5 × (−1) + b, so b = 4 − 1.5 = 2.5.