How to solve a linear equation
A one-variable linear equation has the variable only to the first power. For ax + b = c, undo addition or subtraction first, then undo multiplication:
x = (c โ b) / a, when a โ 0
1. Isolate the x term
Subtract b from both sides. This keeps the equation balanced and gives ax = c โ b.
2. Divide by the coefficient
When a โ 0, divide both sides by a. Reduce the resulting fraction if possible.
3. Check by substitution
Replace x in the original left side. A correct solution makes ax + b exactly equal c.
4. Handle a = 0
If the x term vanishes, compare b and c. Equal values mean all real numbers work; unequal values mean none work.
Worked examples
Integer solution
For 3x + 7 = 22, subtract 7: 3x = 15. Divide by 3: x = 5. Check: 3(5) + 7 = 22.
Fraction solution
For 3x + 1 = 0, subtract 1: 3x = โ1. Divide by 3: x = โ1/3.
Infinite solutions
For 0x + 5 = 5, the variable term is zero and both constants match. The statement is always true, so every real number is a solution.
No solution
For 0x + 5 = 8, the variable term is zero but 5 โ 8. No value of x can make the equation true.
Calculation method, privacy, and limits
Integers, fractions, and finite decimals are converted to reduced fractions and processed with BigInt arithmetic. Exact answers and verification do not rely on floating-point rounding. Decimal answers are shown to up to 12 significant digits.
Each numeric part is limited to 30 digits to keep browser calculations responsive. Scientific notation and repeating-decimal notation are not accepted; enter an exact fraction instead. All solving happens in your browser, and the calculator does not transmit or store equation inputs. Last reviewed: 4 August 2026.
Linear equation FAQs
How do I solve ax + b = c?
Subtract b from both sides, then divide both sides by a. When a โ 0, x=(cโb)/a.
What happens when a = 0?
The variable disappears. If b=c, every real number is a solution. If bโ c, the equation has no solution.
Can a linear equation have a fractional answer?
Yes. The exact answer is reduced automatically. For example, 3x+1=0 gives x=โ1/3.
Can I enter fractions and decimals?
Yes. Each field accepts integers, finite decimals, or fractions such as -3/4. Finite decimals are converted to exact fractions.
How does the solver check the answer?
It substitutes the exact solution into ax+b and compares the resulting fraction with c.
Is this solver private?
Yes. The equation is calculated locally in your browser; the solver does not send or store the coefficients you enter.