Linear Equation Calculator
Enter both sides of an equation below to instantly solve for x.
Solve ax + b = cx + d for x
x =
-12
Solving a Linear Equation
For ax + b = cx + d: x = (d − b) / (a − c).
Worked example
Solve 3x + 5 = 2x − 7.
x = (−7 − 5) / (3 − 2) = −12 / 1
x = −12
Frequently Asked Questions
What is a linear equation?
A linear equation is one where the variable appears only to the first power — no squares, roots, or other exponents. Its graph is always a straight line.
How do you solve a linear equation with variables on both sides?
Move all the variable terms to one side and all the constants to the other, then divide to isolate the variable. For ax + b = cx + d, that gives x = (d − b) / (a − c).
What happens if both sides have the same coefficient on x?
If a equals c, the variable terms cancel out entirely. If what's left is a true statement (like 5 = 5), every value of x works. If it's false (like 5 = 7), there's no solution at all.
Related Calculators
- Quadratic Formula Calculator — Algebra
- Log Calculator — Algebra
- Exponent Calculator — Algebra
- Factoring Calculator — Algebra