Slope Calculator
Calculate the slope, angle, and equation of a line. Find slope from two points, or from slope and y-intercept. Includes visual graph and step-by-step solution.
m = (y₂ - y₁) / (x₂ - x₁)Line Properties
Slope (m)
2
Rising
Calculation Mode
Enter Two Points
Line Graph
Detailed Results
Slope (m)
2
Y-Intercept (b)
0
X-Intercept
0
Angle
63.4349°
Grade (%)
200%
Distance
6.7082
Midpoint
(2.5, 5)
Line Equation
y = 2x + 0
Step-by-Step Solution
1. Calculate the slope (rise/run):
m = (y₂ - y₁) / (x₂ - x₁)
m = (8 - 2) / (4 - 1)
m = 6 / 3
m = 2
2. Find the y-intercept (b):
b = y₁ - m × x₁
b = 2 - 2 × 1
b = 0
3. Write the equation:
y = 2x + 0
Common Slopes Reference
| Application | Ratio | Slope | Angle | Grade |
|---|---|---|---|---|
| ADA Ramp (max) | 1:12 | 0.083 | 4.8° | 8.3% |
| Standard Roof | 4:12 | 0.333 | 18.4° | 33.3% |
| Steep Roof | 12:12 | 1.000 | 45.0° | 100.0% |
| Stairs (typical) | 7:11 | 0.636 | 32.5° | 63.6% |
| Highway Grade | 1:20 | 0.050 | 2.9° | 5.0% |
Line Properties
Slope (m)
2
Rising
?How to Calculate Slope
Slope (m) measures how steep a line is and is calculated as rise over run: m = (y2-y1)/(x2-x1) using two points (x1,y1) and (x2,y2). A positive slope rises left-to-right, negative slope falls. Zero slope is horizontal, undefined slope is vertical. In slope-intercept form y=mx+b, m is slope and b is the y-intercept.
What is Slope?
Slope is a number that describes both the direction and steepness of a line. Calculated as the ratio of vertical change (rise) to horizontal change (run) between any two points on a line, slope indicates how much y changes for each unit change in x. It is fundamental to linear equations, calculus, and real-world applications like road grades.
Key Facts About Slope
- Slope formula: m = (y2-y1)/(x2-x1) = rise/run = change in y / change in x
- Positive slope: line rises from left to right
- Negative slope: line falls from left to right
- Zero slope: horizontal line (y = constant)
- Undefined slope: vertical line (x = constant)
- Slope-intercept form: y = mx + b where m is slope, b is y-intercept
- Point-slope form: y - y1 = m(x - x1)
- Parallel lines have equal slopes; perpendicular lines have slopes that multiply to -1
Quick Answer
Slope (m) measures how steep a line is and is calculated as rise over run: m = (y2-y1)/(x2-x1) using two points (x1,y1) and (x2,y2). A positive slope rises left-to-right, negative slope falls. Zero slope is horizontal, undefined slope is vertical. In slope-intercept form y=mx+b, m is slope and b is the y-intercept.
Frequently Asked Questions
Slope measures the steepness and direction of a line. It's calculated as "rise over run" - the vertical change divided by the horizontal change between two points. A positive slope goes upward left-to-right, while a negative slope goes downward.
A slope of 0 means the line is perfectly horizontal - it doesn't rise or fall as you move along it. The equation is simply y = b, where b is the y-intercept.
An undefined slope occurs with vertical lines where the "run" is zero. Since division by zero is undefined, vertical lines have undefined slope. Their equation is x = a constant value.
The y-intercept is where the line crosses the y-axis (when x = 0). Using point-slope form: b = y - mx. In slope-intercept form (y = mx + b), the y-intercept is the "b" value.
Slope-intercept form is y = mx + b, where m is the slope and b is the y-intercept. This is the most common form for linear equations because you can immediately identify the slope and y-intercept.
Slope appears in many contexts: roof pitch (rise/run), road grades (as percentages), wheelchair ramp requirements (maximum 1:12 ratio), stairs (typically 30-35 degrees), and rate of change in economics, science, and engineering.
Last updated: 2025-01-15
Line Properties
Slope (m)
2
Rising