Line Equation from Two Points Calculator

Find the equation of a line through two points, in slope intercept and standard form.

Result
—

How to calculate

Divide the change in y by the change in x, then substitute one point into y = mx + b to find b. For a vertical line, use x equal to the shared x-coordinate.

Worked example

Use First point x 1 · First point y 3 · Second point x 4 · Second point y 9. The result is y = 2x + 1.

Input notes

Enter integers, decimals, or fractions. Fractions in the result are in lowest terms.

OpenStax linear equation forms

Related calculators