Skip to main content

Solve for x Calculator

Try an example:

This solve for x calculator gets one letter alone, whether the rest of the equation is numbers or other letters. Use it for simple equations and for rearranging formulas. It is free, it shows each undo step, and it is part of our larger math solver.

How to Use the Solve for x Calculator

Enter the Equation

Type it with an equals sign, such as 3x-5=10 or 2x+3y=12.

Choose the Letter

With no instructions, it solves for xx. To pick another letter, add words at the end: A=pi*r^2, solve for r.

Read the Steps

Each step undoes one thing and shows what is left. When a step divides by a letter, a note reminds you that it can't be zero.

What Does "Solve for x" Mean?

To solve for x means to find the value that makes the equation true, or to rewrite the equation so x is alone on one side. If every other part is a number, you get a number. If other letters remain, you get an expression in those letters.

So 3x−5=103x-5=10 gives a number, x=5x=5. But 2x+3y=122x+3y=12 gives a rule, x=12−3y2x=\dfrac{12-3y}{2}, because xx depends on yy.

How to Solve for a Variable

The balance rule is simple: what you do to one side, you do to the other. Each operation has an inverse operation that undoes it.

What is done to the letterInverse operation
Add 5Subtract 5
Subtract 5Add 5
Multiply by 3Divide by 3
Divide by 3Multiply by 3
Square itTake ±\pm the square root
Take the square rootSquare it

Solve for x calculator diagram: to undo times 3 then minus 5, first add 5 and then divide by 3

Undo Adding and Subtracting

Think of getting dressed: socks first, then shoes. To undo it, shoes come off first. In 3x−53x-5 the last thing done was subtracting 5, so undo that first.

Undo Multiplying and Dividing

Next, divide by whatever multiplies the letter. If the letter shows up in two terms, such as ax−bxax-bx, factor it out first: x(a−b)x(a-b). Then divide by a−ba-b.

Undo Powers and Roots

Powers come last. Taking a square root gives two answers, one positive and one negative. In a real situation, such as a radius, only the positive one makes sense.

Which order should you use? Clear parentheses and fractions, gather every term that has your letter on one side, undo adding, then multiplying, then powers.

Worked Examples

Example 1: The Letter on Both Sides

Solve 3(x+2)=x+143(x+2)=x+14.

  1. Distribute the 3: 3x+6=x+143x+6=x+14.
  2. Subtract xx from both sides: 2x+6=142x+6=14.
  3. Subtract 6: 2x=82x=8.
  4. Divide by 2: x=4x=4.

Check: 3(4+2)=183(4+2)=18 and 4+14=184+14=18.

Example 2: A Linear Literal Equation

Solve 2x+3y=122x+3y=12 for xx.

  1. Subtract 3y3y from both sides: 2x=12−3y2x=12-3y.
  2. Divide both sides by 2: x=12−3y2x=\dfrac{12-3y}{2}.

You can't go further, because yy is not known.

Example 3: A Formula With a Square

Solve A=πr2A=\pi r^2 for rr. This is the area of a circle.

  1. Divide both sides by π\pi: Aπ=r2\dfrac{A}{\pi}=r^2.
  2. Take square roots: r=Aπr=\sqrt{\dfrac{A}{\pi}} or r=−Aπr=-\sqrt{\dfrac{A}{\pi}}.

A radius can't be negative, so for a circle you keep the first one. The calculator shows both, because the equation alone does not know rr is a length.

Common Mistakes to Check

Moving a Term Without Changing Its Sign

A term does not jump across the equals sign. You subtract it from both sides. So x+7=10x+7=10 becomes x=10−7x=10-7, not x=10+7x=10+7.

Dividing by Something That Could Be Zero

Dividing by 3 is always safe. Dividing by a letter is only safe when the letter is not zero. Write that down, for example "if a≠0a\neq 0."

Stopping Before the Check

Put your answer back into the first equation. It takes a few seconds, and it catches most sign errors.

Practice Problems

  1. Solve 7x+2=307x+2=30 for xx.
  2. Solve 4x+y=204x+y=20 for xx.
  3. Solve y=mx+by=mx+b for mm.
  4. Solve P=2l+2wP=2l+2w for ww.
  5. Solve ax=bx+cax=bx+c for xx.
Show the answers
  1. x=4x=4
  2. x=20−y4x=\dfrac{20-y}{4}
  3. m=y−bxm=\dfrac{y-b}{x}, if x≠0x\neq 0
  4. w=P−2l2w=\dfrac{P-2l}{2}
  5. x=ca−bx=\dfrac{c}{a-b}, if a≠ba\neq b

Related Calculators

Learn More

FAQ

What Is a Literal Equation?

It is an equation with two or more letters, such as P=2l+2wP=2l+2w. Formulas are literal equations. Since this page accepts them, you can use it as a literal equation calculator.

How Do You Get x by Itself?

Undo everything around it in reverse order. Remove added or subtracted terms first, then multipliers and divisors, then powers or roots.

Can I Solve for a Letter Other Than x?

Yes. Add "solve for" and the letter at the end, such as V=1/3*pi*r^2*h, solve for h. Here the answer is h=3Vπr2h=\dfrac{3V}{\pi r^2}.

What If x Is on Both Sides of the Formula?

Collect every term with xx on one side, factor out the xx, then divide. Problem 5 above is an example.

Does It Solve Quadratics for x?

Yes, when the letter is squared you get up to two answers. For the full working with a graph, use the quadratic formula calculator. For other equation types, such as logs, try the equation solver.


Next step: take one formula from your science or geometry class and use the solve for x calculator to solve for a variable you have never isolated before.