N-back task
Press when the letter on screen matches the one from two steps back. The standard way to load working memory and see how well people keep up.
- Measures
- Working-memory updating
- Template length
- about 5 minutes (30 letters)
Letters appear one at a time. Your job is to press a key whenever the current letter is the same as the one shown two letters earlier. To do that you have to hold the last two letters in mind and update them on every trial.
Raising N from 1 to 2 to 3 makes the task steadily harder, which is why it is a favourite for neuroimaging studies that need a working-memory load they can turn up and down.
Try it yourself
A shortened run of the same template researchers use. Nothing is recorded and you do not need an account.
How the task works
- 1Each letter is shown for 2.5 seconds.
- 2Press J when the letter matches the one two back. Do nothing otherwise.
- 3About 30% of the letters are matches (targets).
What people usually find
Accuracy falls and responses slow as N increases. At 2-back most adults catch the majority of targets but also make some false alarms, especially on "lures" (a letter that matched one or three back rather than two).
How to score it
- Hit rate: proportion of targets responded to. False-alarm rate: proportion of non-targets responded to.
- Sensitivity (d′): z(hit rate) − z(false-alarm rate). It separates real performance from a tendency to press often, so it is the usual summary.
- Mean RT on hits is a secondary measure.
Before you run it
- Percent correct alone is misleading: someone who never presses scores 70% correct when 30% of letters are targets.
- The template does not control lures. If you are comparing conditions, ask for a fixed number of 1-back and 3-back lures so difficulty is matched.
Run it as a study
Use the template as it is
The demo above is the same code as the 2-Back template in the gallery. Add it to a project, change the settings in config.js, publish it and share the link. Reaction times and responses come back to your dashboard.
Create a free account to use itOr build a variant: compare 1-back, 2-back and 3-back
Paste this into the AI panel in the experiment editor. Read the code it writes before you collect anything.
Build an N-back task with three blocks: 1-back, 2-back and 3-back, in that order, 40 letters each. In every block, 30% of letters are targets and 10% are lures (a letter that matches N−1 or N+1 back but not N back). Show each letter for 500 ms with a 2000 ms response window; press J for a match. Show the instructions for the next N before each block, with 10 practice letters at 2-back first. Record whether each trial was a target, a lure or neither.
Common questions
What is a good score on a 2-back task?
It depends on timing and how lures are handled, so compare against your own sample rather than a fixed cut-off. Report d′ rather than percent correct, because percent correct rewards people who rarely press.
Does training on the n-back improve intelligence?
People get better at the n-back with practice, but large reviews have found little evidence that this transfers to fluid intelligence or other untrained tasks.
Can I change N in the template?
Yes. Set `n_back` in config.js. The instructions and target generation follow the value you set.
References
- Kirchner, W. K. (1958). Age differences in short-term retention of rapidly changing information. Journal of Experimental Psychology, 55(4), 352–358.
- Owen, A. M., McMillan, K. M., Laird, A. R., & Bullmore, E. (2005). N-back working memory paradigm: A meta-analysis of normative functional neuroimaging studies. Human Brain Mapping, 25(1), 46–59.