Skip to content
MasterMath

Linear Equation Calculator

Solve any equation of the form ax + b = cx + d in one step, and see both sides come out equal when you substitute the answer back.

Solution

—

Solution—
Coefficient after collecting—
Constant term—
Check—

How it was solved

    The formula

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

    Why it works

    A linear equation says two expressions are equal. Solving it means isolating x, and the only rule you need is that whatever you do to one side you do to the other. Collect the x terms on one side, the numbers on the other, and divide.

    How to solve it by hand

    1. Move every x term to the left by subtracting cx from both sides
    2. Move every constant to the right by subtracting b from both sides
    3. You now have (a − c)x = d − b
    4. Divide both sides by (a − c)

    What is worth knowing

    Two cases catch people out, and both happen when a equals c. If the constants also match, the x cancels and you are left with something like 5 = 5: true for every value, so the equation has infinitely many solutions. If the constants differ, you get 5 = 7, which is false for every value, so there is no solution at all. Neither is an error in your working — they are genuine answers, and recognising them is most of what a first algebra course is teaching.

    Frequently asked questions

    How do you solve a linear equation?

    Collect the x terms on one side and the numbers on the other, then divide by the coefficient of x.

    What if the x disappears?

    Then the equation is either always true (infinitely many solutions) or never true (no solution), depending on whether the remaining numbers match.

    Why can I move a term across the equals sign?

    Because you are really subtracting it from both sides. Moving it and flipping the sign is the shortcut for that.

    Does this work with fractions or decimals?

    Yes. The method is the same; multiplying through by the denominators first often makes the arithmetic easier.