On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Algebra Fundamentals · Grade 6-8

Writing Equations from Context

Writing equations from context means turning a story, diagram, or word problem into an equation that preserves the relationships in the situation.

total=starting amount+rate×quantity

Quick Answer

Writing equations from context means turning a story, diagram, or word problem into an equation that preserves the relationships in the situation. Use it when a problem describes how quantities are connected and asks for one you don't know. Name the unknown with a letter and its units, write each side as an expression for the same quantity, and set the two equal. Once the equation is written, solving it is ordinary algebra; the hard part is making sure both sides really measure the same thing.

Why This Matters

Real questions arrive as sentences, not equations: how many texts fit a $37 bill, how many weeks until savings reach $200. Once you can write the equation, every solving skill you have applies to the problem. A badly translated equation gives a confident wrong answer, such as writing "5 less than x" as 5−x, so the translation decides whether the algebra is worth doing.

Intuitive Explanation

An equation is a sentence saying that two descriptions name the same amount. Suppose Leo has $15 and saves $8 a week, and you want to know when he will have $95. One description of his money after w weeks is 15+8w; the other is the number in the question, 95. Set them equal: 15+8w=95. Then 8w=80 and w=10 weeks.

Begin by writing what the letter means, with units: "Let w = number of weeks." That one line stops you from mixing up weeks and dollars later. Then translate each phrase by asking which quantity it describes. "5 less than a number" is n−5: you start with the number and take 5 away, even though the 5 is said first. "Twice the sum of a number and 3" is 2(n+3), not 2n+3.

A diagram can supply the equation too. If a rectangle's length is 4 cm more than its width and its perimeter is 28 cm, the perimeter rule gives 2w+2(w+4)=28. Then 4w+8=28, so the width is 5 cm and the length is 9 cm.

Without a condition you can only write an expression. "Leo's money after w weeks" is 15+8w, a rule that works for every w. It becomes an equation only when the story ties it to a value or to another expression, such as "he has $95" or "he has as much as his sister".

Think of it like this. Writing an equation from a story is translating a sentence into another language: each phrase has a matching piece, but the word order does not always carry over. "5 less than n" puts the 5 first in English and last in algebra, as n−5. The translation is only finished when it contains an equals sign.

Core idea. Writing an equation from context means naming the unknown and making two descriptions of the same quantity equal.


When to Use

Use it when a word problem gives a total, a target, or says two amounts are the same, and asks for an unknown number. Questions like "after how many weeks", "how many were sold" or "when will they be equal" point here. If no total or condition is given, write an expression and stop. If the story has two unknowns and two separate facts, write a system of two equations. If it says "at least" or "no more than", write an inequality.

Tip. Ask: Can I name the unknown and write two expressions that must be equal in this situation?

How to Recognize It

Before writing anything, find the one number you do not know and the fact in the story that pins it down.

  1. Does the story give a total, a target, or a moment when two amounts are the same?

    Yes means you have the fact that becomes the equals sign. No means there is nothing to set equal, so write an expression for the amount and stop.

  2. Is there exactly one amount you do not know?

    One unknown means one equation in one letter. Two unknowns tied together by two separate facts, such as a total count and a total cost, call for a system of two equations.

  3. Is the condition an exact amount rather than a limit that can be passed or fallen short of?

    An exact amount gives an equation. A limit, such as spending no more than $40, gives an inequality, and the answer becomes a range of values instead of one number.

  4. Has the equation already been written for you?

    If it is given, the translating is done and you are only solving, which is a multi-step equation task. Writing from context is the step before that: building the equation from the story.

Writing Equations from Context compared with Expression writing and Solving an already-written equation

All three rows involve a story and a letter, so they look alike on the page. What separates them is whether you are handed an equation, handed a condition to turn into one, or handed no condition at all.

Writing Equations from Context

Meaning
Use this when a context gives relationships or constraints and the task asks you to represent or solve for an unknown.
Key test
Can I name the unknown and write two expressions that must be equal in this situation?
Formula
total=starting amount+rate×quantity
Example
A phone plan costs $25 per month plus $0.10 per text. Last month the bill was $37. Write an equation and solve for the number of texts.

Expression writing

Meaning
Builds an algebraic phrase without setting it equal to another quantity.
Key test
Use when the task asks only for a rule or phrase and gives no complete condition to satisfy.
Formula
25+0.10t
Example
Cost for t texts

Solving an already-written equation

Meaning
Finds the variable after the model has already been provided.
Key test
Use when the equation is given and the task is only to solve it.
Formula
25+0.10t=37
Example
Find t

Formula & Notation

total=starting amount+rate×quantity

How to read it: Start with "Let x=..." so the variable has units before it appears in an equation.

Worked Examples

Example 1 — Phone bill equation

Easy

A phone plan costs $25 per month plus $0.10 per text. Last month the bill was $37. Write an equation and solve for the number of texts.
Show the steps and the answer
  1. Define the variable: let t = the number of texts sent last month.

    The question asks for a count of texts, so that is what the letter stands for.

  2. Write the cost of the texts: $0.10 each, so 0.10t dollars.

    A price per text times the number of texts gives the text charge.

  3. Set the whole bill equal to the known total: 25+0.10t=37.

    The $25 monthly charge plus the text charge is the full bill, and the bill is given as $37.

  4. Solve: 0.10t=12, so t=12÷0.10=120.

    Subtract the fixed charge first, then divide by the price per text.

  5. Check: 25+0.10(120)=25+12=37.

    The rebuilt bill matches $37.

Answer: 120 texts

Takeaway: Fixed charge plus rate times quantity equals the total: name the quantity, build each piece, then set the sum equal to the given bill.

Example 2 — Expression only

Standard

A phone plan costs $25 per month plus $0.10 per text. Write an expression for the cost of t texts, but no total bill is given.
Show the steps and the answer
  1. Look for a known total or a condition: the problem gives none.

    Without a value to match, there is nothing to set the cost equal to.

  2. Build the cost from its parts: $25 fixed plus $0.10 for each of t texts, so 25+0.10t.

    The same pieces as in the bill problem describe the cost for any number of texts.

  3. Try two values: 50 texts cost 25+0.10(50)=30 dollars; 200 texts cost 25+0.10(200)=45 dollars.

    An expression is a rule giving a cost for every t, not one answer.

Answer: 25+0.10t

Takeaway: If the story gives no total or condition, the answer is an expression; it becomes an equation only when a value is attached.

Example 3 — Find the mistake: a reversed subtraction

Application

Jada is 5 years younger than her brother, and Jada is 12. Let b be her brother's age. Kim writes: "b=12−5, so her brother is 7." Find the mistake and correct it.
Show the steps and the answer
  1. Write what each quantity is: b = the brother's age in years; Jada's age is 12.

    Stating the meanings shows which person each side of the equation describes.

  2. Translate from the quantity being described: Jada's age is her brother's age minus 5, so 12=b−5.

    "5 years younger than her brother" starts from the brother's age and takes 5 away.

  3. Solve: b=12+5=17.

    Adding 5 to both sides undoes the subtraction.

  4. Sense-check: 17 is older than 12, as the story says. Kim's 7 would make the brother younger than Jada.

    A reversed subtraction usually puts the wrong person on top, which the story can expose.

Answer: 12=b−5, so the brother is 17.

Takeaway: Translate "less than" or "younger than" from the quantity being described, then check that the right person comes out bigger.

Where You'll See It

  • Saving for a bike

    Ana has $40 and saves $15 a week toward a $220 bike. The weeks needed satisfy 40+15w=220, so 15w=180 and w=12 weeks. The same equation, with 280 in place of 220, gives w=16: a $280 bike takes 4 weeks longer.

  • Working out a taxi ride's length

    A taxi charges $3.50 to start plus $2.25 per mile, and the fare was $21.50. Then 3.50+2.25m=21.50, so 2.25m=18 and the ride was m=8 miles.

  • Break-even for a class trip

    A trip costs $300 for the bus plus $12 per student for tickets, and each student pays $24. Money in equals money out when 24n=300+12n, so 12n=300 and n=25: with 25 students the trip exactly covers its costs.

Common Mistakes

  1. The slip: Skipping the variable definition

    Instead: write what the variable counts and include the units before building the equation.

  2. The slip: Reversing subtraction or comparison language

    Instead: translate from the quantity being described, not from the order of the words alone.

  3. The slip: Writing an expression when the context needs an equation

    Instead: look for the total, equality, or condition that completes the mathematical sentence.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. A gym charges a $20 sign-up fee plus $15 per month. Your total so far is $110. Define a variable, write an equation and solve it.

    Hint: Total = starting amount + rate times number of months.

  2. Maya has $40 and saves $6 a week. Write an equation for when she will have $100, and solve it.

    Hint: Let w be the number of weeks.

  3. The sum of two consecutive integers is 57. Write an equation and find the integers.

    Hint: If the first is n, what is the next one?

  4. A rectangle's length is 3 cm more than twice its width, and its perimeter is 42 cm. Write an equation and find both sides.

    Hint: Let w be the width, so the length is 2w+3.

  5. Bus rides cost $2.50 each. Jo spent exactly $20 on rides. Lee just wants a formula for the cost of r rides. Who needs an equation?

    Hint: Which situation gives a total to set the cost equal to?

  6. "Ben is 5 years younger than Ana, who is a years old." A student writes Ben's age as 5−a. Correct it.

    Hint: Try it with Ana at 14.

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Does it matter which letter I use for the unknown?

No. Any letter works, but one that reminds you of the quantity, such as ww for weeks or cc for cups, makes mistakes easier to spot. What matters more is a short note like "ww = number of weeks" next to it. Without the note it is easy to solve for ww and then report the wrong thing, such as the total cost instead of the number of weeks.

Can two different equations both be correct for the same story?

Yes. For a phone plan of $20 plus $5 per gigabyte with a $45 bill, 20+5g=4520+5g=45, 5g=45−205g=45-20 and 45−5g=2045-5g=20 all describe the same situation, and all give g=5g=5. An equation is correct if both sides mean something real in the story and it has the right solution. Teachers usually accept any of these, as long as the variable is defined.

What should I do when the answer comes out as a fraction or a negative number?

Read the story again before reporting it. If xx counts people, buses or tickets, then x=4.5x=4.5 or x=−2x=-2 means either the equation was set up wrong or the question wants you to round in a sensible direction. For example, 4.5 buses means you need 5 buses, because 4 would leave people behind. If xx measures time or weight, a fraction can be a perfectly good answer.

How can I test my equation before solving it?

Pick an easy guess for the unknown, put it into one side, and see whether the number matches what the story says would happen. In 25+15m=13025+15m=130, trying m=2m=2 makes the left side 55, and two months at the gym really would cost $55, so that side is built correctly. A guess that gives a number the story could never produce shows which piece is wrong.

Learning Path

Writing Equations from Context

You are here

You need Variables (letters with a stated meaning), Expressions (building 15+8w) and Equations (what the equals sign claims) first. This concept adds the translation from words and diagrams into an equation. Next, Multi-Step Equations solve the equations you write, Systems of Equations handle stories with two unknowns, and Modeling with Equations applies the same translation to larger real situations.

See Also