Maths & numbers

Linear equation solver with balancing steps

Solve ax+b=cx+d with balancing steps, substitution checks and a graph of the two linear expressions.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Try it, understand it

Explore the result

Compare a unique solution with the two cases where all variable terms cancel.

Worked example comparison
ExampleOutputWhat to notice
One intersectionSolution for x42x+3=x+7 gives x=4.
Identical expressionsSolution for xEvery real number2x+3=2x+3 holds for every real number.
Parallel unequal expressionsSolution for xNo solution2x+3=2x+7 has no solution.

Check your understanding

Can dividing by zero reveal a root?

No. When collected coefficients vanish, evaluate the constant equality instead.

Does a negative coefficient reverse an equality?

No. Division by a nonzero negative coefficient preserves equality. The reversal rule belongs to inequality order.

Behind the numbers

How this calculation works

Subtract the right-side variable term from both sides and subtract the left constant from both sides. Divide by the remaining nonzero coefficient. If that coefficient is zero, evaluate the resulting constant statement instead: it can hold for every real x or for none.

THE FORMULA(a−c)x = d−b; if a−c ≠ 0, x=(d−b)/(a−c)

A worked example

For 2x+3=x+7, subtract x and then 3 to get x=4. Substitution gives 11 on each side. In 2x+3=2x+3 every real number works; in 2x+3=2x+7 no value works.

Good to know

Numeric decimal coefficients only, each between −10¹² and 10¹². The model is linear; it does not parse equations as text or solve products, powers or variable denominators. Working arithmetic uses 40 significant digits, and displayed answers are rounded.

A little curiosity

Balancing operations preserve the same solutions

An equation states that two expressions have equal values. Adding or subtracting the same amount on both sides preserves that equality. Dividing both sides by the same nonzero number also preserves it. These balancing operations explain the steps instead of treating a symbol as though it physically jumps across an equals sign.

The linear inequality solver uses related collection steps but has an extra sign-reversal rule when dividing by a negative number. An equality does not reverse direction in that way. This equation page can represent variables on either side through the coefficients a and c.

Use the four coefficient fields to represent the equation

Enter 2x+3=x+7 as a=2, b=3, c=1 and d=7. Collecting gives (2−1)x=7−3, so x=4. Substitute that value into the original two expressions: both are 11. The graph shows where those two lines intersect, which is the same equality condition.

A one-step equation also fits the same form. For 5x=20, use a=5, b=0, c=0 and d=20. For x−6=10, use a=1, b=−6, c=0 and d=10. Negative coefficients and zero constants are ordinary valid inputs; they do not require a separate calculator page.

Zero coefficients need a logical check

If both sides have the same variable coefficient, collecting the x terms gives zero. When the constants also agree, every real number satisfies the equation. When they differ, no real number does. Dividing by that zero coefficient would be invalid and would hide the distinction between these cases.

The equation of a line calculator describes a line from its own inputs, while this tool finds where two entered linear expressions agree. A rounded recurring-decimal root may show a very small substitution residual because display precision is finite. That residual should not be mistaken for a different exact algebraic problem.

A few questions, answered

Can this solve a one-step equation?

Yes. Set unused coefficients or constants to zero so that your equation has the displayed ax+b=cx+d form.

What does every real number mean?

The two expressions are identical under the entered coefficients, so the equality holds for every real x.

Can I enter x squared?

No. This form is linear. Use the quadratic equation solver for a supported second-degree equation.

Find your calculator

Start typing to explore the library.