Skip to content

Linear Equation Solver

Solve equations like 5x − 7 = 3x + 9 or (x + 1)/2 = (2x − 3)/3. The solver expands, collects like terms, isolates x and tells you when there is no solution or infinitely many.

Your problem will appear here as you type.

How to use the linear equation solver

  1. Type a linear equation with one unknown.
  2. Press Solve to get x and the steps.
  3. Use the check line to confirm both sides are equal.

How linear equations work

A linear equation has the unknown only to the first power, like 5x − 7 = 3x + 9. The goal is always to get x alone, and the rule is simple: whatever you do to one side, do to the other.

Method in four moves

  1. Remove brackets and fractions. Multiply every term by the common denominator.
  2. Collect the x terms on one side and the numbers on the other.
  3. Combine like terms.
  4. Divide by the coefficient of x, then check by substituting.

Example: variables on both sides

Solve 5x − 7 = 3x + 9

  1. Subtract 3x from both sides: 2x − 7 = 9.
  2. Add 7 to both sides: 2x = 16.
  3. Divide by 2: x = 8.
  4. Check: 5(8) − 7 = 33 and 3(8) + 9 = 33.

Answer: x = 8

Example: fractions

Solve (x + 1)/2 = (2x − 3)/3

  1. Cross-multiply, which is the same as multiplying both sides by 6: 3(x + 1) = 2(2x − 3).
  2. Expand: 3x + 3 = 4x − 6.
  3. Move terms: 3 + 6 = 4x − 3x, so x = 9.
  4. Check: (9 + 1)/2 = 5 and (18 − 3)/3 = 5.

Answer: x = 9

Special cases: no solution and infinitely many

Parallel lines never meet, which is the graph of the first case. Two identical lines meet everywhere, which is the second.

EquationAfter simplifyingResult
2x + 3 = 2x + 53 = 5, which is falseNo solution
2(x + 1) = 2x + 22 = 2, which is always trueEvery real number is a solution

Frequently asked questions

Can I solve equations with decimals?

Yes. Type them as they are, for example 0.5x + 1.2 = 3.7. The solver gives x = 5.

What about two unknowns?

Use the system of equations solver. One linear equation in two unknowns has infinitely many solutions; two independent equations pin down one pair.

Other calculators