How to Find the Slope Between Two Points
Slope describes how steep a line is and in which direction it is heading - it is one of the most fundamental concepts in algebra and shows up constantly in graphing, physics, and real-world rate problems. Here is exactly how to calculate it.
The Slope Formula
Given two points (x1, y1) and (x2, y2), the slope (m) between them is calculated as:
m = (y2 - y1) / (x2 - x1)
In plain terms, this is "the change in y divided by the change in x," often remembered as "rise over run."
Worked Example
Find the slope between the points (1, 2) and (4, 8):
m = (8 - 2) / (4 - 1) = 6 / 3 = 2
This means for every 1 unit you move to the right along this line, it rises 2 units.
What Different Slope Values Mean
- Positive slope: The line rises from left to right.
- Negative slope: The line falls from left to right.
- Zero slope: The line is perfectly horizontal (y-values do not change).
- Undefined slope: The line is perfectly vertical - this happens when x1 = x2, which would require dividing by zero in the formula, so the slope simply does not exist for vertical lines.
Finding the Full Line Equation
Once you know the slope, you can find the full equation of the line in slope-intercept form: y = mx + b, where b is the y-intercept (the point where the line crosses the y-axis).
To find b, substitute the slope and one known point into the equation and solve:
b = y - mx (using either of your original points)
Continuing the Example
Using point (1, 2) and slope m = 2:
b = 2 - (2 x 1) = 2 - 2 = 0
So the full line equation is: y = 2x
Finding the Distance Between the Same Two Points
While calculating slope, it is often useful to also know the straight-line distance between the two points, using the distance formula (derived from the Pythagorean theorem):
Distance = sqrt((x2 - x1)2 + (y2 - y1)2)
Using our example points (1, 2) and (4, 8):
Distance = sqrt((4-1)2 + (8-2)2) = sqrt(9 + 36) = sqrt(45) ~= 6.71
Common Mistakes to Avoid
- Reversing the order of subtraction between the two points - as long as you are consistent (y2 - y1 over x2 - x1, using the same point order for both), the result will be correct, but mixing the order between numerator and denominator gives the wrong sign.
- Forgetting that vertical lines have no defined slope - do not try to force a numeric answer when x1 = x2.
- Confusing slope with the y-intercept - slope (m) tells you steepness/direction; the y-intercept (b) tells you where the line crosses the y-axis. They answer different questions.
Step-by-Step: Finding Slope Yourself
- Identify your two points as (x1, y1) and (x2, y2).
- Subtract the y-values (y2 - y1) to get the "rise."
- Subtract the x-values (x2 - x1) to get the "run."
- Divide rise by run to get the slope.
- If needed, find the y-intercept using b = y - mx with either original point, to get the full line equation.
Skip the Manual Math - Use Our Free Slope Calculator
Our free Slope Calculator instantly calculates the slope, y-intercept, full line equation, and distance between any two points - just enter the coordinates.
Final Thoughts
Slope is simply a ratio of vertical change to horizontal change between two points, and once you have it, finding the rest of the line's equation is just one more step. The formula never changes - the key is staying consistent with which point you call "1" and which you call "2" throughout the calculation.