Mathwords logoReference LibraryMathwords

Slope Formula

The slope formula is a way to calculate the steepness of a line when you know two points on it. It works by dividing the change in yy by the change in xx: y2y1x2x1\dfrac{y_2 - y_1}{x_2 - x_1}.

Given two distinct points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) on a line, the slope mm is defined as the ratio of the vertical change (rise) to the horizontal change (run) between those points. This is expressed as m=y2y1x2x1m = \dfrac{y_2 - y_1}{x_2 - x_1}, where x1x2x_1 \neq x_2. The slope measures the rate of change of yy with respect to xx and is constant for any two points on the same line.

Key Formula

m=y2y1x2x1m = \frac{y_2 - y_1}{x_2 - x_1}
Where:
  • mm = the slope of the line
  • (x1,y1)(x_1, y_1) = the first point on the line
  • (x2,y2)(x_2, y_2) = the second point on the line

Worked Example

Problem: Find the slope of the line that passes through the points (2, 3) and (8, 15).
Step 1: Identify your two points and label the coordinates.
(x1,y1)=(2,3)and(x2,y2)=(8,15)(x_1, y_1) = (2, 3) \quad \text{and} \quad (x_2, y_2) = (8, 15)
Step 2: Subtract the yy-values to find the rise.
y2y1=153=12y_2 - y_1 = 15 - 3 = 12
Step 3: Subtract the xx-values (in the same order) to find the run.
x2x1=82=6x_2 - x_1 = 8 - 2 = 6
Step 4: Divide the rise by the run.
m=126=2m = \dfrac{12}{6} = 2
Answer: The slope of the line is m=2m = 2, meaning yy increases by 2 for every 1 unit increase in xx.

Visualization

Why It Matters

The slope formula shows up constantly in algebra and beyond because slope describes how quickly one quantity changes relative to another. In science, slope can represent speed (distance over time) or rate of a chemical reaction. Whenever you need to measure a rate of change from data—whether in economics, physics, or everyday problem-solving—you're using this formula.

Common Mistakes

Mistake: Subtracting the coordinates in a different order for the numerator and denominator, such as computing (y2y1)/(x1x2)(y_2 - y_1)/(x_1 - x_2).
Correction: You must subtract in the same order on top and bottom. If you use y2y1y_2 - y_1 in the numerator, use x2x1x_2 - x_1 in the denominator—not x1x2x_1 - x_2. Reversing one but not the other flips the sign of your answer.
Mistake: Putting the xx-values in the numerator and the yy-values in the denominator.
Correction: Slope is rise over run, so the yy-difference always goes on top and the xx-difference goes on the bottom. A helpful way to remember: the alphabet puts xx before yy, but in the slope formula yy comes first (on top).

Related Terms