Equation Solver

Type a linear equation and get the answer, every step that gets there, and the check that proves it

Type an equation with one unknown letter, such as 3c − 15 = −45 or 2(x + 3) = 4x − 5, and the solver works it out the way you would on paper: tidy each side, gather the letter on one side, move the numbers to the other, then divide. The answer is exact, so a result such as 11/2 stays a fraction rather than turning into a rounded decimal, and the last line substitutes it back into the original equation so you can see both sides come out equal.

How to solve a linear equation, step by step

An equation is a balance: whatever you do to one side you must do to the other, and it stays true. Solving means undoing what has been done to the unknown, in the reverse order. In 3c − 15 = −45 the letter c was multiplied by 3 and then had 15 taken away, so you undo the subtraction first by adding 15 to both sides, which gives 3c = −30, and then undo the multiplication by dividing both sides by 3, which gives c = −10.

When the unknown appears on both sides, move it to one side first. In 5y + 3 = 2y + 18, subtracting 2y from both sides leaves 3y + 3 = 18. From there it is an ordinary two-step equation: subtract 3 to get 3y = 15, then divide by 3 to get y = 5.

Brackets, fractions and decimals

Expand brackets before anything else: 2(x + 3) becomes 2x + 6, and a minus sign in front of a bracket flips every sign inside it, so −(x − 4) becomes −x + 4. The solver does this for you and shows the tidied equation as its first step.

Fractions are handled exactly. x/4 + 2 = 5 means a quarter of x plus 2, so subtract 2 and multiply both sides by 4. Decimals are converted to fractions before any arithmetic, which is why 0.5n − 1.25 = 2 comes out as exactly 13/2 rather than a number with a rounding error in the last place.

When there is no answer, or every number is an answer

Sometimes the letter cancels out completely. If what is left is true, such as 2 = 2, every value of x works and the equation is an identity. If what is left is false, such as 2 = 5, no value can make it true and the equation has no solution. The solver says which of the two happened instead of printing a misleading number.

What this solver does not do

It solves linear equations in one unknown: the letter appears only to the first power and is never multiplied by itself or divided into anything. An equation such as x × x = 4 is quadratic and has two answers, and 2/x = 1 needs both sides multiplied by x first. Rather than guess, the solver explains why it stopped, so you know which method to use next.

Frequently asked questions

What is c in 3c − 15 = −45?

c = −10. Add 15 to both sides to get 3c = −30, then divide both sides by 3. Check: 3 × (−10) − 15 = −30 − 15 = −45.

How do you solve a two-step equation?

Undo the addition or subtraction first, then the multiplication or division. For 4x + 7 = 31, subtract 7 to get 4x = 24, then divide by 4 to get x = 6.

How do you solve an equation with x on both sides?

Subtract the smaller x term from both sides so the letter is on one side only, then solve the two-step equation that is left. 5x + 3 = 2x + 18 becomes 3x + 3 = 18, so x = 5.

Can I use any letter, not just x?

Yes. Type the equation with whatever letter your worksheet uses, such as c, n or y. The solver works with one unknown at a time, so it will stop if two different letters appear.

Why is my answer a fraction?

Because the exact answer is not a whole number. 2x = 3 has the answer 3/2, which is 1.5. The solver shows both the fraction and the decimal, and the fraction is the one to write down when a question asks for an exact answer.