Ready to calculate?
Use our free Slope Calculator — no sign-up required.
Slope describes the steepness and direction of a line, and it's one of the most fundamental concepts in algebra and coordinate geometry. From graphing linear equations in school to calculating road grades in civil engineering, understanding slope unlocks a wide range of mathematical and real-world applications. This guide covers how to calculate slope from two points, how to write line equations in slope-intercept and point-slope form, and how to interpret slope in practical contexts.
Key Takeaways
- Slope formula: m = (y₂ − y₁) ÷ (x₂ − x₁) = rise ÷ run
- Slope-intercept form: y = mx + b | Point-slope: y − y₁ = m(x − x₁)
- Parallel lines have equal slopes; perpendicular lines have negative reciprocal slopes
- Road grade% = slope × 100; roof pitch = rise:run ratio
- Vertical lines have undefined slope; horizontal lines have slope = 0
The Slope Formula: Rise Over Run
Slope (m) measures how much a line rises (or falls) for each unit it moves horizontally.
Slope formula: m = (y₂ − y₁) / (x₂ − x₁) = rise / run
Where: • (x₁, y₁) and (x₂, y₂) are two points on the line • Rise = vertical change = y₂ − y₁ • Run = horizontal change = x₂ − x₁
Examples: • Points (2, 3) and (6, 11): m = (11 − 3) / (6 − 2) = 8 / 4 = 2
• Points (−1, 5) and (3, −3): m = (−3 − 5) / (3 − (−1)) = −8 / 4 = −2
• Points (0, 4) and (4, 4): m = (4 − 4) / (4 − 0) = 0 / 4 = 0 (horizontal line)
• Points (3, 1) and (3, 7): m = (7 − 1) / (3 − 3) = 6 / 0 = undefined (vertical line)
It doesn't matter which point you call (x₁, y₁) — the slope is the same either way. Just be consistent: subtract in the same order for both numerator and denominator.
- Formula: m = (y₂ − y₁) ÷ (x₂ − x₁)
- Positive slope: line goes up left to right
- Negative slope: line goes down left to right
- Slope = 0: horizontal line | Slope undefined: vertical line
Slope-Intercept Form and Point-Slope Form
Once you have the slope, you can write the equation of the line.
Slope-intercept form: y = mx + b • m = slope • b = y-intercept (where the line crosses the y-axis) • Most useful for graphing and reading off the y-intercept directly
Finding b: Substitute slope m and one point (x₁, y₁) into y = mx + b: • y₁ = m × x₁ + b → b = y₁ − m × x₁
Example: m = 2, point (1, 5): • b = 5 − 2(1) = 3 • Equation: y = 2x + 3
Point-slope form: y − y₁ = m(x − x₁) • Most useful when given slope + one point • Rearrange to get slope-intercept form
Example: m = −3, point (4, 1): • y − 1 = −3(x − 4) • y − 1 = −3x + 12 • y = −3x + 13
Standard form: Ax + By = C (where A ≥ 0, A and B integers) • From y = 2x + 3: −2x + y = 3 → 2x − y = −3
- Slope-intercept: y = mx + b (m = slope, b = y-intercept)
- Point-slope: y − y₁ = m(x − x₁) — use when you have slope + one point
- Find b: substitute known point into y = mx + b, solve for b
- Standard form: Ax + By = C (convert from slope-intercept by rearranging)
Interpreting Slope: Positive, Negative, Zero, Undefined
The value and sign of slope conveys important information:
Positive slope (m > 0): • Line rises from left to right • As x increases, y increases • Example: y = 3x + 1 — for every 1 unit right, go up 3
Negative slope (m < 0): • Line falls from left to right • As x increases, y decreases • Example: y = −2x + 5 — for every 1 unit right, go down 2
Zero slope (m = 0): • Horizontal line • y is constant regardless of x • Equation: y = b (just the y-intercept)
Undefined slope: • Vertical line • x is constant regardless of y • Equation: x = a (a constant)
Magnitude of slope: • |m| > 1: line is steep (rises more than 1 unit per horizontal unit) • |m| = 1: line is at exactly 45° • |m| < 1: line is gradual (rises less than 1 unit per horizontal unit)
Angle from horizontal: • θ = arctan(m) (inverse tangent of slope) • m = 1: θ = 45° | m = 2: θ ≈ 63.4° | m = 0.5: θ ≈ 26.6°
- Positive slope: rises left to right | Negative slope: falls left to right
- Steeper line = larger |m| value
- m = 0: horizontal (y = b) | m undefined: vertical (x = a)
- Angle from horizontal: θ = arctan(m) — 45° when m = 1
Parallel and Perpendicular Lines
Slope reveals the relationship between two lines:
Parallel lines: • Have equal slopes: m₁ = m₂ • Never intersect • Example: y = 3x + 1 and y = 3x − 5 are parallel (both slope = 3)
Perpendicular lines: • Slopes are negative reciprocals: m₁ × m₂ = −1 • Or: m₂ = −1/m₁ • Intersect at exactly 90° • Example: m₁ = 2 → perpendicular slope m₂ = −1/2
Finding perpendicular line through a point: • Original line: y = 4x − 3 (slope = 4) • Perpendicular slope: −1/4 • Through point (8, 2): y − 2 = (−1/4)(x − 8) • y − 2 = −x/4 + 2 • y = −x/4 + 4
Special cases: • Horizontal line (m = 0): perpendicular is vertical (undefined slope) • Vertical line (undefined): perpendicular is horizontal (m = 0)
Applications: • Architecture: walls are perpendicular to floors • Roads: perpendicular cross streets form 90° intersections • Geometry: altitude of a triangle is perpendicular to the base
- Parallel lines: same slope (m₁ = m₂)
- Perpendicular lines: slopes are negative reciprocals (m₁ × m₂ = −1)
- To find perpendicular slope: flip the fraction and change the sign
- m = 2 → perpendicular m = −½ | m = ⅓ → perpendicular m = −3
Real-World Applications of Slope
Slope has direct practical meaning in many fields:
Road grade: • Grade % = (rise ÷ run) × 100 = slope × 100 • 6% grade: 6 feet rise per 100 feet horizontal • Maximum highway grade: 6–8% (highway), 12–15% (residential) • 100% grade = 45° angle (slope = 1)
Roof pitch: • Pitch = rise:run (e.g., 4:12 means 4 inches rise per 12 inches run) • Slope = 4/12 = 1/3 ≈ 0.333 • Steep roofs: 7:12 to 12:12 | Low slope: 2:12 to 4:12
Ramps (ADA accessibility): • Maximum ADA ramp slope: 1:12 (1 inch rise per 12 inches run) • Slope = 1/12 ≈ 0.083 = 8.3% grade
Finance and data: • Slope of a trend line in data analysis = rate of change • Stock price slope over time: rate of price change per day • Linear regression: slope = change in dependent variable per unit independent variable
Physics: • Velocity = slope of position-time graph • Acceleration = slope of velocity-time graph
- Road grade: slope × 100 = grade percentage (6% grade = 0.06 slope)
- Roof pitch: 4:12 pitch = slope of 1/3 = rise over run
- ADA ramp maximum: 1:12 slope (1 inch rise per foot)
- Physics: velocity = slope of position-time graph; acceleration = slope of v-t graph
Distance, Midpoint, and Slope Together
Slope works alongside distance and midpoint formulas in coordinate geometry:
Distance formula (between two points): d = √[(x₂ − x₁)² + (y₂ − y₁)²]
Midpoint formula: M = ((x₁ + x₂)/2, (y₁ + y₂)/2)
Working together — example: Points A(2, 1) and B(8, 9): • Slope: m = (9−1)/(8−2) = 8/6 = 4/3 • Distance: d = √[(8−2)² + (9−1)²] = √[36 + 64] = √100 = 10 • Midpoint: M = ((2+8)/2, (1+9)/2) = (5, 5) • Slope of perpendicular bisector: m = −3/4 through (5, 5) → y − 5 = (−3/4)(x − 5)
Collinear points check: If three points are collinear (on the same line), the slope between any two pairs is equal. Use slope to verify collinearity.
- Distance: d = √[(x₂−x₁)² + (y₂−y₁)²]
- Midpoint: M = ((x₁+x₂)/2, (y₁+y₂)/2)
- Collinear test: equal slopes between all pairs of three points
- Perpendicular bisector: midpoint + perpendicular slope
Frequently Asked Questions
How do you find the slope between two points?
Use the slope formula: m = (y₂ − y₁) ÷ (x₂ − x₁). Subtract the y-coordinates and divide by the difference of the x-coordinates. Example: points (3, 7) and (9, 19) → m = (19 − 7) ÷ (9 − 3) = 12 ÷ 6 = 2. The line has slope 2, meaning it rises 2 units for every 1 unit to the right.
What does a negative slope mean?
A negative slope means the line falls from left to right — as x increases, y decreases. For example, a slope of −3 means for every 1 unit you move right along the x-axis, the y-value decreases by 3. Negative slopes represent decreasing relationships, such as temperature dropping over time or price decreasing as supply increases.
How do I find the equation of a line from two points?
First, calculate the slope: m = (y₂ − y₁) ÷ (x₂ − x₁). Then use point-slope form: y − y₁ = m(x − x₁). Substitute one of the points and simplify. Example: points (1, 4) and (3, 10) → slope = (10−4)÷(3−1) = 3. Equation: y − 4 = 3(x − 1) → y = 3x + 1.
What is the slope of a perpendicular line?
The slope of a perpendicular line is the negative reciprocal of the original slope. If the original slope is m, the perpendicular slope is −1/m. Examples: slope 2 → perpendicular slope −1/2. Slope −3 → perpendicular slope 1/3. Slope 1/4 → perpendicular slope −4. You can verify: the product of perpendicular slopes always equals −1.
What is the difference between slope and grade?
Slope is a ratio or decimal: rise ÷ run (e.g., 0.06). Grade is slope expressed as a percentage: slope × 100 (e.g., 6%). A 6% road grade means the road rises 6 feet for every 100 feet of horizontal distance. The terms are often used interchangeably in civil engineering, but slope is dimensionless while grade is a percentage.
Try the Slope Calculator
Free, instant, and accurate — calculate now.