Solve for x calculator

Enter any equation to get x on its own, one balanced move at a time. It works for formulas too: pick which letter to solve for.

Use ^ for powers, sqrt() for roots, |x| for absolute value, and separate a system with ;.

Try:

How to solve for x

Every step uses an inverse operation, which undoes something that was done to x. The one rule: whatever you do to one side, do to the other, so the equation stays true.

If x has been…Undo it by…Example
added tosubtractingx+4=9⇒x=5x+4=9 \Rightarrow x=5
subtracted fromaddingx−4=9⇒x=13x-4=9 \Rightarrow x=13
multiplieddividing3x=12⇒x=43x=12 \Rightarrow x=4
dividedmultiplyingx3=5⇒x=15\tfrac{x}{3}=5 \Rightarrow x=15
squaredsquare-rooting (±)x2=49⇒x=±7x^2=49 \Rightarrow x=\pm 7

Undo in reverse order: deal with the added or subtracted numbers first, then the multiplier. For formulas, see the literal equation solver.

Why “do the same to both sides” works

An equation is a balanced scale. Use the buttons to get one bag of x alone on the left pan.

xxx

3x+4=103x + 4 = 10

Three bags of x plus 4 blocks balance 10 blocks. Every bag weighs the same.

Frequently asked questions

What does “solve for x” mean?
Find the value (or values) of x that make the equation true, by rearranging it until x stands alone on one side.
How do I solve for x when it’s on both sides?
Add or subtract so all the x-terms end up on one side and the numbers on the other. For 5x − 3 = 2x + 9, subtract 2x from both sides (3x − 3 = 9), add 3 (3x = 12), then divide by 3 (x = 4).
Can I solve for a letter other than x?
Yes. Type a formula such as v = u + at and choose the letter you want in the “Solve for” menu that appears.
What if x is squared?
Then it’s a quadratic. The solver will factor it, take square roots, or use the quadratic formula, and give both solutions.