Linear Equation Solver with Step-by-Step Solutions

Enter an equation in the form ax + b = c. Exact arithmetic runs locally in your browser, and your values are not sent anywhere.

Get the exact simplified answer, decimal value, equation type, every inverse operation, and an exact substitution check.

Enter ax + b = c

3x + 7 = 22

Use integers, finite decimals, or fractions such as -3/4. Enter 0 for a missing term.

Try an example

Solution

Answer
Enter values to begin.
Isolated equation
Equation type
Exact value
Decimal value
Verification

Advertisement

Step-by-step solution

The algebra steps will appear here.

Advertisement

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.

Explore more tools