Skip to content
Blog

How to write equations from word problems in 4 steps

By Published A short read

How to write equations from word problems: the words 5 less than x become x − 5, not 5 − x, tested with x = 12

To write an equation from a word problem, use four steps. Name the unknown with a letter and its units ("let d be the distance in miles"). Write every other amount in terms of that letter. Find the two things that are equal: usually a total, or the word "is". Then test the equation with an easy number before you solve it. Watch the order of words: "5 less than x" is x − 5, not 5 − x, because "less than" flips the order. In this post we build a word-to-symbol table, catch the two classic translation mistakes, then use the method on a real New York taxi meter, a garden fence, the NCERT Class 10 taxi-fare problem and a pens-and-pencils pair of equations, with model answers that earn method marks.

Key takeaways

  • "Less than" flips the order: 5 less than x = x − 5. Test it with x = 12: five less than 12 is 7, and 12 − 5 = 7, but 5 − 12 = −7.
  • "Of" means multiply (half of x = ½x), "per" or "each" means multiply by how many, and "is", "costs" or "gives" become the equals sign.
  • "Six times as many students as professors" is S = 6P, not 6S = P. Letters stand for numbers of things, not for the things themselves.
  • The method: name the unknown with units, write every amount in terms of it, find the two equal things, and test with an easy number before solving.
  • Re-read the last line of the question, and write your working line by line: Cambridge examiners gave marks for correct lines of working even to answers that weren't fully right.

This post goes with letsBug Maths, episode 3 (NCERT Class 10, Chapter 3, Pair of Linear Equations in Two Variables in India; forming and solving equations for GCSE in the UK and Cambridge IGCSE internationally). Watch it, or read on: the post adds the full translation table, more practice and exam-style questions with model answers.

Is "5 less than x" the same as 5 − x?

No. Most people write 5 − x, because the 5 comes first in the words. But let's test it with a number. Let x be 12.

  • Five less than 12 is 7: count 5 back from 12.
  • 5 − x gives 5 − 12 = −7. That's wrong.
  • x − 5 gives 12 − 5 = 7. That's right.

So 5 less than x is x − 5. "Less than" flips the order: the thing after "than" comes first. The OpenStax Prealgebra textbook puts it plainly: "Less than means “subtracted from”." Five less than x is 5 subtracted from x.

The 5 less than x trap: with x = 12, five less than 12 is 7 on a number line. 5 − x gives −7, wrong. x − 5 gives 7, right. Less than flips the order
One easy number catches the mistake: x = 12 must give 7.

Not every subtraction phrase flips. "x minus 5", "x decreased by 5" and "x take away 5" are already in order: x − 5. The phrases that turn the order round are the "than" and "from" ones: less than, fewer than, subtracted from, and take 5 away from x. And "x is less than 5" is a different thing again: with "is", it's a comparison, the inequality x < 5, not a subtraction.

Words to symbols: the translation table

Most word problems use the same few phrases. Here they are. Watch the second row: it's the one that flips.

WordsWriteExample
more than, increased by, plus, total, sum+5 more than x → x + 5
less than, fewer than, subtracted from− (flip the order)5 less than x → x − 5, not 5 − x
minus, decreased by, take away− (same order)x decreased by 5 → x − 5
times, twice, product, of×twice x → 2x; half of x → ½x; 20% of 80 → 0.2 × 80
per, each, a (a rate)× how many$3.50 a mile for d miles → 3.5d
divided by, shared equally, quotient÷x shared equally between 4 → x ÷ 4
is, equals, costs, gives, was, will be=the fare is $45 → fare = 45
Words to symbols card: more than means add, less than means subtract and flip the order, of and times mean multiply, per and each mean multiply by how many, is and costs mean equals. Then test with a number

"Of" surprises people. OpenStax explains multiplying fractions as "To multiply 1/2 and 3/4, think 1/2 of 3/4", and it works out a tip the same way: "we multiplied the percent by the base." So a 20% tip on an $80 bill is 0.20 × 80 = $16. And for the equals sign, the same book lists these clue words: is equal to, is the same as, is, gives, was and will be.

A table is a good start, but it's not enough on its own. The next mistake gets past it.

The reversal error: six times as many students as professors

Here's a sentence from a 1980 study: "There are six times as many students as professors at this university." Use S for the number of students and P for the number of professors. Write an equation.

The researchers, Rosnick and Clement, looked at how first-year engineering students translate word problems into equations. A 2014 paper describing their work says the sentence "was written algebraically by many as 6S = P". They called it the reversal error. The words say "six" and "students" together, so 6S feels right.

Test it. Say there are 10 professors, so there are 6 × 10 = 60 students. Does 6S = P work? 6 × 60 = 360, not 10. No. Does S = 6P work? 60 = 6 × 10. Yes.

The fix is to remember what the letters mean. S isn't "students"; it's the number of students. The same paper says that "substituting values for the number of students ... would demonstrate the absurdity of the reversed equation". That's step 4 of the method below.

How to write an equation from a word problem: 4 steps

  1. Name the unknown, with units. Write "let d be the distance in miles", not just "d". The units stop you mixing up what the letter means.
  2. Translate: write every other amount in terms of it. "4 m longer than the width" becomes w + 4. "$3.50 a mile" becomes 3.5d.
  3. Find the two things that are equal. In word problems that's usually a total, or a word like "is" or "costs". Put one on each side of the = sign.
  4. Test it with an easy number, before you solve. Put in a number you can work out in your head and check the equation gives a sensible answer.

It's adapted from the 7-step problem-solving strategy in OpenStax Elementary Algebra, with the check moved to before you solve: read the problem, identify what you're looking for, name it with a variable, translate into an equation, solve, check, and answer with a complete sentence. Let's use it.

Worked example 1: how far can a taxi take you for $45?

New York's Taxi and Limousine Commission sets the meter: a "$3.00 initial charge", plus "70 cents per 1/5 mile". There are five fifths in a mile, so that's 5 × $0.70 = $3.50 a mile. You have $45 for the meter. How far can you go?

  1. Name: let d be the distance in miles.
  2. Translate: the fare is $3 to start, plus $3.50 for each mile: fare = 3 + 3.5d.
  3. Find the equal things: the fare is $45. So 3 + 3.5d = 45.
  4. Test before solving: 2 miles should cost 3 + 3.5 × 2 = 3 + 7 = $10. That sounds right for a short ride.

Now solve. Take 3 from both sides: 3.5d = 42. Divide both sides by 3.5: d = 42 ÷ 3.5 = 12. Re-read the last line: it asked "how far", so the answer is a distance. You can go 12 miles on the meter. A rate times an amount is the same idea behind distance = speed × time, which is how GPS works out how far away each satellite is.

Worked problem from words to equation to answer: let d be the distance in miles, fare = 3 + 3.5d, the fare is 45, so 3 + 3.5d = 45, test d = 2 gives $10, then 3.5d = 42 and d = 12 miles. The shortcut 45 ÷ 3.5 = 12.9 miles would cost about $48
Words, then the equation, then a test, then the answer.

The shortcut that forgets the fixed charge

A common shortcut is to divide: 45 ÷ 3.5 = 12.9 miles. Test it. 12.9 miles would cost 3 + 3.5 × 12.9 = $48.15, about $48, which is more than you have. The shortcut forgot the $3 the meter charges before the taxi even moves. The equation can't forget it, because step 2 translated every amount.

Real New York fares add more fixed charges on top. The TLC's extras include a 50-cent MTA State Surcharge, a $1.00 Improvement Surcharge, a $2.50 Congestion Surcharge for yellow-taxi trips that begin, end or pass through Manhattan south of 96th Street, and a 75-cent congestion pricing toll for Manhattan at and below 60th Street, plus $1 overnight or $2.50 in the weekday rush hour (4 to 8pm), plus tips. If a trip outside those hours picks up the first four, the fixed part becomes 3 + 0.50 + 1.00 + 2.50 + 0.75 = $7.75, and the equation is 7.75 + 3.5d = 45. Then 3.5d = 37.25 and d = 10.6 miles, before the tip. Below 12 mph the meter charges 70 cents per 60 seconds instead of per 1/5 mile, so in slow traffic you'd go less far again. The method doesn't change: every fixed charge goes into the number on its own, and every per-mile charge goes with d.

Worked example 2: the garden fence (use all four sides)

A rectangular garden is 4 m longer than it is wide. The fence all the way round is 72 m. How wide is the garden?

  1. Name: let w be the width in metres.
  2. Translate: the length is 4 more than the width: w + 4.
  3. Find the equal things: the fence all round is the perimeter, and a rectangle has four sides: two widths and two lengths. So 2w + 2(w + 4) = 72.
  4. Test: if w were 10, the garden would be 10 m by 14 m, and its fence 10 + 14 + 10 + 14 = 48 m. The equation gives 2 × 10 + 2 × 14 = 48 too, so it matches the words. And 48 is short of 72, so w is more than 10.

Expand the bracket: 2w + 2w + 8 = 72, so 4w + 8 = 72. Take 8 from both sides: 4w = 64. Divide by 4: w = 16. The garden is 16 m wide and 20 m long. Check: 16 + 20 = 36, and doubled that's 72. ✓

The trap here is real. In the June 2024 Cambridge IGCSE examiner report, on a rectangle perimeter question, examiners wrote that "some only used the two different sides of the rectangle or used all four but then divided by 2." With only two sides you'd write w + (w + 4) = 72, so 2w = 68 and w = 34. A 34 m by 38 m garden needs a 144 m fence, twice what we have.

NCERT Class 10 students: this is Exercise 3.1, Question 5 in Chapter 3. The book gives "half the perimeter" as 36 m, so the equation there is w + (w + 4) = 36, which also gives w = 16. Using two sides is right when you're given half the perimeter. Read which one the question gives you.

How to write it for full marks

Compare two answers to the garden question. The first just says "16 and 20". If that's right it may score, but if it's wrong, there's nothing to give marks for. The second shows every line:

Let w = the width in metres.
Length = w + 4
2w + 2(w + 4) = 72
4w + 8 = 72
4w = 64, so w = 16
The garden is 16 m wide and 20 m long.

Cambridge examiners said of that same rectangle question: "Not many candidates were awarded full marks. Many were awarded 1 or 2 marks for various correct lines of working." The "let" line, the equation and each step are each a chance at a mark. And the last line answers the question in words, with units.

Two unknowns: the NCERT taxi problem (Class 10, Chapter 3)

This one is from NCERT Class 10, Exercise 3.2, Question 3(iv): "The taxi charges in a city consist of a fixed charge together with the charge for the distance covered. For a distance of 10 km, the charge paid is ₹105 and for a journey of 15 km, the charge paid is ₹155. What are the fixed charges and the charge per km?" It also asks what 25 km would cost.

Two unknowns need two letters. Let f be the fixed charge and k the charge per km, both in rupees. Each journey gives one equation:

  • 10 km for ₹105: f + 10k = 105
  • 15 km for ₹155: f + 15k = 155

The exercise asks for the substitution method. From the first equation, f = 105 − 10k. Put that into the second: 105 − 10k + 15k = 155, so 105 + 5k = 155, 5k = 50 and k = 10. Then f = 105 − 10 × 10 = 5. The fixed charge is ₹5 and the charge is ₹10 a km.

There's a quick sense check, too: the extra 5 km cost ₹155 − ₹105 = ₹50, which is ₹10 a km. And 25 km costs 5 + 25 × 10 = ₹255.

Where this is in the syllabus: the CBSE Class X 2026-27 mathematics curriculum lists "simple situational problems" under Pair of Linear Equations in Two Variables, with the learning outcome that a student "models and solves algebraically" contextualised problems, such as simultaneous linear equations in two variables. For GCSE, AQA's specification (reference A21) says students should "translate simple situations or procedures into algebraic expressions or formulae" and "derive an equation (or two simultaneous equations), solve the equation(s) and interpret the solution", including "problems set in context".

Translate each one, then check with a number.

1) 8 less than y

2) y less than 8

3) 5 less than twice x

4) Half of a number n is 14. Find n.

5) There are 3 times as many cats as dogs in a shelter. Use C and D.

Show the answers

1) y − 8. Check with y = 20: 8 less than 20 is 12, and 20 − 8 = 12.
2) 8 − y. Here 8 comes after "than", so 8 comes first. With y = 2: 2 less than 8 is 6, and 8 − 2 = 6.
3) 2x − 5. With x = 10: twice 10 is 20, and 5 less than 20 is 15; 2 × 10 − 5 = 15.
4) ½n = 14, so n = 28. Check: half of 28 is 14.
5) C = 3D. With 4 dogs there are 12 cats, and 12 = 3 × 4. (3C = D would give 36 = 4.)

Exam-style questions with model answers

The marks in brackets follow GCSE and IGCSE mark schemes: M is a method mark, A is an accuracy mark that needs the method, and B is a mark on its own.

Q1 (2 marks). Write an expression for "7 less than three times a number n". Test your expression with n = 10.

Model answer

3n − 7 [B1]. Test: three times 10 is 30, and 7 less than 30 is 23; 3 × 10 − 7 = 23 ✓ [B1]. The common wrong answer, 7 − 3n, gives −23.

Q2 (3 marks). A phone plan costs £12 a month plus 5p for each text over the allowance. One month's bill was £15.40. Form and solve an equation to find how many extra texts were sent.

Model answer

Let t be the number of extra texts. 5p is £0.05, so 12 + 0.05t = 15.40 [M1]. 0.05t = 3.40 [M1]. t = 68 extra texts [A1]. The shortcut 15.40 ÷ 0.05 = 308 forgets the £12 fixed charge, just like the taxi.

Q3 (4 marks). The length of a rectangle is 3 cm less than twice its width. Its perimeter is 54 cm. Find the length and the width.

Model answer

Let w be the width in cm. Length = 2w − 3 [B1]. 2w + 2(2w − 3) = 54 [M1]. 6w − 6 = 54, so 6w = 60 and w = 10 [M1]. Width 10 cm, length 17 cm [A1]. Check: 2 × (10 + 17) = 54 ✓. Using only two sides, w + 2w − 3 = 54 gives w = 19 and a length of 35: a perimeter of 108 cm, twice too big.

Q4 (4 marks). 2 pens and 3 pencils cost ₹46. 3 pens and 1 pencil cost ₹48. Form a pair of equations and find the cost of one pen and one pencil.

Model answer

Let p be the cost of a pen and q the cost of a pencil, in rupees. 2p + 3q = 46 and 3p + q = 48 [B1]. From the second, q = 48 − 3p. Substitute: 2p + 3(48 − 3p) = 46 [M1], so 2p + 144 − 9p = 46, −7p = −98 [M1] and p = 14. Then q = 48 − 3 × 14 = 6. A pen costs ₹14 and a pencil ₹6 [A1]. Check: 2 × 14 + 3 × 6 = 46 ✓ and 3 × 14 + 6 = 48 ✓.

Questions people ask

How do you write an equation from a word problem?

Name the unknown with a letter and its units, write every other amount in terms of that letter, find the two things that are equal (often a total or the word "is"), and test the equation with an easy number before you solve it.

What is 5 less than x as an algebraic expression?

x − 5. "Less than" means "subtracted from", so the order flips. Check with x = 12: five less than 12 is 7, and 12 − 5 = 7, but 5 − 12 = −7.

What does "x less than 5" mean?

As a phrase, "x less than 5" means 5 − x. But "x is less than 5" is an inequality, x < 5: it compares two numbers instead of subtracting.

What does "of" mean in maths word problems?

Multiply. Half of x is ½ × x, and 20% of 80 is 0.2 × 80 = 16.

What words mean equals in a word problem?

"Is", "equals", "is the same as", "gives", "was", "will be" and, in money problems, "costs". Each one becomes the = sign between the two equal amounts.

Why is "six times as many students as professors" S = 6P and not 6S = P?

Because S and P are numbers of people. With 10 professors there are 60 students: S = 6P gives 60 = 60, while 6S = P gives 360 = 10. Writing 6S = P is called the reversal error.

Keep going

Sources

Every quote in this post was checked against these sources, and every worked example and practice answer was solved in Python before publishing.