📏 Slope Calculator
Find the slope of the line through two points, its equation in every common form, the angle, the distance between the points and the midpoint.
Quick answer: The slope through (2, 3) and (6, 11) is m = (11 − 3) ÷ (6 − 2) = 8 ÷ 4 = 2, so the line is y = 2x − 1, rising at an angle of 63.4349° with a distance of 8.944272 between the points.
Updated · Free · No sign-up · Works on any device
Slope Calculator inputs
Result
Slope through (2, 3) and (6, 11)
m = 2
Rising (positive slope)
- Slope-intercept form
- y = 2x − 1
- Angle of inclination
- 63.4349°
- Distance
- 8.944272
- Midpoint
- (4, 7)
| Point-slope form | y − 3 = 2(x − 2) |
| Standard form | 2x − y = 1 |
| y-intercept | (0, −1) |
| x-intercept | (0.5, 0) |
| Rise (Δy) / run (Δx) | 8 / 4 |
| Grade (slope × 100) | 200% |
| Perpendicular line through point 1 | y = −0.5x + 4 |
Step by step
- Rise: Δy = y₂ − y₁ = 11 − 3 = 8
- Run: Δx = x₂ − x₁ = 6 − 2 = 4
- Slope: m = Δy ÷ Δx = 8 ÷ 4 = 2
- y-intercept: b = y₁ − m·x₁ = 3 − 2 × 2 = −1
- Equation: y = 2x − 1
- Angle: θ = arctan(2) = 63.4349°
- Distance: √(4² + 8²) = √80 = 8.944272
- Midpoint: ((2 + 6) ÷ 2, (3 + 11) ÷ 2) = (4, 7)
The slope formula
Slope measures how steep a line is: how much y changes for every one-unit change in x.
m = (y₂ − y₁) ÷ (x₂ − x₁) = rise ÷ run
Worked example
Find the line through (2, 3) and (6, 11).
- Rise: 11 − 3 = 8. Run: 6 − 2 = 4.
- Slope: m = 8 ÷ 4 = 2.
- y-intercept: b = y₁ − m·x₁ = 3 − 2 × 2 = −1.
- Equation: y = 2x − 1 (point-slope: y − 3 = 2(x − 2); standard: 2x − y = 1).
- Angle: arctan(2) ≈ 63.43°. Distance: √(4² + 8²) = √80 ≈ 8.944. Midpoint: (4, 7).
How to use the calculator
Enter the x and y coordinates of two different points. The calculator returns the slope (as a decimal and, when possible, an exact fraction), the equation of the line in three forms, the intercepts, the angle, the distance and the midpoint, with the working for each.
Forms of a line
| Form | Equation | Best for |
|---|---|---|
| Slope-intercept | y = mx + b | Graphing, reading the intercept |
| Point-slope | y − y₁ = m(x − x₁) | Writing a line from a point and slope |
| Standard | Ax + By = C | Integer coefficients, systems of equations |
| Vertical line | x = a | Undefined slope |
Interpreting the slope
- Positive: the line rises from left to right.
- Negative: it falls from left to right.
- Zero: horizontal. Undefined: vertical.
- As a grade (roads, ramps), multiply the slope by 100: a slope of 0.08 is an 8% grade.
The distance between the points uses the Pythagorean theorem, d = √(Δx² + Δy²), and the midpoint is the average of the coordinates.
Frequently asked questions
What is the slope formula?
Slope m = (y₂ − y₁) ÷ (x₂ − x₁), the change in y (rise) divided by the change in x (run). It doesn’t matter which point you call the first, as long as you subtract in the same order on top and bottom.
What does an undefined slope mean?
If both points have the same x-coordinate the run is 0, and dividing by 0 is undefined. The line is vertical, and its equation is simply x = constant. A slope of 0, by contrast, is a horizontal line y = constant.
How do I convert slope to an angle?
The angle of inclination is θ = arctan(m). A slope of 1 is 45°, a slope of 2 is about 63.43°, and a negative slope gives a negative angle (the line falls from left to right).
What is the slope of a perpendicular line?
It is the negative reciprocal: −1 ÷ m. Perpendicular to a slope of 2 is −1/2. Parallel lines share the same slope.