Variables and Expressions

Solving a Formula for a Different Variable

Learn a dependable method for rearranging any formula so the letter you want stands alone, with worked examples and checks.

Key takeaways

  • Choose the target letter first, then treat all other letters as fixed numbers.
  • Undo operations in the reverse of the order in which they would be applied to the target letter.
  • Whenever you divide by a letter or an expression, state that it cannot equal zero.
  • Check a rearranged formula by testing it with easy numbers in both versions.

To solve a formula for a different variable, pick the letter you want, treat every other letter as if it were a known number, and undo the operations around your chosen letter one at a time. Do the same thing to both sides at each step. You finish when that letter stands alone on one side and does not appear on the other.

For example, the formula for the perimeter of a rectangle, P = 2l + 2w, is set up to give P. If you know the perimeter and the length and want the width, you rearrange it once to get w = (P - 2l) ÷ 2, and from then on you can plug in numbers directly.

What rearranging a formula means

A formula is an equation that links quantities, usually ones with a real meaning such as length, time or price. The letter standing alone, if there is one, is called the subject of the formula. In P = 2l + 2w, the subject is P.

Solving for a different variable means making a new letter the subject. People also call this rearranging, transposing or solving a literal equation, where a literal equation is simply an equation built mostly from letters. The difference between these kinds of statements is covered in expressions, equations and formulas.

The new version says exactly the same thing as the old one, for every set of values where both make sense. You have not discovered a new fact. You have rewritten a relationship so that it answers a different question.

That is useful when you will repeat a calculation. If you need the width of twenty rectangles from their perimeters and lengths, solving once for w beats solving twenty separate equations. Spreadsheets and calculators also want the unknown alone on one side.

Think in numbers first

If a formula full of letters looks intimidating, solve a number version beside it. Suppose P is 30 and l is 9, so the equation reads 30 = 2 × 9 + 2w. You would subtract 18 and then divide by 2. Now copy those moves with letters.

Numbers                     Letters
30 = 2·9 + 2w               P = 2l + 2w
30 - 18 = 2w                P - 2l = 2w          (subtract the term without w)
12 ÷ 2 = w                  (P - 2l) ÷ 2 = w     (divide by the coefficient of w)
w = 6                       w = (P - 2l)/2

The only difference is that the number column can be simplified at each line, while the letter column keeps a record of every operation. That record is the new formula.

A coefficient is the number or expression multiplying your target letter. Here it is 2. In other formulas it might be a whole product such as πr², and you handle it the same way.

The step-by-step method

Use this order for most formulas you meet in a first or second algebra course.

  1. Circle or underline every appearance of the target letter.
  2. Clear any fractions or parentheses that trap it.
  3. Move terms that do not contain it to the other side by adding or subtracting.
  4. Divide by whatever multiplies it.
  5. If the letter is squared or under a root, undo that last.
  6. State any restrictions and check.

The reasoning behind each move is that equal quantities stay equal when treated identically. You can read more about this in the properties of equality.

A helpful way to plan is to list what happens to the target letter if you were computing the original formula. In v = u + at, solving for t, the computation takes t, multiplies by a, then adds u. To reverse it, subtract u first and divide by a second. It is like taking off shoes and socks in the opposite order from putting them on.

Rearranging v = u + at to find t
1 Pick the target We want t alone; v, u and a act as known numbers. 2 Subtract u v - u = at 3 Divide by a (v - u)/a = t, with a not zero. 4 Check Substitute back and confirm you recover v. Pick the target We want t alone; v, u and a act as known numbers. 1 Subtract u v - u = at 2 Divide by a (v - u)/a = t, with a not zero. 3 Check Substitute back and confirm you recover v. 4

Four worked examples

Velocity under constant acceleration. Start with v = u + at and solve for t.

v = u + at
v - u = at              (subtract u)
t = (v - u)/a           (divide by a; a ≠ 0)

Area of a triangle. Solve A = (1/2)bh for h.

A = (1/2)bh
2A = bh                 (multiply by 2)
h = 2A/b                (divide by b; b ≠ 0)

Area of a trapezoid. Solve A = (1/2)(b₁ + b₂)h for b₁. The small numbers are subscripts, labels that tell the two bases apart, as explained in subscripts and primes.

A = (1/2)(b₁ + b₂)h
2A = (b₁ + b₂)h         (multiply by 2)
2A/h = b₁ + b₂          (divide by h; h ≠ 0)
b₁ = 2A/h - b₂          (subtract b₂)

The slope-intercept line. Solve y = mx + b for x. Subtract b to get y - b = mx, then divide by m, giving x = (y - b)/m, provided m ≠ 0. If m is 0, the line is horizontal and y equals b for every x, so no single x can be recovered from y.

Restrictions you should write down

Division by zero is undefined, so every time you divide by a letter you add a condition. These conditions are part of the answer.

Sometimes the original situation already guarantees the condition. A triangle with area has a base longer than zero, so b ≠ 0 holds automatically. In v = u + at, however, zero acceleration is perfectly possible. Then the velocity never changes, and the formula cannot tell you how much time has passed.

Meaning can restrict values too. A width must be positive, so w = (P - 2l)/2 only describes a real rectangle when P is greater than 2l. The algebra will happily return a negative width, and it is your job to notice. This idea is developed in practical domain versus algebraic domain.

The same caution applies to division hidden in a cancellation. If you cancel a factor such as (k - 3), record that k ≠ 3. Dividing carelessly by something that might be zero can also lose solutions.

When the target is inside parentheses

Sometimes the letter you want is locked inside a group, as with n in L = a + (n - 1)d, the rule for a term of an arithmetic sequence. You have two good choices: distribute first, or treat the whole group as one object and free it from the outside in. The second is usually shorter.

L = a + (n - 1)d
L - a = (n - 1)d             (subtract a)
(L - a)/d = n - 1            (divide by d; d ≠ 0)
n = (L - a)/d + 1            (add 1)

Test it with the sequence 5, 8, 11, 14. Here a = 5 and d = 3. For the term L = 14, the formula gives n = 9/3 + 1 = 4, and 14 is indeed the fourth term.

In this setting n must also be a positive whole number. If you put in L = 15, you get n = 13/3, which tells you that 15 is not a term of the sequence at all. The rearranged formula has quietly become a test for membership.

Mistakes that appear again and again

Mistake Wrong version Correct version
Dividing only one term P - 2l = 2w gives w = P - l w = (P - 2l)/2 = P/2 - l
Subtracting a factor A = bh gives h = A - b h = A/b
Splitting a denominator 1/(a + b) = 1/a + 1/b These are different in general
Leaving the target on both sides x = (c - x)/k Collect the x terms, then factor

The first row is the most common. When you divide a side by 2, every term on that side gets divided. Writing the whole side in parentheses or over one fraction bar protects you.

The second row confuses the two kinds of undoing. Addition is undone by subtraction, and multiplication is undone by division. Ask how the letter is attached before you try to remove it.

The last row happens when the target letter shows up twice. That case needs factoring, which solving for a variable that appears twice handles in full.

How to check your result

The quickest test uses made-up numbers. Pick simple values for the letters in the original formula, compute the subject, then feed those results into your rearranged version. You should get back the value you started with.

For the trapezoid, take b₁ = 3, b₂ = 5 and h = 4. The original gives A = (1/2)(8)(4) = 16. The new formula gives b₁ = 2 × 16 ÷ 4 - 5 = 8 - 5 = 3. It matches.

Avoid choosing 0, 1 or the same value for two letters, because these can hide errors. With b = 2 and h = 2, for instance, several wrong formulas happen to agree with the right one.

A second test uses units. If t = (v - u)/a, then v - u is in meters per second and a is in meters per second squared, so the quotient is in seconds. A result in the wrong units is certainly wrong. See units as a check for more on this.

Common questions

Does it matter which side the target letter ends up on?

No. The statements t = (v - u)/a and (v - u)/a = t mean the same thing. Putting the subject on the left is a habit that makes formulas easier to scan.

Why does my answer look different from the answer key?

Many forms are equivalent. For the rectangle, (P - 2l)/2 and P/2 - l are equal for all values. Substitute a few numbers into both. If they disagree even once, one of them is wrong.

When should I substitute the numbers?

If you only need one value, substituting first and then solving is perfectly valid and often easier. Rearrange first when you will reuse the formula, when you want to see how one quantity depends on another, or when a question asks for it. Practicing with equations that have letter coefficients builds the skill for both.

Written for 4Algebra with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 35 articles in Variables and Expressions →

Latest news on this topic