Slope Formula

GEOMETRY

Slope formula

The slope formula measures how steep a line is. It is the change in y divided by the change in x between any two points on the line, often described as rise over run.

m = (y₂ − y₁) / (x₂ − x₁)
where:

  • m = the slope of the line
  • (x₁, y₁) = the first point
  • (x₂, y₂) = the second point

Rise over run

Slope is the vertical change (rise) divided by the horizontal change (run) as you move from one point to another. A slope of 2 means the line climbs 2 units for every 1 unit across. The steeper the line, the larger the absolute value of the slope.

Positive, negative, zero, and undefined

A positive slope rises from left to right; a negative slope falls. A horizontal line has a slope of zero, since y never changes. A vertical line has an undefined slope, because the run is zero and division by zero is not allowed. The sign and size of m capture the direction and steepness at once.

Worked example

  1. Take the points (1, 2) and (4, 8).
  2. Change in y: 8 − 2 = 6.
  3. Change in x: 4 − 1 = 3.
  4. Slope: m = 6 / 3 = 2. The line rises 2 units for every 1 unit across.

Find a slope

Use the Slope Calculator, or see the Linear Equation Formula to build the full line equation.

FAQ

What is the slope formula?

m = (y₂ − y₁) / (x₂ − x₁), the change in y divided by the change in x between two points.

What does a negative slope mean?

The line falls from left to right: as x increases, y decreases.

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.