How to Find the Slope of a Line Between Two Points
Slope is rise over run. This guide shows how to work it out from two points and turn it into a line equation.
What is the Slope Calculator?
Enter two points and the tool measures how steeply the line between them rises or falls. The slope is the change in y divided by the change in x, and once you know the slope you can find the intercept, the point where the line crosses the vertical axis, and write the full equation in the form y equals mx plus b.
How to use it
- Enter the first point as x1 and y1.
- Enter the second point as x2 and y2.
- Calculate to see the slope, intercept and line equation.
Worked example
Points (1, 2) and (3, 6) give slope 2, intercept 0 and equation y = 2x + 0.
What is the slope of the line through (1, 2) and (3, 6)?
The change in y is 6 minus 2, which is 4, and the change in x is 3 minus 1, which is 2. Dividing 4 by 2 gives a slope of 2. The intercept is 0, so the equation is y equals 2x.
Frequently asked questions
What is a negative slope?
A negative slope means the line falls as you move to the right: y gets smaller as x gets larger.
What if both points have the same x value?
Then the line is vertical, so it has no single slope. The tool tells you the line is vertical instead of giving a number.