Try These Examples
Real-world slope calculations
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
Slope Formula
Interactive formula breakdown
The steepness and direction of the line
Y-coordinate of second point
Y-coordinate of first point
X-coordinate of second point
X-coordinate of first point
Where the line crosses the y-axis
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% |
Practice Slope Problems
Test your understanding with real problems
Practice with 6 problems to test your understanding.
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
What is slope?
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.
What does a slope of 0 mean?
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.
What is an undefined slope?
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.
How do I find the y-intercept?
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.
What is slope-intercept form?
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.
How is slope used in real life?
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: 2026-01-15
How this works
Formulas follow standard definitions from the NIST Digital Library of Mathematical Functions and classical textbook derivations. Calculations run entirely in your browser. Where a closed-form solution exists, it is used; where an iterative or numerical method is required, the implementation is named on the page.
Sources
- [1]NIST Digital Library of Mathematical FunctionsAcademicdlmf.nist.govAccessed Apr 21, 2026

Full-stack software engineer specializing in embedded systems, web architecture, and AI/ML. Founder of Practical Web Tools. Built the gesture-controlled drone IP acquired by KD Interactive (Aura Drone, sold on Amazon).