Line Equation Calculator

Find the equation of the line through two points.

Negative numbers and fractions work.
Line Equation
Slope (m)
Equation
Standard form
Midpoint
Distance
Angle from the x-axis
Work

Saved Calculations

Items you add are saved in this browser.

NameCalculationResultRemove

Line Equation Formula

m = (y₂ − y₁) ÷ (x₂ − x₁)   b = y₁ − m x₁   y = mx + b

Point-slope form y − y₁ = m(x − x₁) gives the same line.

Worked Example

Tips

Fractions work in the boxes (1/2). The graph marks both points and the midpoint (hollow circle); the dashed lines show the run and rise.