Slope Calculator
The slope between (1, 2) and (4, 8) is 2. This slope calculator finds the steepness of a line between two points. Slope is the rise over the run, which means the vertical change divided by the horizontal change. A vertical line has an undefined slope because the run is zero and you cannot divide by zero.
Quick answer
The slope measures how steep a line is between two points.
What this tells you
- •The slope measures how steep a line is between two points.
- •It equals the rise (change in y) divided by the run (change in x).
- •A positive slope rises from left to right and a negative slope falls.
- •A horizontal line has a slope of zero and a vertical line has an undefined slope.
How to Use
- 1Enter the x and y coordinates of the first point (x1, y1).
- 2Enter the x and y coordinates of the second point (x2, y2).
- 3Click Calculate to get the slope, rise, run, angle, y-intercept, and line equation.
How It Works
Formula
m = (y2 - y1) / (x2 - x1)The slope m is the rise divided by the run. The rise is the vertical change (y2 - y1) and the run is the horizontal change (x2 - x1). When the run is zero the line is vertical and the slope is undefined. When the rise is zero the line is horizontal and the slope is zero.
Calculation note: values are processed in the order shown above, using the current input units.
Worked Examples
Slope from (1, 2) to (4, 8)
The rise is 8 - 2 = 6 and the run is 4 - 1 = 3. Divide the rise by the run to get 6 / 3 = 2, so the slope is 2.
Slope from (0, 4) to (2, 0)
The rise is 0 - 4 = -4 and the run is 2 - 0 = 2. Divide the rise by the run to get -4 / 2 = -2, so the slope is -2 and the line falls from left to right.
Example Slopes
Common point pairs and the slope of the line between them.
| Point 1 | Point 2 | Slope |
|---|---|---|
| (1, 2) | (4, 8) | 2 |
| (0, 0) | (5, 5) | 1 |
| (0, 5) | (4, 5) | 0 (horizontal) |
| (2, 3) | (2, 9) | Undefined (vertical) |
Common mistakes
- Dividing the run by the rise instead of the rise by the run. Slope is the change in y divided by the change in x, so keep the y values on top.
- Calling a vertical line slope zero instead of undefined. A vertical line has a run of zero, so the slope is undefined, while a horizontal line has a rise of zero and a slope of zero.
- Sign errors with negative coordinates. When a coordinate is negative, subtracting it adds a positive value, so 2 - (-3) = 5, not -1.