Linear Equation Solver

Solve a one-variable linear equation ax + b = 0 and find the value of x.
x =
3

The value of x that makes ax + b = 0.

Formula
x = −b ÷ a
Examples
InputResult
a = 2, b = -6x = 3
a = 5, b = 10x = -2

About this calculator

A linear equation in one variable has the form ax + b = 0, where a and b are known constants and x is the unknown. As long as a is not zero, there is exactly one solution: x = −b ÷ a. You simply move the constant to the other side and divide by the coefficient of x.

There are two special cases. If a = 0 and b ≠ 0 the equation reduces to b = 0, which is false, so there is no solution. If both a = 0 and b = 0 the equation becomes 0 = 0, which is always true, meaning every number is a solution.

Frequently asked questions

Subtract b from both sides to get ax = −b, then divide both sides by a to get x = −b ÷ a, provided a is not zero.

If a = 0 the term with x disappears. With b ≠ 0 there is no solution, and with b = 0 every value of x works (infinitely many solutions).

Yes. Rewrite the equation so one side is 0 (here 3x − 6 = 0), then enter a = 3 and b = −6 to get x = 2.

Did this calculator help you?