Slope Calculator
- Updated
- Formula shown
- Free, no sign-up
Results
Slope 1.333333 (4/3), angle 53.1301°, line y = (4/3)x + 2/3
How to use the slope calculator
- Choose what you know: two points, a point and a slope, or a point and an angle.
- Enter the coordinates. Negative values and decimals are fine; whole numbers and short decimals also give exact fractions.
- With a point and a slope or angle, you can add a distance to find the points that far along the line in each direction.
Slope formulas
θ = arctan(m) · grade = m × 100%
Slope-intercept form: y = mx + b, with b = y₁ − m·x₁
Point-slope form: y − y₁ = m(x − x₁) · Standard form: Ax + By = C
Slope measures steepness: how far the line rises for each unit it runs to the right. A positive slope climbs from left to right, a negative slope falls, a slope of zero is a horizontal line and a vertical line has an undefined slope because its run is zero. The angle of inclination θ is the angle between the line and the positive x-axis, found with the inverse tangent. Engineers and road builders often quote the grade instead, the slope as a percentage. The y-intercept b is where the line crosses the y-axis, and it completes the familiar equation y = mx + b.
Worked example
For the points (1, 2) and (4, 6), the rise is 6 − 2 = 4 and the run is 4 − 1 = 3, so the slope is m = 4 ÷ 3 = 4/3 ≈ 1.3333. The angle is arctan(4/3) = 53.13°, a grade of 133.33%. The intercept is b = 2 − (4/3) × 1 = 2/3, so the line is y = (4/3)x + 2/3, or in standard form 4x − 3y = −2. The distance between the points is √(3² + 4²) = 5.
Starting instead from the point (1, 1) with a slope of −2: b = 1 − (−2)(1) = 3, so y = −2x + 3. The line falls at 63.43° below the horizontal and crosses the x-axis at x = 1.5.
Slope, grade and angle conversions
Ratios like "1 in 12" mean 1 unit of rise for every 12 of run. In the United States, the ADA Standards for Accessible Design limit the running slope of a wheelchair ramp to 1:12, which is a grade of 8.33% and an angle of only 4.76°.
| Rise : run | Slope (decimal) | Grade | Angle |
|---|---|---|---|
| 1 in 20 | 0.05 | 5% | 2.86° |
| 1 in 12 | 0.0833 | 8.33% | 4.76° |
| 1 in 8 | 0.125 | 12.5% | 7.13° |
| 1 in 4 | 0.25 | 25% | 14.04° |
| 1 in 2 | 0.5 | 50% | 26.57° |
| 1 in 1 | 1 | 100% | 45° |
| 2 in 1 | 2 | 200% | 63.43° |
Roof pitch uses the same idea, written as inches of rise per 12 inches of run:
| Roof pitch | Slope | Angle |
|---|---|---|
| 3/12 | 0.25 | 14.04° |
| 4/12 | 0.3333 | 18.43° |
| 6/12 | 0.5 | 26.57° |
| 8/12 | 0.6667 | 33.69° |
| 9/12 | 0.75 | 36.87° |
| 12/12 | 1 | 45° |
Tips and common mistakes
- Keep the order consistent. Subtract in the same order on top and bottom: (y₂ − y₁) ÷ (x₂ − x₁). Mixing orders flips the sign.
- A 100% grade is 45°, not vertical. Grade grows without limit as a line approaches vertical, while the angle stops at 90°.
- Parallel and perpendicular lines. Parallel lines share the same slope; perpendicular lines have slopes whose product is −1 (for example 2 and −1/2).
- Angles beyond 90°. A line has no direction, so an angle of 150° describes the same line as −30°; the calculator reports the equivalent angle between −90° and 90°.
The straight-line distance on its own is in the distance calculator, and slopes are the two legs of a right triangle, which the right triangle calculator solves completely. To find where a curve such as a parabola crosses the axis, try the quadratic formula calculator.
Frequently asked questions
How do I find the slope between two points?
Divide the change in y by the change in x: m = (y₂ − y₁) ÷ (x₂ − x₁). For (1, 2) and (4, 6), m = 4 ÷ 3 ≈ 1.3333, and the line is y = (4/3)x + 2/3.
How do I convert a slope to an angle?
Take the inverse tangent: θ = arctan(m). A slope of 0.5 is about 26.57°, a slope of 1 is exactly 45° and a slope of 2 is about 63.43°.
What does a 100% grade mean?
A 100% grade rises one unit for every unit of run, which is a 45° angle, not a vertical wall. A 1:12 ramp is an 8.33% grade, about 4.76°.
What is the slope of a vertical or horizontal line?
A horizontal line has a slope of 0 because it does not rise. A vertical line has an undefined slope, because its run is zero and division by zero is not defined; its equation is written x = constant.
How do I find the equation of a line from a point and a slope?
Substitute into y = mx + b and solve for b. With the point (1, 1) and slope −2: 1 = −2 × 1 + b, so b = 3 and the line is y = −2x + 3. It crosses the x-axis at x = 1.5.