Slope Calculator
Find the slope between two points, with the angle and the line's equation.
Last updated 2026-11-27 · How we calculate this
Slope
Enter two points to see the slope.
The two points must have different x-values: a vertical line has no defined slope, and the page says so instead of giving a number. Each box accepts up to four decimal places. Results are rounded to four decimal places, and angles are measured from the horizontal, between −90° and 90°.
Quick Answer
Slope is rise over run: subtract the y-values, subtract the x-values in the same order, and divide. From (1, 2) to (5, 5) the rise is 5 − 2 = 3 and the run is 5 − 1 = 4, so the slope is 3 ÷ 4 = 0.75.
How to Use This Calculator
Enter two points on the line as x and y values: x is how far across and y is how far up. The calculator gives the slope as a decimal and as a fraction, the rise and run behind it, the angle the line makes with the horizontal, the percent grade used for roads and ramps, and the equation of the line in slope-intercept form. Decimals and negative numbers are fine.
- Enter x₁ and y₁ for the first point.
- Enter x₂ and y₂ for the second point.
- Read the slope, the angle and the percent grade.
- Use the equation of the line and the y-intercept for graphing.
The Formula
Slope m = (y₂ − y₁) ÷ (x₂ − x₁) · y-intercept b = y₁ − m × x₁
The rise is how far the line goes up (or down, when negative) between the two points, and the run is how far it goes across. Dividing rise by run gives the slope, the change in y for each 1 step in x. The angle comes from the inverse tangent of the slope, and the percent grade is the slope × 100. The y-intercept, where the line crosses the y-axis, is found by putting one point and the slope into y = mx + b.
Worked Example
From (1, 2) to (5, 5): rise 3, run 4, so the slope is 3/4 = 0.75. The angle is 36.8699°, the grade is 75%, and the line is y = 0.75x + 1.25.
From (−2, 7) to (3, −3): rise −10, run 5, so the slope is −2 and the line falls. The y-intercept is 3, giving y = −2x + 3.
A wheelchair ramp at the ADA maximum of 1 : 12 rises 1 inch for every 12 inches across. Its slope is 0.0833, a grade of 8.33% and an angle of 4.7636°.
From (2, 4) to (6, 4): the rise is 0, so the slope is 0 and the line is the horizontal line y = 4.
Frequently Asked Questions
Sources: OpenStax, Elementary Algebra 2e, 4.4 Understand Slope of a Line; U.S. Access Board, Guide to the ADA Standards, Chapter 4: Ramps and Curb Ramps