Written and reviewed byMuhammad ShahidHow we verify calculations
How to Solve for a Variable in a Formula
A literal equation holds several letters: A = lw, d = rt, F = ma. Solving for one of them means rearranging the formula until that letter stands alone. This page covers the method, 7 worked examples, and the mistakes that silently break the algebra. For equations with a single letter and real numbers, use the equation solver instead.
What makes an equation literal
A normal linear equation has one unknown and numbers: 2x + 3 = 7. A literal equation keeps the quantities as letters, because the relationship matters more than any single answer. A = lw is the area of a rectangle for every width and length at once.
Homework problems phrase this as "solve for c" or "solve for t": rearrange until the named letter is alone.
The method
Step 1: Name your letter
Decide which variable you are solving for. Every move you make serves that letter.
Step 2: Move the terms that contain it
Add or subtract so every term with your letter sits on one side. In P = 2l + 2w, subtract 2w to get P - 2w = 2l.
Step 3: Factor the letter out
If the letter appears in several terms, factor it: 2l becomes l ยท 2. In 1/5 gc = r, the c sits inside one product already.
Step 4: Divide by everything attached to it
Divide both sides by what multiplies the letter. If you have a fraction like (6 - 2x)/3, divide both numerator terms by 3, not just one.
Worked examples
Seven rearrangements, from the classic geometry formulas to the ones that show up in physics word problems.
A = lw, solve for l
Both sides divided by w: A/w = lw/w
Simplify: l = A/w
l = A/w
Check: (A/w) ยท w = A
d = rt, solve for t
Both sides divided by r: d/r = rt/r
Simplify: t = d/r
t = d/r
Check: r(d/r) = d
1/5 gc = r, solve for c
Multiply both sides by 5: gc = 5r
Divide both sides by g: c = 5r/g
c = 5r/g
Check: (1/5)g(5r/g) = r
2x + 3y = 6, solve for y
Subtract 2x from both sides: 3y = 6 - 2x
Divide every term by 3: y = (6 - 2x)/3
Simplify: y = 2 - (2/3)x
y = 2 - (2/3)x
Check: 2x + 3(2 - (2/3)x) = 2x + 6 - 2x = 6
P = 2l + 2w, solve for l
Subtract 2w from both sides: P - 2w = 2l
Divide both sides by 2: l = (P - 2w)/2
Simplify: l = P/2 - w
l = P/2 - w
Check: 2(P/2 - w) + 2w = P - 2w + 2w = P
t/(4dยฒ - 4) = r, solve for t
Multiply both sides by (4dยฒ - 4): t = r(4dยฒ - 4)
t = 4rdยฒ - 4r
Check: (4rdยฒ - 4r)/(4dยฒ - 4) = r
F = ma, solve for a
Both sides divided by m: F/m = ma/m
Simplify: a = F/m
a = F/m
Check: m(F/m) = F
Common mistakes
Dividing only one term
In 2x + 3y = 6, solving for y means dividing 6 and 2x by 3. Dividing only the 2x term gives a wrong formula.
Leaving the letter in two places
The job is done only when your letter appears once, alone, on one side. If it still sits inside a product or fraction, keep going.
Dropping the exponent when moving a factor
In t/(4dยฒ - 4) = r, the whole denominator (4dยฒ - 4) moves together when you multiply. Splitting it term by term changes the equation.
When to use the equation solver instead
If every letter but one has a number in it, type the equation into the equation solver and it returns the value with each step. The solver also works with letters other than x, so 22t + 10 = 98 comes back as t = 4 without any renaming. Equations with two unknowns at once need a different setup; the solver explains its limits in the solve for a variable other than x FAQ.
Frequently Asked Questions
What is a literal equation?
A literal equation contains two or more letters, such as A = lw or F = ma. The letters stand for quantities, and the equation states how they relate. Formulas in physics, chemistry, and finance are literal equations.
What does it mean to solve for a variable?
You rearrange the equation until the chosen letter stands alone on one side: l = A/w instead of A = lw. Everything else stays on the other side as an expression. The result is a formula you can plug numbers into.
How do I know whether to add, subtract, multiply, or divide?
Undo whatever touches the letter you want. If the letter is multiplied by 2, divide. If 2w is added to 2l, subtract 2w first. Work backwards through the operations that wrap around your letter.
Why does the whole side get divided, not just one term?
An equation stays balanced only when the same operation hits every term. Solving 2x + 3y = 6 for y means dividing 6 and 2x by 3, not only 2x. Skipping a term is the most common error in literal equations.
Can the equation solver solve literal equations?
The equation solver handles one variable at a time, so it works once you substitute the numbers you know, or once you have rearranged for a single letter. See how it handles other variables before you start.

Reviewed by Muhammad Shahid
Writer & Calculator ReviewerWrites and reviews calculator content across marketing, finance, health, and math at GM Calculator.
Last reviewed: November 4, 2026