The N-Back task goes back more than half a century, developed in the 1950s by Kirchner, as you can read in more detail on wikipedia.

In short, in the N-Back task, participants are presented a sequence of stimuli one-by-one. For each stimulus, they need to decide if the current stimulus is the same as the one presented N trials ago. The N can be 1 trials, 2 trials, 3 trials, etc. The higher the number, the more difficult the task. The factors that seem to influence the performance are not only the N, but also the speed of presentation and the size of the set of stimuli.

About this implementation

Key features of this implementation:

  • This is a 3-back task

  • The total stimulus set is 15 stimuli (letters)

  • Each stimulus is presented for maximally 2000 milliseconds

  • A new stimulus is presented every 2500 milliseconds

The letters A,B,C,D,E,H,I,K,L,M,O,P,R,S, and T are being used.

There are only 20 trials in this demo.

Run the demo

You need to press the m if the stimulus is the same as 2 trials ago, and the n if not. The letters m and n are chosen for practical reasons (they can be easily memorized: m=memory,n=no).

Data output file

In PsyToolkit, the data output file is simply a textfile. The save line of the PsyToolkit experiment script determines what is being saved in the data output file. Typically, for each experimental trial, you would have exactly one line in your text file, and each number/word on that line gives you the information you need for your data analysis, such as the condition, response speed, and whether an error was made.

Meaning of the columns in the output datafile. You need this information for your data analysis.

Colum Meaning


correct (1=correct, 2=wrong, 3=too slow)


which key was pressed


reaction time (ms)


random number used for conditions (1=same as 3-back, 2-5 other letter)


trial number


the current letter


the letter of the previous trial


the letter of the trial before


If you have a PsyToolkit account, you can upload the zipfile directly to your PsyToolkit account. Watch a video on how to do that. If you want to upload the zipfile into your PsyToolkit account, make sure the file is not automatically uncompressed (some browsers, especially Mac Safari, by default uncompress zip files). Read here how to easily deal with this.

Further reading

  • Kirchner, W. K. (1958). Age differences in short-term retention of rapidly changing information. Journal of Experimental Psychology, 55, 352-358.

  • Jaeggi, S.M., Buschkuehl, M., Perrig, W.J., & Meier, B. (2010). The concurrent validity of the N-back task as a working memory measure. Memory, 18, , 394–412.