Slope Calculator
Calculate the slope and y-intercept of a line from two points, for y = mx + b. Fast and private.
Independently verified for accuracy
Calculator by Toolsloft ↗- Slope (m)
- 3
- Y-intercept (b)
- -2
Find the slope of the line through two points, along with its y-intercept. Enter the coordinates of both points to get the slope m and the intercept b for the line y = mx + b. Useful for algebra, graphing, and reading trends.
How this is calculated
Slope is the change in y divided by the change in x between the two points, m = (y2 - y1) / (x2 - x1). The y-intercept is found by rearranging y = mx + b to b = y1 - m times x1. When both points share the same x value the line is vertical and the slope is undefined.
How to use
- Enter the x and y of the first point.
- Enter the x and y of the second point.
- Read the slope and the y-intercept.
Examples
- Rising line:
(1, 1) to (3, 7) has slope 3 - Flat line:
(2, 3) to (5, 3) has slope 0
FAQ
- How is slope calculated?
- Divide the change in y by the change in x. From (1, 1) to (3, 7) that is 6 divided by 2, which is a slope of 3.
- What does an undefined slope mean?
- When both points have the same x value the line is vertical. The change in x is zero, so the division has no answer and the slope is undefined.