Slope Calculator (Free Step-by-Step Tool)
AlgebraFreeNo sign-up
A slope calculator divides the rise by the run: m = (y₂ − y₁) / (x₂ − x₁). For the points (1, 2) and (4, 8), the rise is 8 − 2 = 6 and the run is 4 − 1 = 3, so the slope is 6 ÷ 3 = 2. The line is y = 2x. It climbs at about 63.43°, which is a 200% grade.
Next step after the slope: write the line as y = mx + b with the Slope Intercept Form Calculator.
The slope of the line through (−3, 1) and (3, 5) is 4 / 6 = 2/3. Its equation is y = (2/3)x + 3.
Equation of the line
Distance and midpoint
Show steps
- Label the points: (x₁, y₁) = (−3, 1) and (x₂, y₂) = (3, 5).
- Rise = y₂ − y₁ = 5 − 1 = 4. Run = x₂ − x₁ = 3 − (−3) = 6.
- Slope m = rise ÷ run = 4 ÷ 6 = 2/3 (simplified by dividing top and bottom by 2), or about 0.6667. Positive: the line rises from left to right.
- y-intercept: b = y₁ − m×x₁ = 1 − (2/3) × (−3) = 3. So the slope-intercept form is y = (2/3)x + 3.
- Point-slope form with point 1: y − y₁ = m(x − x₁) gives y − 1 = (2/3)(x + 3).
- Distance = √(run² + rise²) = √(6² + 4²) = √52 = 2√13 ≈ 7.2111. Midpoint = average of the coordinates = (0, 3).
- Angle with the x-axis: θ = arctan(m) = arctan(2/3) ≈ 33.69°. Percent grade: m × 100 ≈ 66.67% (rise per 100 units of run).
- Parallel lines have the same slope, 2/3. Perpendicular lines have the negative reciprocal: −1 ÷ (2/3) = −3/2. Check: (2/3) × (−3/2) = −1.
How to use the slope calculator
- Pick what you know: Two points, an Equation of the line, a Point & slope, or a rise, run, percent grade, angle or roof pitch (Grade & angle).
- Type the numbers. Coordinates can be whole numbers, decimals or fractions such as 3/4. The answer updates as you type.
- Read the slope as a fraction and a decimal, then the angle, percent grade, parallel and perpendicular slopes, the equation in three forms and both intercepts. For two points you also get the distance, the midpoint and the perpendicular bisector.
- Check the graph, which shows the rise and run, and open Show steps for the full working.
The slope formula
m = (y₂ − y₁) / (x₂ − x₁) = rise / run. Here (x₁, y₁) and (x₂, y₂) are two points on the line, the rise Δy is the vertical change and the run Δx is the horizontal change. The slope tells you how much y changes when x goes up by 1. You can subtract in either order, as long as you use the same order on top and bottom.
| Slope | Line | Example |
|---|---|---|
| Positive | Rises from left to right | (1, 2) to (4, 8): m = 2 |
| Negative | Falls from left to right | (−2, 5) to (6, −1): m = −3/4 |
| Zero | Horizontal, y = b | (−4, 2) to (5, 2): m = 0 |
| Undefined | Vertical, x = a | (3, −1) to (3, 7): the run is 0 |
A vertical line has an undefined slope because the run is 0, and you cannot divide by 0. A horizontal line has a slope of 0 because the rise is 0. “Zero slope” and “no slope” are not the same thing.
Worked examples
Example 1: slope and equation from two points
For (−3, 1) and (3, 5): rise = 5 − 1 = 4 and run = 3 − (−3) = 6, so m = 4/6 = 2/3. The y-intercept is b = 1 − (2/3)(−3) = 1 + 2 = 3. Slope-intercept form: y = (2/3)x + 3. Point-slope form: y − 1 = (2/3)(x + 3). The angle is arctan(2/3) ≈ 33.69°.
Example 2: slope from an equation
For 2x + 3y = 12, solve for y: 3y = −2x + 12, so y = −(2/3)x + 4. The slope is −2/3 and the y-intercept is 4. The shortcut for Ax + By = C is m = −A/B = −2/3.
Example 3: a perpendicular line through a point
Find the line through (2, −1) that is perpendicular to y = (2/3)x + 3. The perpendicular slope is the negative reciprocal, −3/2. Then −1 = (−3/2)(2) + b gives b = 2, so the line is y = −(3/2)x + 2.
Finding slope from an equation
- Slope-intercept form y = mx + b: the slope is the number in front of x. In y = −4x + 7, m = −4.
- Standard form Ax + By = C: m = −A/B. In 5x − 2y = 10, m = −5/(−2) = 5/2.
- Point-slope form y − y₁ = m(x − x₁): the slope is the number in front of the bracket. In y − 2 = 3(x + 1), m = 3.
- x = a is vertical (undefined slope) and y = b is horizontal (slope 0).
Parallel and perpendicular slopes
Parallel lines have equal slopes. Perpendicular lines have slopes that are negative reciprocals, so their product is −1: a line with slope 2/3 is perpendicular to any line with slope −3/2, because (2/3) × (−3/2) = −1. The one exception is a horizontal line and a vertical line, which are perpendicular even though the vertical slope is undefined.
Slope as percent grade, angle and pitch
Roads, ramps and roofs describe slope in other units. All of them come from m = rise ÷ run:
- Percent grade = m × 100. A road that rises 5 ft over 100 ft has a 5% grade.
- Angle θ = arctan(m). A slope of 1 is 45°, so a 100% grade is 45°, not 90°.
- Roof pitch = rise per 12 of run = 12 × m. A 4/12 roof has slope 1/3.
- Ratio 1 : n, where n is the run for one unit of rise. The ADA Standards limit the running slope of ramp runs to 1:12 (about 8.33%), so a ramp that rises 2 ft needs at least 24 ft of run.
| Slope m | Percent grade | Angle | Roof pitch | Ratio |
|---|---|---|---|---|
| 0.05 | 5% | 2.86° | 0.6 in 12 | 1 : 20 |
| 1/12 | 8.33% | 4.76° | 1 in 12 | 1 : 12 |
| 1/4 | 25% | 14.04° | 3 in 12 | 1 : 4 |
| 1/3 | 33.33% | 18.43° | 4 in 12 | 1 : 3 |
| 1/2 | 50% | 26.57° | 6 in 12 | 1 : 2 |
| 1 | 100% | 45° | 12 in 12 | 1 : 1 |
| 2 | 200% | 63.43° | 24 in 12 | 1 : 0.5 |
Distance and midpoint between the two points
The same rise and run give the length of the segment by the Pythagorean theorem: d = √(run² + rise²). For (−3, 1) and (3, 5), d = √(36 + 16) = √52 = 2√13 ≈ 7.211. The midpoint averages the coordinates: ((−3 + 3)/2, (1 + 5)/2) = (0, 3).
Common mistakes to avoid
- Mixing the order. (5 − 1)/(−3 − 3) gives −2/3 instead of 2/3. Subtract in the same order on top and bottom.
- Run over rise. The change in y goes on top.
- Losing a negative sign. 3 − (−3) is 6, not 0.
- Calling a vertical line “slope 0”. Vertical is undefined; horizontal is 0.
- Reading the slope from standard form directly. In 2x + 3y = 12, the slope is −2/3, not 2.
- Treating percent grade as degrees. A 10% grade is only about 5.71°.
Using the calculator for homework
Work the problem by hand first, then enter the same numbers and compare. If your answer differs, open the steps and find the first line that does not match. Before you trust any answer, estimate: if the line goes up from left to right, the slope must be positive. Keep fractions exact until the last step, and round only the decimal and the angle.
Sources
- U.S. Access Board, Guide to the ADA Standards, Chapter 4: Ramps and Curb Ramps (1:12 maximum running slope for ramp runs; checked November 2026)
Slope practice quiz: 10 questions
Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.
Rise = 9 − 3 = 6 and run = 5 − 2 = 3, so m = 6/3 = 2. Putting the run on top gives 1/2, a common mistake.
Rise = −4 − 2 = −6 and run = 3 − (−1) = 4, so m = −6/4 = −3/2. The line falls from left to right, so the slope must be negative.
The run is 4 − 4 = 0. Division by 0 is undefined, so the line is vertical (x = 4) and has no slope.
Solve for y: 4y = −3x + 8, so y = −(3/4)x + 2. The slope is −A/B = −3/4.
Perpendicular slopes are negative reciprocals: flip 2/5 to 5/2 and change the sign. Check: (2/5) × (−5/2) = −1.
Point-slope form: y + 2 = 3(x − 1), so y = 3x − 3 − 2 = 3x − 5. Check: 3(1) − 5 = −2.
A 1:12 slope means 12 units of run for every 1 unit of rise, so the run is 3 × 12 = 36 ft.
d = √(6² + 8²) = √100 = 10, and the midpoint is ((0 + 6)/2, (0 + 8)/2) = (3, 4).
Quiz complete
Frequently asked questions
How do you calculate slope with two points?
Subtract the y-coordinates and the x-coordinates in the same order, then divide: m = (y₂ − y₁)/(x₂ − x₁). For (1, 2) and (4, 8), m = (8 − 2)/(4 − 1) = 6/3 = 2.
Is slope rise over run?
Yes. Rise is the vertical change (Δy) and run is the horizontal change (Δx). A line that goes up 3 units for every 4 units across has a slope of 3/4.
How do you calculate slope percentage?
Multiply the slope by 100. A rise of 5 ft over a run of 100 ft is 5/100 = 0.05, which is a 5% grade.
How do you calculate the slope angle in degrees?
Take the inverse tangent of the slope: θ = arctan(m). A slope of 1 gives 45°, a slope of 2 gives about 63.43°, and a slope of 1/12 gives about 4.76°.
How do you calculate the slope of a ramp?
Divide the height by the horizontal length, in the same units. A ramp that rises 2 ft over 24 ft has a slope of 2/24 = 1/12, about 8.33%, which is the 1:12 maximum in the ADA Standards for ramp runs.
How do you calculate slope in Excel?
Put the x-values in one range and the y-values in another, then use =SLOPE(known_y's, known_x's). With x-values in A1:A2 and y-values in B1:B2, type =SLOPE(B1:B2, A1:A2). Note that the y-values come first.
Related calculators
- Point-slope form calculator
- Equation of a line calculator
- Distance and midpoint calculator
- Graphing calculator
More algebra calculators
Related to This Article
More math articles
- Free Utah RISE Grade 3 Math Practice: 49 Printable PDFs for Classrooms, Tutors, and Parents
- How to Find Volume by Spinning: Washer Method
- How to Interpret Categorical Data
- Comparing Opposing Arguments
- Comparing and Ordering Numbers for 5th Grade: Tips and Practice
- The Best Grade 6 ELA Practice Tests for New Jersey Students
- How to Make Your Investments Last and Grow Using Math
- Rhode Island Grade 2 Math Worksheets — Free Printable PDFs
- How to Graph Transformation on the Coordinate Plane: Reflection?
- Full-Length 7th Grade STAAR Math Practice Test



What people say about "Slope Calculator: Two Points, Equation, Grade & Angle"?
No one replied yet.