Skip to content
Tool Corner

Algebra Calculator

Solve a linear equation of the form ax + b = cx + d for x, with every rearranging step shown.

Built and verified by Jogeswar, MSc, PMP — Tool CornerMethod and figures checked against the sources listed below
Solution
{{ xOut }}
Equation{{ eqOut }}
Collect x terms{{ step1 }}
Collect constants{{ step2 }}
Divide{{ step3 }}
Check{{ checkOut }}
{{ verdict }}
Next step

What next?

Solving for x is step one. These handle the specific forms.

What your result means

Solving a linear equation means finding the single value of x that makes both sides equal. The steps shown are the standard method: move all x terms to one side, move all constants to the other, then divide. Two special cases exist — if the x terms cancel and the constants match, every number works; if they cancel and the constants differ, nothing does.

Why this one is different

Alongside the value of x, three lines show the equation being rearranged — x terms collected, constants moved, both sides divided — and a closing line substitutes the answer back into what you typed so you can watch it balance. An equation with no solution, or one every number satisfies, is named as such rather than returned as a stray zero.

Why the steps matter

An equation is a balance, not an instruction

The equals sign says the two sides weigh the same. Anything you do to one side must be done to the other, which is the entire justification for "moving" a term across — you are really subtracting it from both sides at once.

Once that clicks, the rules stop feeling arbitrary. You are not following a recipe; you are keeping a balance level while simplifying what sits on each pan.

How it works

Subtracting cx from both sides collects the x terms as (a − c)x. Subtracting b from both sides collects the constants as (d − b). Dividing gives x directly, provided a − c is not zero — if it is, the equation has either no solution or infinitely many.

How to use this calculator

  1. Write your equation in the form ax + b = cx + d.
  2. Enter the four coefficients — use 0 where a term is absent.
  3. Read the solution and follow the rearranging steps beneath it.
  4. Use the check row to confirm both sides balance.

Formula

ax + b = cx + d   →   x = (d − b) ÷ (a − c)

Valid whenever a ≠ c. If a = c and b = d there are infinitely many solutions; if a = c and b ≠ d there are none.

Example calculation

Solving 3x + 7 = x + 19:

Subtract x from both sides: 2x + 7 = 19
Subtract 7 from both sides: 2x = 12
Divide by 2: x = 6
Check: 3(6) + 7 = 25 and 6 + 19 = 25 ✓

Frequently asked questions

What if my equation has no x on the right?

Set c to 0. An equation like 5x − 4 = 11 becomes a = 5, b = −4, c = 0, d = 11.

Can it solve quadratics?

No — this handles linear equations only, where x appears to the first power. For equations containing x², use the quadratic equation calculator.

What does "no solution" mean?

It means the x terms cancel out entirely but the remaining constants disagree, as in x + 1 = x + 2. Since no value of x can make 1 equal 2, the equation is never true.

How do I check my own answer?

Substitute the solution back into the original equation and confirm both sides match. It takes seconds and catches nearly every sign error.

What does it mean when an equation has no solution?

The variables cancel and leave a false statement, such as 3 equals 5. That means no value of x satisfies the equation. If the leftover statement is true, such as 0 equals 0, every value works.

Why do I flip the sign in an inequality?

Because multiplying or dividing both sides by a negative number reverses the order of the number line. Minus 2x greater than 6 becomes x less than minus 3.

What is the order of operations to rearrange?

Undo the operations in reverse: addition and subtraction first, then multiplication and division, then powers and roots. That mirror image of BODMAS is what isolating a variable actually is.

Related calculators

Assumptions & limitations

Every figure here comes from a simplified model. Keep these limits in mind when reading your result:

  • Handles linear equations only — one unknown, raised to the first power.
  • Coefficients are treated as decimals; results are shown to four decimal places.
  • Does not simplify expressions with brackets or fractions before solving — rearrange to ax + b = cx + d first.

Formula & reference

Further reading

These results are maths, not advice

This tool applies a fixed formula to the numbers you type in, so the arithmetic is exact — but the answer is only as good as the inputs and the assumptions listed above. Results are rounded for display, so a figure you copy out may differ in the last decimal place from one you calculate by hand. Check anything consequential before you act on it.

The formula on this page is verified against the references listed below. Read the full disclaimer.

Sources & references

The methods used here are standard results in elementary mathematics. Further reading:

Found an error? Report it →
Last updated
Found this useful? Share it
Help someone else find this free tool.