Skip to main content

Interactive Math Workbooks

Practice, learn and master mathematics with interactive exercises and instant feedback.

Slope Calculator

Mathematics - Slope of a Line with rise over run concept

Slope Calculator — Find Slope Between Two Points Instantly

Calculate the slope of a line passing through two points. Get step-by-step working, the slope formula explanation, and learn about slope types. For midpoint, try our midpoint calculator.

Calculate Slope Between Two Points

Enter the coordinates of two points (x₁, y₁) and (x₂, y₂). Click Calculate to find the slope.

Slope will appear here.
Note: The slope m = (y₂ - y₁) / (x₂ - x₁). If x₂ = x₁, the slope is undefined (vertical line). If y₂ = y₁, the slope is zero (horizontal line).

Slope – Complete Explanation

The slope of a line measures its steepness and direction. It's one of the most fundamental concepts in algebra and coordinate geometry, forming the foundation for linear equations, rate of change, and calculus derivatives.

Slope Formula

m = (y₂ - y₁) / (x₂ - x₁) = Δy / Δx = rise / run

Where (x₁, y₁) and (x₂, y₂) are any two distinct points on the line.

1. Understanding Rise and Run

The slope formula captures two essential ideas:

  • Rise (Δy): The vertical change — how much y increases or decreases between two points.
  • Run (Δx): The horizontal change — how much x increases or decreases between two points.

Slope = Rise / Run tells you how many units y changes for each unit x changes.

2. Step-by-Step Examples

2.1 Example 1: Positive Slope

Find the slope between (1, 2) and (4, 8)

Step 1: Δy = 8 - 2 = 6
Step 2: Δx = 4 - 1 = 3
Step 3: m = 6 / 3 = 2

Result: m = 2 (line rises 2 units per 1 unit x)

2.2 Example 2: Negative Slope

Find the slope between (2, 5) and (6, 1)

Step 1: Δy = 1 - 5 = -4
Step 2: Δx = 6 - 2 = 4
Step 3: m = -4 / 4 = -1

Result: m = -1 (line falls 1 unit per 1 unit x)

3. Types of Slope

Positive Slope (m > 0): Line rises from left to right.

Negative Slope (m < 0): Line falls from left to right.

Zero Slope (m = 0): Horizontal line. No rise regardless of run.

Undefined Slope: Vertical line. x₂ - x₁ = 0.

4. More Examples

Example 1: (0, 0) and (5, 10) → m = 2

Example 2: (-3, 7) and (2, -3) → m = -2

Example 3: (4, -1) and (4, 6) → Undefined (vertical)

Example 4: (-5, 2) and (3, 2) → m = 0 (horizontal)

5. Slope from an Equation

For slope-intercept form y = mx + b, the slope is the coefficient m.

Example: y = 3x - 7 → m = 3

2x + 3y = 6 → y = -⅔x + 2 → m = -⅔

6. Slope and Parallel/Perpendicular Lines

Parallel and Perpendicular Slopes

Parallel: m₁ = m₂
Perpendicular: m₁ · m₂ = -1

Example: If m = 2, parallel slope = 2, perpendicular slope = -½.

7. Common Mistakes to Avoid

  • Swapping coordinates: Always y₂ - y₁ over x₂ - x₁.
  • Dividing run by rise: Slope is rise/run, not run/rise.
  • Forgetting the sign: Negative slope from one negative change.
  • Confusing zero and undefined: Zero = horizontal; undefined = vertical.

8. Slope as Rate of Change

  • Speed: Distance-time graph slope.
  • Unit price: Cost per item.
  • Population growth: People per year.

9. Real-World Applications

  • Physics: Velocity as slope of position-time graph.
  • Economics: Marginal cost and revenue.
  • Engineering: Road grades and ramp inclinations.
  • Architecture: Roof pitch.
  • Data Science: Linear regression slope.

10. Slope and the Derivative

The derivative f'(x) gives the instantaneous slope of the tangent line at any point on a curve.

Example: f(x) = x² → f'(x) = 2x. At x = 3, slope = 6.

11. Practice Problems with Solutions

Problem 1: (2, 3) and (5, 11) → m = 8/3

Problem 2: (-1, 4) and (3, -2) → m = -3/2

Problem 3: (1, 2), (3, 8), (5, 14) collinear? → Yes, slope = 3 throughout.

12. Tips for Mastering Slope

  • Label points before plugging into formula.
  • Keep subtraction order consistent.
  • Leave slope as simplified fraction.
  • Visualize: positive uphill, negative downhill.

13. Final Thoughts

Slope is a deceptively simple concept with profound implications. It connects algebra to geometry, provides the language for describing change, and serves as the gateway to calculus.

Mastering slope calculations by hand builds the intuition needed for more advanced topics. Use this calculator to verify your work, but practice the formula until it becomes second nature.

14. Frequently Asked Questions

A negative slope means the line falls from left to right. As x increases, y decreases. The steeper the negative slope, the faster the line drops. For example, m = -3 means y decreases by 3 units for every 1 unit increase in x.

Zero slope means a horizontal line (y = constant). Undefined slope means a vertical line (x = constant). Zero slope comes from Δy = 0 (no rise); undefined slope comes from Δx = 0 (no run, division by zero).

No. The slope is the same regardless of which point is first. Swapping the points negates both numerator and denominator, so the ratio remains unchanged. Slope is a property of the line, not the points.

Rewrite the equation in slope-intercept form y = mx + b. The coefficient m is the slope. For example, 2x + 3y = 6 becomes y = -⅔x + 2, so m = -⅔.

Parallel lines have equal slopes (m₁ = m₂). Perpendicular lines have negative reciprocal slopes (m₁ · m₂ = -1). For example, a line with slope 2 is perpendicular to a line with slope -½.

Explore Math Topics

Continue your learning journey with our other math guides

Conclusion

Slope is a deceptively simple concept with profound implications. Use this calculator to verify your work, but practice the formula until it becomes second nature.

Readers who wish to continue practicing and reinforce what they've learned can explore the companion learning resource for guided exercises.