Geometry & Trigonometry
Basic

Slope of a Line

Steepness of a straight line.

Formula

m=y2−y1x2−x1m = \frac{y_2 - y_1}{x_2 - x_1}

Live Calculator

Members

Variables

x_1,y_1,x_2,y_2Two points

Example

Through (1, 2) and (4, 11): m = (11−2)/(4−1) = 9/3 = 3.

How it works

The slope of a line tells you how much the vertical value changes for each 1 unit you move horizontally. It is found by taking the change in y, called "rise," and dividing it by the change in x, called "run." This works because a straight line has a constant rate of change between any two points on it.

When to use it

Use this formula whenever you need to find how steep a straight line is from two points on a graph or in coordinate geometry. It is also useful for checking whether lines are parallel, perpendicular, or increasing/decreasing.

Worked example, step by step

Find the slope through (-3, 5) and (2, -5). Use m = (y_2 - y_1) / (x_2 - x_1) Substitute: m = (-5 - 5) / (2 - (-3)) Simplify: m = -10 / 5 Final answer: m = -2

Common mistakes to avoid

  • Subtracting x-values from y-values in the wrong order
  • Forgetting that subtracting a negative number becomes addition
  • Reversing the points inconsistently, which can change the sign if done unevenly

Did You Know?

Slope — "rise over run" — is the everyday ancestor of the derivative in calculus.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026