How to calculate slope from two points
The slope of a line measures how steep it is: how much it rises for each step it runs sideways. Given two points, slope is the change in y divided by the change in x, often remembered as "rise over run". This calculator finds the slope from any two points, along with the line's direction.
The formula
Slope (m) = (y2 - y1) / (x2 - x1).
Worked example
From (1, 2) to (3, 6): the rise is 6 - 2 = 4, the run is 3 - 1 = 2, so the slope is 4 / 2 = 2.
Reading the sign
A positive slope rises left to right; a negative slope falls. A slope of 0 is a flat horizontal line, and a vertical line has an undefined slope because the run is zero.
Frequently asked questions
What is the slope formula?
Slope equals the change in y divided by the change in x, or (y2 - y1) / (x2 - x1). It is rise over run.
What does a negative slope mean?
The line falls as you move from left to right. A positive slope rises, zero is horizontal, and a vertical line has undefined slope.
Why is my slope undefined?
The two points share the same x value, making a vertical line. Vertical lines have no defined slope.
What is the y-intercept?
It is where the line crosses the y-axis, the value of y when x is 0.