📐

Slope Calculator

Slope of a line through two points, with slope-intercept form, point-slope form and angle

TL;DR

Slope formula: m = (y₂ − y₁) ÷ (x₂ − x₁), rise over run. Through (1, 2) and (3, 8) the slope is 6 ÷ 2 = 3, the slope-intercept form is y = 3x − 1 and the point-slope form is y − 2 = 3(x − 1). A vertical line has an undefined slope.

Slope m = (y₂ − y₁) ÷ (x₂ − x₁), rise over run. Through (1, 2) and (3, 8) the slope is (8 − 2) ÷ (3 − 1) = 3, so the slope-intercept form is y = 3x − 1 and the point-slope form is y − 2 = 3(x − 1). A slope of 1 means an angle of 45°, and a 30° angle has a slope of 0.5774, a grade of 57.74%.

Point 1 (x₁, y₁)
Point 2 (x₂, y₂)

Slope and grade by angle

Angle Slope (m)GradeRun for a rise of 1
5 degrees 0.08758.75%11.4301
10 degrees 0.176317.63%5.6713
15 degrees 0.267926.79%3.7321
20 degrees 0.36436.40%2.7475
25 degrees 0.466346.63%2.1445
30 degrees 0.577457.74%1.7321
35 degrees 0.700270.02%1.4281
40 degrees 0.839183.91%1.1918
45 degrees 1100.00%1
50 degrees 1.1918119.18%0.8391
55 degrees 1.4281142.81%0.7002
60 degrees 1.7321173.21%0.5774
70 degrees 2.7475274.75%0.364
80 degrees 5.6713567.13%0.1763

Common questions with concrete values

What is the slope formula?

m = (y₂ − y₁) ÷ (x₂ − x₁), the change in y divided by the change in x, also called rise over run.

How do you find the slope from two points?

Subtract the y-coordinates, subtract the x-coordinates in the same order and divide. Through (1, 2) and (3, 8): (8 − 2) ÷ (3 − 1) = 6 ÷ 2 = 3.

What is the point-slope form?

y − y₁ = m(x − x₁), where m is the slope and (x₁, y₁) is a point on the line. For slope 3 through (1, 2) it is y − 2 = 3(x − 1).

How do you write a line in slope-intercept form?

Use y = mx + b. Find the slope m, then b = y₁ − m × x₁. For the line through (1, 2) and (3, 8), m = 3 and b = −1, so y = 3x − 1.

What is the slope of a vertical line?

It is undefined, because the run x₂ − x₁ is 0 and you cannot divide by zero. A vertical line is written as x = a constant, for example x = 4. A horizontal line has a slope of 0.

The slope formula

The slope of a line through two points (x₁, y₁) and (x₂, y₂) is m = (y₂ − y₁) ÷ (x₂ − x₁), often described as rise over run. A positive slope rises from left to right, a negative slope falls, a slope of 0 is a horizontal line, and a vertical line has an undefined slope because the run is 0.

Example

Through (1, 2) and (3, 8), the rise is 8 − 2 = 6 and the run is 3 − 1 = 2, so the slope is 6 ÷ 2 = 3. Through (2, 5) and (6, 3), the slope is (3 − 5) ÷ (6 − 2) = −0.5: the line falls by one unit for every two units to the right.

Slope-intercept form

The slope-intercept form of a line is y = mx + b, where m is the slope and b is the y-intercept, the value where the line crosses the y-axis. Once you know m, calculate b = y₁ − m × x₁. For the line through (1, 2) and (3, 8): b = 2 − 3 × 1 = −1, so the equation is y = 3x − 1.

Point-slope form

The point-slope form is y − y₁ = m(x − x₁). It needs only the slope and one point on the line, so you can write it down directly: for slope 3 through (1, 2) it is y − 2 = 3(x − 1). Expanding it gives the slope-intercept form again.

Slope, angle and grade

The angle between a line and the x-axis is θ = arctan(m). A slope of 1 means an angle of 45°, and a slope of 3 about 71.57°. As a percentage grade, a slope of 0.5 is a 50% grade. The table below lists slopes and grades for common angles. The distance formula calculator gives the length between the same two points.

Related Calculators

∝ Ratio & Proportion Calculator ⅔ Fraction Calculator △ Area Calculator 🏛️ Roman Numerals Converter 📊 Average Calculator: Mean, Median & Mode

More Calculators

⊘ Pressure Converter ↔ Length Converter ⚖ Weight Converter