Equation of a Line Calculator

This calculator finds the equation of a line given different types of input: two points, a point and slope, or slope and y-intercept. It displays the equation in slope-intercept form (y = mx + b), standard form (ax + by = c), and point-slope form.

Two points: (x1, y1) and (x2, y2)

Forms of line equations

Slope-intercept: y = mx + b
Point-slope: y - y1 = m(x - x1)
Standard: ax + by = c
From two points: m = (y2-y1)/(x2-x1)

Line equations: frequently asked questions

What are the different forms of a line equation?

Slope-intercept (y = mx + b), point-slope (y - y1 = m(x - x1)), and standard form (ax + by = c) are the most common forms.

When should I use each form?

Use slope-intercept to quickly identify slope and y-intercept. Use point-slope when you know a point and slope. Use standard form for general purposes or when the line has no y-intercept.

How do I convert between forms?

Algebraically rearrange the equation: expand, collect terms, isolate y, or convert to standard form by multiplying and collecting.

Can every line be written in all three forms?

Slope-intercept form cannot represent vertical lines (undefined slope). Standard and point-slope forms can represent all lines.

What is the formula for standard form?

Standard form is ax + by = c, where a, b, c are integers and a is typically positive.

Methodology

Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.