100% free no uploads no sign-up

linear equation solver

To solve a linear equation, get every x term on one side and every number on the other, then divide by the number in front of x. Type yours below to see each step, from expanding brackets to the final check.

mode: solve

Enter solves · Shift+Enter for a new line · put systems on separate lines or separate them with commas

problem
3(x + 2) = 2x − 1
answer
x = −7

✓ checked: substituting the answer back into the equation makes both sides equal.

step-by-step working

  1. Expand any brackets and collect like terms on each side.

    3x + 6 = 2x − 1
  2. Subtract 2x from both sides to get the x terms together.

    x + 6 = −1
  3. Subtract 6 from both sides.

    x = −7

The method

The rule behind every step is balance: whatever you do to one side, you do to the other. That keeps the two sides equal, so the value of x that works at the end also worked at the start.

Worked examples

2x + 3 = 11

answer
x = 4

✓ checked: substituting the answer back into the equation makes both sides equal.

step-by-step working

  1. Subtract 3 from both sides.

    2x = 8
  2. Divide both sides by 2.

    x = 4

5x − 3 = 2x + 9

answer
x = 4

✓ checked: substituting the answer back into the equation makes both sides equal.

step-by-step working

  1. Subtract 2x from both sides to get the x terms together.

    3x − 3 = 9
  2. Add 3 to both sides.

    3x = 12
  3. Divide both sides by 3.

    x = 4

x/2 + 1 = 5

answer
x = 8

✓ checked: substituting the answer back into the equation makes both sides equal.

step-by-step working

  1. Multiply both sides by 2 to clear the fractions.

    x + 2 = 10
  2. Subtract 2 from both sides.

    x = 8

When there's no single answer

Sometimes the x terms cancel completely. If what's left is true, such as 3 = 3, every number is a solution (the two sides are the same expression). If it's false, such as 3 = 5, there is no solution at all (the two sides are parallel lines that never meet). The solver tells you which case you have.

Common mistakes

Solved equations

Frequently asked questions

What makes an equation linear?

x appears only to the power 1: no x², no √x and no x in a denominator. Its graph is a straight line, and it has exactly one solution unless the x terms cancel.

Can it solve equations with fractions?

Yes. It multiplies both sides by the lowest common denominator first, so x/2 + 1 = 5 becomes x + 2 = 10. Equations with x in the denominator, like 1/x + 1 = 3, are solved too, and values that would make a denominator zero are rejected.

Can I use a letter other than x?

Yes. Any single letter works. If there is more than one letter, it solves for x and treats the others as constants; type "for y" at the end to choose a different letter.

How do I check my answer by hand?

Substitute it into the original equation and work out both sides separately. For 2x + 3 = 11 and x = 4: the left side is 2·4 + 3 = 11, which matches the right side.

More math tools