Slope Calculator
Calculate the slope (gradient) of a line between two points. Also shows rise, run, y-intercept, and angle.
Results
What Is Slope?
Slope measures the steepness of a line. It's calculated as the change in y divided by the change in x (rise over run). A positive slope means the line goes upward, a negative slope means it goes downward, and zero slope means the line is horizontal.
m = (y₂ - y₁) / (x₂ - x₁) = rise / run
Types of Slope
Positive Slope
Line goes up from left to right (m > 0)
Negative Slope
Line goes down from left to right (m < 0)
Zero Slope
Horizontal line (m = 0)
Undefined Slope
Vertical line (run = 0)
Slope-Intercept Form
The slope-intercept form of a line is y = mx + b, where m is the slope and b is the y-intercept (where the line crosses the y-axis). This form makes it easy to graph a line and understand its properties.
y = mx + b
m = slope, b = y-intercept
Parallel and Perpendicular Lines
Slope reveals important geometric relationships between lines. Two lines are parallel if they have the same slope, and perpendicular if their slopes are negative reciprocals of each other.
Parallel Lines
Same slope, different y-intercept. Never intersect.
y = 2x + 1
y = 2x − 5
Both have m = 2 ✓
Perpendicular Lines
Slopes multiply to −1 (negative reciprocals).
y = 3x + 2 (m = 3)
y = −⅓x + 4 (m = −⅓)
3 × (−⅓) = −1 ✓
Step-by-Step Examples
Example 1: Find slope between (1, 2) and (4, 8)
- Rise = y₂ − y₁ = 8 − 2 = 6
- Run = x₂ − x₁ = 4 − 1 = 3
- Slope m = 6 / 3 = 2
- Line equation: y = 2x + b → 2 = 2(1) + b → b = 0
- Final equation: y = 2x
Example 2: Road grade — 3 m rise over 50 m run
- Slope m = rise / run = 3 / 50 = 0.06
- Road grade percentage = 0.06 × 100 = 6%
- Angle = arctan(0.06) ≈ 3.43°
- A 6% grade is a moderately steep road (highways limit to 6–8%)
Example 3: Find the line perpendicular to y = 4x − 2 through (0, 3)
- Original slope: m = 4
- Perpendicular slope: m⊥ = −1/4 = −0.25
- Through (0, 3): y-intercept = 3
- Perpendicular line: y = −0.25x + 3
Real-World Applications of Slope
🏗️ Engineering & Construction
- • Road grades: max 6–8% for highways
- • Roof pitch: 4/12 means 4 inches rise per foot
- • ADA ramp maximum: 1:12 slope (≈ 4.76°)
📈 Economics & Finance
- • Marginal cost = slope of total cost curve
- • Supply/demand: slope shows price elasticity
- • Trend lines: slope = rate of growth
🔬 Physics
- • Velocity = slope of position–time graph
- • Acceleration = slope of velocity–time graph
- • Ohm's law: slope of V–I curve = resistance
🌍 Geography & Navigation
- • Topographic maps: contour line spacing shows slope
- • GPS: elevation gain per horizontal distance
- • Hiking difficulty: slopes over 30° are very steep