
N-back (2-back) Task
The N-Back Task is a cognitive paradigm used to assess working memory and continuous updating of information. Participants must monitor a stream of stimuli and decide whether the current stimulus matches one presented a specified number of steps earlier.
Table of Contents
Task Format | N-back Task Online & In-Lab
The N-Back Task is a continuous performance task used to assess working memory. In this task, participants view a sequence of stimuli presented one at a time and must decide whether the current stimulus matches the one shown a fixed number of steps earlier in the sequence. Task difficulty is determined by the value of N, with higher values placing greater demands on working memory. In the 2-back version of the task, participants compare each stimulus to the one presented two trials earlier.
Two versions of the 2-back task are available, each optimized for the type of device and input method being used:
Desktop Version
In the desktop version, letters are presented one at a time in the center of the screen. Participants decide whether the current letter matches the letter shown two trials earlier. Responses are made using the A and L keys, with the match and non-match key mapping counterbalanced across participants. Timing parameters and response mappings can be adjusted in the task settings.
Mobile Version
In the mobile version, letters are presented sequentially in the center of the screen. Participants indicate whether the current letter matches the one shown two trials earlier by tapping clearly labeled on-screen buttons such as “Match” and “Non-Match.” This version is optimized for touchscreen interaction across mobile devices.
At the beginning of each session, participants complete a short practice block to learn the task rules and response mapping before proceeding to the main task.
Outcome Measures & Performance Indicators of the N-back Task
The N-Back Task captures a range of behavioral measurements that reveal how information is actively maintained and updated in working memory. The variables recorded enable researchers to assess reaction times, response accuracy, hit rates, false alarms, and performance differences across load conditions. These measures help quantify working memory capacity, updating efficiency, and sensitivity to cognitive load. All variables can be viewed and customized within the task’s Variables Tab.
Below are examples of variables collected in the Labvanced version of the N-back Task:
| Variable Name | Description |
|---|---|
correct_rejection | Correct non-response to a non-target (clicks "different" to a non-target) ((1= correct rejection, 0= no correct rejection) |
displayed_letter | Letter displayed to the participant in the current trial |
false_alarm | Incorrect response to a non-targets (wrongly clicks “same” to a non-target) (1= false alarm, 0= no false alarm) |
hit | Correct response to a target stimuli (correctly clicks “same” to a target) (1= hit, 0= no hit) |
miss | Missed response to a target (clicks "different" to a target) ((1= miss, 0= no miss) |
reaction_time | Time taken in milliseconds by the participant to respond to the stimulus presented. |
response | Response given by the participant ("Different"/ "Same" button for Mobile-based task or keypress recording for Desktop-based task) |

Data table showing individual trial level outputs from the online N-back (2back) Task in Labvanced.
This task examines working memory capacity using the 2-back task. Participants complete a series of trials where they must indicate if the current stimulus matches the one presented two steps earlier. Training trials and immediate feedback are provided to support learning and engagement.
Technology Driving the N-back Task for Online & In-Lab Research
The N-Back Task requires precise timing, flexible condition handling, and reliable response recording, all of which are supported within the Labvanced platform:
High Precision Timing: The N-back Task relies on millisecond level timing to detect subtle differences in reaction time across trial types. Labvanced ensures precise stimulus presentation and response logging for reliable cognitive measurement, even in online testing environments.
Frame Based Stimulus Control: Stimulus presentation can be precisely timed using frame durations and event logic, ensuring consistent delivery across trials.
Cross Device Input Support: Works seamlessly with mouse, keyboard, and touchscreen devices. This makes it accessible across desktops, laptops, tablets, and mobile phones. This flexibility allows participants to complete the task using whichever device is available.
Desktop App Mode: A desktop application can be used when stronger control over the task or hardware integration is required. This mode supports offline testing and compatibility with equipment such as EEG and other LSL based systems.
Longitudinal and Remote Testing: The task can be delivered consistently across multiple time points, which is ideal for monitoring changes in attentional bias over longer intervals. Remote testing options make it possible to reach wider and more diverse participant samples while maintaining data integrity.
Webcam Eye Tracking: The task can be combined with webcam based eye tracking to capture gaze direction, fixation duration, and visual scanning patterns during the task.
Webcam Eye Tracking
Capture gaze patterns and visual attention with built-in, code-free and peer-reviewed webcam eye-tracking.
Timing Precision
Capture reaction times, task performance, and more with millisecond accuracy for time-sensitive tasks.
Desktop App
Run in-lab studies using the Desktop App, compatible with EEG and other LSL-connected lab hardware.
Customization of the N-back Task
There are many ways to adapt this N-Back Task template to meet specific research questions. Below are a few themes researchers commonly ask when it comes to modifying this task.
Stimulus Content and Presentation
The stimuli used in the task can be replaced or modified by editing the visual objects directly in the editor. Researchers can use letters, numbers, images, or spatial locations and adjust their size, position, or appearance through the Object Properties panel
Memory Load and Condition Logic
Different N levels are defined as task conditions that determine how far back the current stimulus should be compared. These condition values are read during each trial to control match logic and stimulus evaluation. You can define the value of n by simply editing the events that reflect the condition structure.
Response Handling and Scoring
Participant responses are captured through key presses or button taps and evaluated using event logic. Researchers can modify what counts as a correct response or how non responses are handled. The event system manages all triggers and actions. Simple modifications to the relevant events allows the implementation of the desired response mapping and accuracy criteria.
Trial Flow and Practice Design
Practice trials are typically implemented as a separate block, allowing researchers to adjust trial count, feedback presence, and progression rules independently from the main task. Frame navigation and block transitions can be customized by editing events and frame logic.
If you need help customizing this task, please feel welcome to write to us and ask:
Recommended Use and Applications of the N-back Task
The N-Back Task is widely applicable across research, clinical, and applied settings, making it valuable for assessing working memory and cognitive load across diverse populations.
Working Memory and Cognitive Control Research: Commonly used in cognitive psychology and neuroscience studies to investigate working memory updating, attentional control, and executive functioning in healthy adults.
Developmental and Lifespan Research: Used to examine how working memory capacity changes across childhood, adolescence, adulthood, and aging by adjusting task difficulty through different N levels.
Clinical and Neuropsychological Populations: Applied in research involving conditions such as ADHD, schizophrenia, depression, and neurological disorders where working memory deficits are commonly observed.
Training and Cognitive Load Studies: Frequently used in studies exploring cognitive training, mental workload, and task difficulty manipulation due to its ability to systematically vary memory demands.
Neuroimaging and Brain Function Research: Widely paired with neuroimaging and electrophysiological methods to study neural correlates of working memory and cognitive effort.
References
Kirchner, W. K. (1958). Age differences in short-term retention of rapidly changing information. Journal of experimental psychology, 55(4), 352.
Zhu, S., Wang, Q., Kan, C., Geng, A., Sui, Y., Zhuang, R., ... & Guo, C. (2024). Age-related cerebral changes during different n-back tasks: a functional near-infrared spectroscopy study. Frontiers in aging neuroscience, 16, 1437587.