How to Find Slope

HOW-TO GUIDES

How to find slope

Slope measures how steep a line is, the amount it rises or falls for each step across. This guide shows how to find slope from two points, from an equation, and how to handle the special cases.

What slope is

Slope is often described as rise over run. A steep hill has a large slope; flat ground has a slope of zero. The sign tells you direction: uphill from left to right is positive, downhill is negative.

From two points

  1. Label your two points (x1, y1) and (x2, y2).
  2. Subtract the y-values to get the rise: y2 minus y1.
  3. Subtract the x-values to get the run: x2 minus x1.
  4. Divide rise by run to get the slope.
Example
For (1, 2) and (4, 8): rise = 8 − 2 = 6, run = 4 − 1 = 3, so slope = 6 / 3 = 2.

From an equation

When a line is written in slope-intercept form, y equals mx plus b, the slope is simply m, the number multiplying x. In y equals 3x minus 5, the slope is 3. If the equation is in another form, rearrange it into slope-intercept form to read off the slope directly.

Special cases

A horizontal line has a slope of zero, since it never rises. A vertical line has an undefined slope, because the run is zero and you cannot divide by zero. Parallel lines share the same slope, and perpendicular lines have slopes that multiply to negative one.

Key takeaways

  • Slope is rise over run, the steepness of a line.
  • From two points: (y2 − y1) / (x2 − x1).
  • In y = mx + b, the slope is m.
  • Horizontal lines have slope 0; vertical lines are undefined.
  • Parallel lines share a slope; perpendicular slopes multiply to −1.

Related tools

Use the Slope Calculator, or see the Slope Formula.

FAQ

How do I find the slope between two points?

Divide the change in y by the change in x: (y2 − y1) / (x2 − x1).

What is the slope in y = mx + b?

The coefficient m, the number multiplying x.

Why is a vertical line slope undefined?

Because the run (change in x) is zero, and division by zero is undefined.

Spotted an error or have a suggestion for this calculator? Let us know →
Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.