Part of the Maths & Statistics suite · 235 calculators

Linear Equation Calculator

Find the equation of the straight line through two points: slope, y-intercept, slope-intercept and standard forms, plus the x-intercept.

The slope is the rise over the run, m = (y₂ − y₁) ÷ (x₂ − x₁).

Results update as you type
Results
Equation
y = 2x
Slope (m)
y-intercept (b)
x-intercept
Standard form
Angle to the x-axis
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows the Australian Curriculum (maths, brackets, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About linear equation

How the linear equation calculator works

The slope is the rise over the run, m = (y₂ − y₁) ÷ (x₂ − x₁). Substituting one point into y = mx + b gives the intercept b = y₁ − m x₁. A vertical line (x₁ = x₂) has no slope and is written x = constant.

Formula: m = (y₂ − y₁) / (x₂ − x₁); y = mx + b; b = y₁ − m x₁

Worked examples

InputsEquationNote
(1, 2) and (4, 8)y = 2xy = 2x + 0
(0, 3) and (6, 0)y = -0.5x + 3y = −0.5x + 3
(2, 5) and (2, 9)x = 2vertical: x = 2

Frequently asked questions

What is slope?

How much y changes for each unit of x: rise ÷ run. A slope of 2 rises 2 for every 1 across; negative slopes fall.

What is the y-intercept?

Where the line crosses the y-axis — the value of y when x = 0.

How do I write the line in standard form?

Ax + By = C with A, B, C usually integers; the calculator shows −mx + y = b.

What are parallel and perpendicular slopes?

Parallel lines share a slope; perpendicular slopes multiply to −1 (2 and −½).

What if the two points have the same x?

The line is vertical, x = constant, and has no slope.

Where these figures come from

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.