Line equation calculator

Find the equation of a line through two points. Shows slope-intercept (y=mx+b), point-slope, and standard form.

Point 1 ( , )
Point 2 ( , )

Line equation forms

Slope-intercept: y = mx + b (m = slope, b = y-intercept)

Point-slope: y − y₁ = m(x − x₁)

Standard form: Ax + By = C (A, B, C are integers)

Finding slope from two points

m = (y₂ − y₁)/(x₂ − x₁)

Points (1,2) and (4,6): m = (6−2)/(4−1) = 4/3

Special cases

Horizontal line: m = 0, equation is y = b.

Vertical line: m is undefined, equation is x = a.

Parallel lines: Same slope, different intercept.

Perpendicular lines: Slopes multiply to −1 (m₁ × m₂ = −1).

Popular line problems
Related calculators