Slope & Line Equation
Given two points, this tool computes the slope m = (y₂ − y₁)/(x₂ − x₁), the y-intercept, and the equation of the line in both slope-intercept (y = mx + b) and point-slope forms. Vertical and horizontal lines are detected automatically.
Frequently asked questions
How is slope calculated?
Slope is the change in y divided by the change in x: m = (y₂ − y₁)/(x₂ − x₁).
What about a vertical line?
If the two x-values are equal the slope is undefined; the tool returns the vertical line x = constant.
Which line forms are given?
Both the slope-intercept form y = mx + b and the point-slope form y − y₁ = m(x − x₁).