Work out slope from two points instantly with clear inputs, formula shown and shareable results.
The gradient is the rise over the run, (y₂ − y₁)/(x₂ − x₁). Substituting one point into y = mx + c then recovers the intercept.
Gradient
m = (y₂ − y₁) / (x₂ − x₁)
Intercept
c = y₁ − m·x₁
12/6 = 2, and the line is y = 2x − 1.
Because the run is zero, so the ratio divides by zero. Such lines are written x = k instead.