How to Complete a Trace Table Without Losing Marks
Trace tables feel harder than they are. Students often treat them as puzzles to be solved by intuition, then panic when the numbers do not come out right. But a trace table is not a puzzle at all.
That is the entire skill. No jumping ahead, no solving the final answer in your head — just working through the algorithm one honest step at a time.
Before we begin…
If trace tables make you nervous, it is usually because you are trying to predict the answer instead of following the steps. The table exists precisely so you do not have to hold everything in your head.
Trust the method. Do exactly what each line says, write down the change, and the correct answer appears on its own.
By the end of this lesson, you will be able to:
A first example
Here is a short algorithm that adds up four numbers.
We will trace it with the inputs 5, 3, 7, 2. Read one line, do exactly what it says, and record the change.
| Count | Number | Total |
|---|---|---|
| 1 | 5 | 5 |
| 2 | 3 | 8 |
| 3 | 7 | 15 |
| 4 | 2 | 17 |
Two things are worth pausing on. First, Total starts at 0 because the algorithm sets it there before the loop — if you forget that line, every row afterwards is wrong. Second, Total persists between iterations: each row carries forward the value from the row above and adds the new number. The output is the final value, 17.
Adding selection: an IF statement
Now let us make it harder. Suppose the algorithm also counts how many inputs are greater than 5.
The crucial rule with selection is this: only update a variable when the statement that changes it actually executes. If Number > 5 is false, the line inside the IF does not run, so CountHigh does not change on that row. Using our inputs 5, 3, 7, 2, only 7 is greater than 5, so CountHigh increases exactly once.
The FutureLogic method
Use the same six steps every time. It turns any trace table into a routine you can follow without stress.
| Step | What to do |
|---|---|
| 1. Initialise | Write down every starting value before the algorithm runs. |
| 2. Read one line | Look at a single instruction. Do not mentally jump ahead. |
| 3. Execute | Perform exactly what that instruction says — nothing more. |
| 4. Update | Change only the variables that this instruction affects. |
| 5. Record | Write the new values into the correct row of the table. |
| 6. Repeat | Move to the next instruction and go again until the algorithm ends. |
A note on the type of loop
The same method works whatever the loop, but watch when the loop ends. A FOR loop runs a fixed number of times, so you know in advance how many rows you will fill. A WHILE or REPEAT…UNTIL loop runs until a condition changes, so you must check that condition on every pass and keep going until it is met — not for a number of rows you assumed at the start. Reading the condition each time, rather than guessing the loop length, is what keeps a conditional trace accurate.
Exam Tip: let the table do the thinking
Do not erase your working and try to “solve” the final answer mentally. The whole purpose of a trace table is to expose how values change over time. Every row records the algorithm running step by step. In exam questions, intermediate values may be required as well as the final output.
Common mistakes to avoid
- Forgetting the initial values before the loop starts.
- Updating a variable when an IF condition is false.
- Incrementing a counter at the wrong time in the loop.
- Losing a running total between iterations instead of carrying it forward.
- Skipping iterations when the loop should still be running.
- Confusing a variable’s current value with its previous value.
Retrieval Challenge
Trace this algorithm with the inputs 4, 9, 2. Fill in your own table for Count, Number and Largest, then reveal the answer.
Check the answer
| Count | Number | Largest |
|---|---|---|
| 1 | 4 | 4 |
| 2 | 9 | 9 |
| 3 | 2 | 9 |
Largest starts at 0. It updates to 4, then to 9. On the last row, 2 is not greater than 9, so Largest stays 9. The output is 9.
Final Summary
What it is
Executing an algorithm by hand, one line at a time.
Start here
Write every initial value before the algorithm runs.
Selection
Only update a variable when its statement actually executes.
Exam Success
Show every row. Intermediate values earn marks; do not solve mentally.