How it works
Slope measures how steep a line is: how much it rises (or falls) for every step to the right. Two points are enough to describe the whole line.
- Type the x and y of the first point.
- Type the x and y of the second point.
- Read the slope, the equation in y = mx + b form, the angle, the percent grade and the distance — with a small graph of your line.
The formulas
m = (y₂ − y₁) ÷ (x₂ − x₁) b = y₁ − m × x₁
Angle = arctan(m), percent grade = m × 100, and distance = √((x₂ − x₁)² + (y₂ − y₁)²).
Worked examples
Example
A rising line
Points (1, 2) and (3, 6).
m = (6 − 2) ÷ (3 − 1) = 2, b = 2 − 2 × 1 = 0, so y = 2x. Angle 63.43°, distance 4.47.
Example
A falling line
Points (0, 5) and (2, 1).
m = (1 − 5) ÷ (2 − 0) = −2, b = 5, so y = −2x + 5.
What the slope tells you
| Slope | Line | Example |
|---|---|---|
| Positive | Rises left to right | m = 2 |
| Negative | Falls left to right | m = −2 |
| Zero | Horizontal | y = 3 |
| Undefined | Vertical | x = 2 |