Browse categories

Linear Equation Solver

Plug in a, b, and c to solve ax + b = c for x instantly, with full step-by-step working and a clear no-solution or infinite-solutions answer built in.

Last updated August 17, 2026

Examples

3x + 6 = 15 (a single, whole-number solution)

a:
3
b:
6
c:
15

x = 3 - subtract 6 from both sides to get 3x = 9, then divide by 3.

2x + 7 = -1 (negative coefficient, negative solution)

a:
2
b:
7
c:
-1

x = -4 - subtract 7 from both sides to get 2x = -8, then divide by 2. The sign of b or c does not change the method.

0x + 5 = 9 (no solution)

a:
0
b:
5
c:
9

No solution - with a = 0 the x term disappears, leaving 5 = 9, which is never true for any value of x.

0x + 4 = 4 (infinitely many solutions)

a:
0
b:
4
c:
4

Infinitely many solutions - with a = 0 the x term disappears, leaving 4 = 4, which is true no matter what x is.

FAQ

What is a linear equation?

A linear equation is an equation where the variable (usually x) appears only to the first power - no x^2, no square roots of x, and no x in a denominator - so its general form is ax + b = c, with a, b, and c as fixed numbers. Because the variable has no exponent, every linear equation with a real solution graphs as a straight line, which is where the name comes from.

How do you solve a linear equation for x?

You isolate x in two steps: first subtract b from both sides so the x term stands alone (ax = c - b), then divide both sides by a to get x = (c - b) / a. For example, in 3x + 6 = 15, subtracting 6 gives 3x = 9, and dividing by 3 gives x = 3 - exactly the calculation this calculator performs automatically.

What does it mean when a linear equation has no solution?

It means no value of x can ever make the equation true, which happens specifically when a = 0 and b does not equal c - the x term vanishes entirely and what is left is a false statement about numbers alone, like 5 = 9. This is a complete, valid mathematical answer, not an error: this calculator reports "No solution" directly rather than asking you to change your inputs.

What does it mean when a linear equation has infinitely many solutions?

It means every value of x makes the equation true, which happens specifically when a = 0 and b equals c - the x term vanishes and what is left is a statement that is always true regardless of x, like 4 = 4. For example, 0x + 4 = 4 holds no matter what number you substitute for x, so the equation has infinitely many solutions rather than one specific answer.

Why doesn't this calculator reject a = 0 as an invalid input?

Because 0x + b = c is still a completely valid equation, even though it no longer has a single unique numeric solution - unlike a quadratic equation, where a = 0 means the equation is not actually quadratic at all. This calculator checks whether b equals c and returns "Infinitely many solutions" or "No solution" accordingly, instead of rejecting your input, because both outcomes are mathematically meaningful answers, not errors.

Does it matter if a, b, or c is negative, or if the solution comes out as a decimal?

No - the subtract-then-divide method works identically no matter what sign the coefficients have or what type of number the answer turns out to be. Negative coefficients flip signs the normal way arithmetic already handles (2x + 7 = -1 correctly returns x = -4), and a solution that is not a whole number, like x = 1.6667 for 3x + 2 = 7, is simply rounded to 4 decimal places rather than treated as unusual.

How do I check that a solution is correct?

Substitute the solution back into the original equation in place of x and confirm both sides come out equal. For 3x + 6 = 15 with the solution x = 3: 3(3) + 6 = 9 + 6 = 15, which matches the right-hand side, so x = 3 is confirmed correct. This substitution check works for any linear equation and is worth doing whenever you want extra confidence in a result.

How is a linear equation different from a quadratic equation?

A linear equation has the variable only to the first power (ax + b = c) and has at most one solution, while a quadratic equation has the variable squared (ax^2 + bx + c = 0) and can have up to two solutions, found using the quadratic formula instead of simple isolation. If your equation includes an x^2 term, use the Quadratic Equation Solver instead of this calculator.

Can this calculator solve an equation with x on both sides, like 2x + 3 = x + 7?

Not directly - this calculator solves equations already in the single-variable form ax + b = c, where x appears on only one side. An equation with x on both sides needs to be rearranged into that form first (by moving every x term to one side), a step this calculator does not currently perform for you.

Why does my solution show extra decimal places instead of a clean number?

It is not a rounding error - the calculator simply displays (c - b) / a exactly as it comes out, rounded to 4 decimal places for readability, so 3x + 2 = 7 correctly shows x = 1.6667 rather than an approximation. When your inputs happen to divide evenly, such as 3x + 6 = 15 (x = 3), the result appears as a clean whole number with no trailing zeros.