Slope-intercept form
The slope is the number in front of x, and b is where the line crosses the y-axis. In y = 3x − 5, the slope is 3.
Slope-intercept form calculatorFind the slope of a line from two points or an equation. You get the slope as a fraction and a decimal, the line equation, the angle, the percent grade and a graph you can drag.
Drag a point to move it
Slope is a number that tells you how steep a straight line is and which way it goes.
Read a line from left to right. If it climbs, its slope is positive. If it drops, its slope is negative. The steeper the line, the bigger the number, whether it is positive or negative. A flat line has a slope of 0.
The slope compares two changes between any two points on the line: how far it moves up or down (the rise) and how far it moves left to right (the run). A slope of 3 means the line goes up 3 units for every 1 unit it moves to the right.
In the US the symbol for slope is m. In the UK and Australia the same idea is usually called the gradient. A straight line has the same slope everywhere, so it does not matter which two points you pick.
To find the slope between two points, divide the change in y by the change in x.
Subtract in the same order on the top and the bottom. If you start with y₂ on top, start with x₂ on the bottom. Mixing the order flips the sign and gives the wrong answer.
Every straight line has one of four kinds of slope. Pick a type, or move the slider to tilt the line and watch it change.
Here is the full working for the points A(3, 6) and B(8, 2).
If you already have the equation of the line, you do not need two points. How you read the slope depends on the form.
The slope is the number in front of x, and b is where the line crosses the y-axis. In y = 3x − 5, the slope is 3.
Slope-intercept form calculatorSolve for y and the slope comes out as m = −A/B. In 2x + 3y = 6, the slope is −2/3. If B is 0 the line is vertical. Use the Equation tab above to do this for any line.
Standard form calculatorThe slope is the number in front of the brackets. In y − 4 = 2(x + 1), the slope is 2 and the line passes through (−1, 4).
Point-slope form calculatorThe same steepness can be written three ways. Math class uses slope, road signs and ramps use percent grade, and surveyors often use the angle.
Percent grade and angle are easy to mix up. A 100% grade is a 45° angle, not a vertical wall. To convert between them for a ramp, roof or driveway, use the slope percentage calculator.
| Slope (m) | Angle | Grade | Rise : run |
|---|---|---|---|
| 0 | 0° | 0% | 0 : 1 |
| 1/12 ≈ 0.0833 | 4.76° | 8.33% | 1 : 12 |
| 0.1 | 5.71° | 10% | 1 : 10 |
| 0.25 | 14.04° | 25% | 1 : 4 |
| 0.5 | 26.57° | 50% | 1 : 2 |
| 1 | 45° | 100% | 1 : 1 |
| 1.7321 | 60° | 173.21% | 1.732 : 1 |
| Undefined | 90° | Undefined | 1 : 0 |
Slope shows up any time one thing changes at a steady rate compared with another. Pick an example and move the slider to see the numbers change.
One worked pair of points for each type of slope. For more, see the slope examples page.
| Type | Point 1 | Point 2 | Rise (Δy) | Run (Δx) | Slope (m) | Equation |
|---|---|---|---|---|---|---|
| Positive | (1, 2) | (4, 8) | 8 − 2 = 6 | 4 − 1 = 3 | 6/3 = 2 | y = 2x |
| Negative | (−1, 5) | (3, −3) | −3 − 5 = −8 | 3 − (−1) = 4 | −8/4 = −2 | y = −2x + 3 |
| Fraction | (−4, 5) | (2, 1) | 1 − 5 = −4 | 2 − (−4) = 6 | −4/6 = −2/3 | y = −(2/3)x + 7/3 |
| Zero | (−4, 7) | (6, 7) | 7 − 7 = 0 | 6 − (−4) = 10 | 0/10 = 0 | y = 7 |
| Undefined | (5, −2) | (5, 6) | 6 − (−2) = 8 | 5 − 5 = 0 | 8/0, undefined | x = 5 |
Tools for line equations, distance, midpoints and data trends, all with step-by-step answers.
Showing all 12 calculators
No calculator matches "".
Work a few problems by hand, then check each answer with the calculator above.
Printable sheets for finding slope from two points, from graphs and from equations.
Browse worksheetsProblems on positive, negative, zero and undefined slope, with the answers worked out.
Start practicingMaintained by the SlopeCalculator.cc Editorial Team · Updated
Slope, written as m, measures how steep a line is and which way it goes. It is the vertical change (rise) divided by the horizontal change (run) between any two points on the line.
Subtract the y-values to get the rise, subtract the x-values in the same order to get the run, then divide: m = (y₂ − y₁) / (x₂ − x₁). For (2, 3) and (6, 11), m = 8 / 4 = 2.
The slope formula is m = (y₂ − y₁) / (x₂ − x₁), where (x₁, y₁) and (x₂, y₂) are two points on the line and x₂ is not equal to x₁.
A negative slope means the line falls as you move from left to right. As x increases, y decreases.
A zero slope means the line is horizontal. Every point has the same y-value, so the rise is 0 and m = 0. Its equation looks like y = 4.
Every point on a vertical line has the same x-value, so the run is 0. The slope formula would divide by 0, which has no answer, so the slope is undefined. Its equation looks like x = 3.
In slope-intercept form y = mx + b, the slope is the number in front of x. In standard form Ax + By = C, the slope is m = −A/B, as long as B is not 0.
Yes. In a two-dimensional graph, slope and gradient mean the same thing: rise over run. Gradient is the common term in the UK and Australia. Slope is the usual term in the US.
For the angle, take the inverse tangent: angle = arctan(m). For percent grade, multiply by 100. A slope of 0.5 is about 26.57° and a 50% grade.
Yes. The calculator accepts whole numbers, decimals, fractions like 3/4, mixed numbers like 1 1/2 and negative values. Results stay exact as fractions where possible, with the decimal next to them.
Sources for the definitions, formulas and ramp figures on this page.
Longer guides on slope, line equations and circles, with worked examples.