Skip to content
FigureSure
Sign in

Slope Calculator

Find the slope of a line from two points, or build the line from one point and a slope or an angle. You get the slope as a decimal and a fraction, the angle in degrees, the percent grade, rise, run, distance, intercepts and the equation of the line in three forms.
  • Updated
  • Formula shown

What do you know?
Known values
Values

Results

Slope (m)
1.333333
= 4/3 · rise ÷ run
Angle of inclination
0.927295 rad, from the positive x-axis
53.1301°
Grade
Slope × 100, as used for roads and ramps
133.3333%
Rise (Δy)
6 − 2
4
Run (Δx)
4 − 1
3
Distance between the points
√(Δx² + Δy²)
5
Equation
Decimal: y = 1.3333x + 0.6667
y = (4/3)x + 2/3
y-intercept (b)
= 2/3
0.666667
x-intercept
Where the line crosses y = 0
−0.5
Point-slope form
y − 2 = 1.3333(x − 1)
Standard form
Ax + By = C with whole numbers
4x − 3y = −2

Slope 1.333333 (4/3), angle 53.1301°, line y = (4/3)x + 2/3

How to use the slope calculator

  1. Choose what you know: two points, a point and a slope, or a point and an angle.
  2. Enter the coordinates. Negative values and decimals are fine; whole numbers and short decimals also give exact fractions.
  3. 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

m = (y₂ − y₁) ÷ (x₂ − x₁) = rise ÷ run
θ = 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 : runSlope (decimal)GradeAngle
1 in 200.055%2.86°
1 in 120.08338.33%4.76°
1 in 80.12512.5%7.13°
1 in 40.2525%14.04°
1 in 20.550%26.57°
1 in 11100%45°
2 in 12200%63.43°

Roof pitch uses the same idea, written as inches of rise per 12 inches of run:

Roof pitchSlopeAngle
3/120.2514.04°
4/120.333318.43°
6/120.526.57°
8/120.666733.69°
9/120.7536.87°
12/12145°

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.

Was this calculator helpful?