Task library
Attention & control Eriksen & Eriksen, 1974

Flanker task

Respond to the middle arrow and ignore the ones around it. A two-minute measure of how well attention filters out conflicting information.

Measures
Selective attention and conflict resolution
Template length
about 4 minutes (40 trials)

Five arrows appear in a row. You report the direction of the middle one. When the outer arrows point the same way (→→→→→) the answer is easy; when they point the other way (→→←→→) you slow down and make more mistakes, even though you know the outer arrows are irrelevant.

That slowdown, the congruency or flanker effect, is the basic measure. It is one of the most-used tasks in attention research, child development and clinical work, partly because it is short and works across ages.

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

  1. 1A fixation cross appears for 500 ms.
  2. 2Five arrows appear. Press ← or → to match the centre arrow. You have 2 seconds.
  3. 3Half the trials are congruent (all arrows agree) and half incongruent (the flankers point the other way), in random order.

What people usually find

Responses on incongruent trials are slower and less accurate than on congruent ones. With arrow stimuli the difference is usually a few tens of milliseconds, often somewhere between 30 and 100 ms depending on timing and how practised people are.

The effect is also smaller after an incongruent trial than after a congruent one (the congruency sequence or Gratton effect), which is often taken as a sign that control adjusts from trial to trial.

How to score it

  • Flanker effect: mean correct RT on incongruent trials minus mean correct RT on congruent trials.
  • Accuracy cost: the same difference in error rate. Report both, since some people trade speed for accuracy.
  • Drop anticipations (RT under about 150 ms) and timeouts before averaging.

Before you run it

  • Difference scores are reliable at the group level but noisy for individuals: the flanker effect correlates poorly with itself across sessions. Use more trials (100+) if you want individual differences.
  • The template uses 40 trials, balanced across left/right and congruent/incongruent. Raise n_trials in config.js for a real study.

Run it as a study

Use the template as it is

The demo above is the same code as the Eriksen Flanker 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 it

Or build a variant: add a congruency sequence analysis

Paste this into the AI panel in the experiment editor. Read the code it writes before you collect anything.

Build an arrow flanker task with 160 trials in 4 blocks of 40, congruent and incongruent trials equally likely and in random order. Show a 500 ms fixation, then the arrows for up to 2000 ms; respond with the left and right arrow keys. Record for each trial whether the previous trial was congruent or incongruent, so I can compute the congruency sequence effect. Add 8 practice trials with feedback first, and a short break screen between blocks.

Common questions

How long does the flanker task take?

The template runs 40 trials in about 4 minutes. Studies that look at individual differences usually use 100 to 200 trials, which takes 8 to 15 minutes.

What is the difference between the flanker and Stroop tasks?

Both measure interference from information you are told to ignore. In the Stroop task the conflict is between a word and its ink colour; in the flanker task it is between a target and the items next to it in space.

Can I run the flanker task online with participants?

Yes. Use the template in a project, publish it, and share the study link. Trial data, including reaction times, comes back to your dashboard and can be exported as CSV.

References

  1. Eriksen, B. A., & Eriksen, C. W. (1974). Effects of noise letters upon the identification of a target letter in a nonsearch task. Perception & Psychophysics, 16(1), 143–149.
  2. Gratton, G., Coles, M. G. H., & Donchin, E. (1992). Optimizing the use of information: Strategic control of activation of responses. Journal of Experimental Psychology: General, 121(4), 480–506.
  3. Hedge, C., Powell, G., & Sumner, P. (2018). The reliability paradox: Why robust cognitive tasks do not produce reliable individual differences. Behavior Research Methods, 50, 1166–1186.