How to use the slope calculator
Pick what you already know from the Starting information menu, then fill in only those boxes. You can type whole numbers, decimals, fractions like -3/4 or scientific notation like 1.2e3. Fractions stay exact, so a slope of 2/3 is shown as 2/3, not 0.666667.
The decimal precision setting only changes the rounded numbers, like the angle and the distance between points. The slope, intercepts and equations are always exact.
- Choose Two points, One point and slope, Slope-intercept form or Standard form.
- Enter the coordinates, slope, intercept or A, B and C for the form you picked.
- Press Calculate slope.
- Read the exact slope and the line in all three equation forms.
- Use the table of points to check the equation.
Slope from two points: a worked example
Take the points (-1, 4) and (3, -4). The rise is -4 - 4 = -8 and the run is 3 - (-1) = 4. So the slope is -8 / 4 = -2. The line falls 2 units for every 1 unit you move right.
To get the y-intercept, plug either point into y = mx + b. Using (-1, 4): 4 = -2(-1) + b, so b = 2. The line is y = -2x + 2. It crosses the x-axis at (1, 0), and the segment between the two points has its midpoint at (1, 0) as well, with a length of about 8.944.
m = (y2 - y1) / (x2 - x1)
| Result | Value |
|---|---|
| Rise and run | -8 and 4 |
| Slope | -2 |
| Slope intercept form | y = -2x + 2 |
| Point slope form | y - 4 = -2(x + 1) |
| Standard form | 2x + y = 2 |
| Intercepts | x: (1, 0), y: (0, 2) |
| Angle of inclination | about 116.565 degrees |
| Perpendicular slope | 1/2 |
Slope intercept form calculator: y = mx + b
In slope intercept form, m is the slope and b is where the line crosses the y-axis. It's the easiest form to graph: start at (0, b) and move by the slope. Every mode on this page gives you the line in this form, and you can also start from it by choosing Slope-intercept form and entering m and b.
To get there from standard form, solve for y. Ax + By = C becomes y = (-A/B)x + C/B, so the slope is -A/B and the y-intercept is C/B. For 2x + 3y = 12 that's y = (-2/3)x + 4. If B is zero, there's no slope intercept form, because the line is vertical.
y = mx + bFrom Ax + By = C: m = -A/B and b = C/B
Point slope form calculator: y - y1 = m(x - x1)
Point slope form is the natural way to write a line when you know one point and the slope. Plug in the point and slope and you're done, no solving needed. Choose One point and slope to start here, or let the calculator build it from two points.
Say the line passes through (3, -1) with slope 2/3. Point slope form is y + 1 = (2/3)(x - 3). Expand and solve for y and you get y = (2/3)x - 3. Clear the fraction and the standard form is 2x - 3y = 9. Substituting (3, -1) gives 6 + 3 = 9, so the point checks out.
y - y1 = m(x - x1)b = y1 - m x x1
Positive, negative, zero and undefined slope
A positive slope rises from left to right and a negative slope falls. A slope of 0 is a flat, horizontal line like y = -5. A vertical line like x = -4 has a run of zero, and you can't divide by zero, so its slope is undefined.
If you enter the same point twice, there's no single line through it, so the calculator asks for two different points instead of reporting 0/0.
| Rise | Run | Slope | Line |
|---|---|---|---|
| Positive | Positive | Positive | Rises left to right |
| Negative | Positive | Negative | Falls left to right |
| 0 | Not zero | 0 | Horizontal |
| Not zero | 0 | Undefined | Vertical |
Angle, percent grade, parallel and perpendicular slopes
Percent grade is the slope times 100. A slope of 0.08 is an 8% grade, but its angle is only about 4.57 degrees, so grade and degrees aren't the same thing. A 100% grade is a slope of 1 and a 45 degree angle. The angle is measured from the positive x-axis, so a negative slope gets an angle between 90 and 180 degrees.
Parallel lines have the same slope. Perpendicular lines have slopes that multiply to -1, so you flip the slope and change its sign: the perpendicular slope to 2/3 is -3/2. With two points, the calculator also gives the perpendicular bisector of the segment.
| Slope | Angle of inclination | Percent grade |
|---|---|---|
| 0 | 0 degrees | 0% |
| 1/2 | 26.565 degrees | 50% |
| 1 | 45 degrees | 100% |
| -1 | 135 degrees | -100% |
| Undefined | 90 degrees | Undefined |
More worked examples
Each of these starts from a different form. The equations in the third column describe exactly the same line as the starting information.
| Starting information | Slope | Slope intercept form | Check |
|---|---|---|---|
| (1, 2) and (5, 10) | 2 | y = 2x | Both points satisfy 2x - y = 0 |
| Point (3, -1), m = 2/3 | 2/3 | y = (2/3)x - 3 | Substitution gives -1 = -1 |
| 2x + 3y = 12 | -2/3 | y = (-2/3)x + 4 | Intercepts (6, 0) and (0, 4) |
| (-4, 2) and (-4, 9) | Undefined | None (x = -4) | Run is exactly zero |
| y = -5 | 0 | y = -5 | No x-intercept |
Sources
These open algebra textbooks cover the slope formula and the line equation forms used on this page.