What is slope?
The slope of a line measures how steep it is: how much it rises or falls for each unit you move to the right. It is usually written m and defined as the change in y divided by the change in x, often summarized as "rise over run".
- A positive slope climbs from left to right.
- A negative slope falls from left to right.
- A slope of zero is a horizontal line.
- A vertical line has an undefined slope, because ΔX is zero.
If the two points are known
From two points the calculator finds everything about the line through them. Besides the slope, it reports:
- Angle of incline θ, the direction from the first point to the second measured counterclockwise from the positive x-axis: θ = arctan(ΔY / ΔX), adjusted to the correct quadrant.
- Distance between the points: d = √(ΔX² + ΔY²), which is the Pythagorean theorem.
- Equation of the line in slope-intercept form, y = mx + b, where b = Y₁ − m · X₁ is the y-intercept. When the inputs are exact decimals, the equation is also shown with reduced fractions.
- Intercepts: the y-intercept is b and the x-intercept is −b / m.
Worked example
For the points (3.5, −2) and (−7, 9.25): ΔX = −10.5 and ΔY = 11.25, so m = 11.25 / −10.5 = −15/14 ≈ −1.0714285714286. The intercept is b = −2 − (−15/14)(3.5) = 1.75, giving y = −15/14 x + 7/4. The distance is √(110.25 + 126.5625) = √236.8125 ≈ 15.388713396512, and because the second point is up and to the left of the first, θ ≈ 133.02506598912°.
If one point and the slope are known
Knowing a point, a slope and a distance pins down two possible second points, one in each direction along the line. With θ the angle of the line:
For example, from (3.5, −2) with slope 0.75 and distance 8, the direction has cos θ = 0.8 and sin θ = 0.6, so the two answers are (9.9, 2.8) and (−2.9, −6.8). You can enter the angle of incline in degrees instead of the slope; the two are linked by m = tan θ.
Slope, grade and angle
Slope is closely related to the percent grade used for roads and ramps: grade = slope × 100%. A 5% grade has a slope of 0.05 and an angle of about 2.86°. A 45° angle is a slope of 1, or a 100% grade.
| Angle θ | Slope m | Grade |
|---|---|---|
| 5° | 0.0875 | 8.75% |
| 10° | 0.1763 | 17.63% |
| 30° | 0.5774 | 57.74% |
| 45° | 1 | 100% |
| 60° | 1.7321 | 173.21% |
Parallel and perpendicular lines
Parallel lines have equal slopes. Perpendicular lines have slopes that multiply to −1, so a line perpendicular to one with slope 2 has slope −1/2. These facts make slope a quick test for right angles and parallel sides in coordinate geometry.
Point-slope form
Another way to write a line is point-slope form, y − y₁ = m(x − x₁). It is handy when you know one point and the slope, and it converts to slope-intercept form by expanding and solving for y. For the point (3.5, −2) and slope 0.75, it becomes y + 2 = 0.75(x − 3.5), which simplifies to y = 0.75x − 4.625.
Reading the angle θ
The angle reported here is the direction from the first point toward the second, measured counterclockwise from the positive x-axis, so it ranges from 0° up to 360°. A line has two directions, which is why the one-point mode lists two answers whose angles differ by exactly 180°.