Line Equation from Two Points

Find the slope-intercept equation through two points.

Equation y = 2x + 0
Slope (m) 2
y-intercept (b) 0

Formula: y = mx + b

Step-by-step with your numbers:
1. Values used:
2. x₁ = 1
3. y₁ = 2
4. x₂ = 3
5. y₂ = 6
6.
7. Equation = y = 2x + 0
8. Slope (m) = x₁ x y₁ = 1 x 2 = 2
9. y-intercept (b) = 0
Did we solve your problem today?

Build the equation of the line through two points.

The math behind it

slope m = (y₂−y₁)/(x₂−x₁); intercept b = y₁ − m·x₁; equation y = mx + b.

Worked example

(1,2) & (3,6) → y = 2x + 0.

FAQ

Vertical line?

Slope is undefined; the equation is x = constant.