Executive Functionabout 4 minBurden: MediumEMA: Low

Trail Making A and B

Circles are touched in order as fast as possible: the numbers 1 to 25 (part A), then numbers and letters in turn, 1, A, 2, B and so on (part B), with a line drawn to each correct circle. Both parts run in one task on layouts generated from a seed; the time and errors of each part, B − A and B ÷ A are reported.

Processing speedVisual searchCognitive flexibilitySet shifting
Category
Executive Function
Typical duration
about 4 min
Participant burden
Medium
EMA suitability
Low

Try this task

Configure parameters and run an interactive preview exactly as participants will experience it. No data is recorded.

Configure preview

Adjust parameters below, then start the preview on the right.

Task parameters

Default part A, then part B, as in the computer version used in traffic-psychology test sets (TMT-L): part A the numbers in order, part B numbers and letters in turn. Part B uses part A's positions mirrored left to right, so both parts have the same path length and the same distractors (Strelcyk et al., 2019). B − A and B ÷ A need both parts.

Default 300 s (Strelcyk et al., 2019, after Bowie & Harvey, 2006). A part not finished by then ends unfinished, with the circles reached stored.

Off by default: 25 circles per part, as the TMT-L. On: 13 circles (part B 1–7 and A–F), the form of ResearchKit's trail-making step, validated on iPhones (Zhou et al., 2025), for small screens or a first try.

On by default: 8 circles with the same feedback, not scored (Strelcyk et al., 2019). Repeated once on a new layout when it had an error (our choice).

On by default (our choice). No norms are shown.

Empty: each participant gets new layouts, and the seed is stored with the result. The same seed gives everyone the same layouts (one fixed form). Generated layouts can differ in difficulty from one seed to the next.

25 circles per part: part A (1–25), then part B (1–13 and A–L in turn). Each part starts with a sample of 8 circles that does not count, repeated once after an error. A part not finished after 300 s ends unfinished. Time and errors after each part. About 4 min in all.

The circles are drawn 8 mm wide on a 6.1-inch phone with a 10 mm touch target (thumb targets of 9.2–9.6 mm, Parhi et al., 2006), centres at least 12 mm apart; the board is turned by a quarter turn on a portrait screen. A line joins each correct circle to the one before; a wrong circle flashes red for 300 ms and counts as an error (our choice), and the trail stays at the last correct circle. The layouts are generated from the seed, never copied from a published form: no line of the path crosses another or passes close to a circle it does not join, steps are at most 40 mm, and leftward and rightward steps are balanced. Unlike Trail-Making Analogue, both parts run in one task. Outputs per part: the time from the first to the last correct touch, the errors, the time to the first touch, the circles reached and whether the part was finished; with both parts, B − A and B ÷ A. Each touch on a circle is stored as a trial.

about 4 minBurden: MediumEMA: Low

This is a researcher preview. No participant data is recorded.

Simulated participant view

9:41

Trail Making A and B

Circles are touched in order as fast as possible: the numbers 1 to 25 (part A), then numbers and letters in turn, 1, A, 2, B and so on (part B), with a line drawn to each correct circle. Both parts run in one task on layouts generated from a seed; the time and errors of each part, B − A and B ÷ A are reported.

No data is recorded

Participant experience on smartphone

25 circles per part, or 13 in the compact form, drawn 8 mm wide on a 6.1-inch phone with a 10 mm touch target and centres at least 12 mm apart; a larger screen draws larger circles. The layout is made for a phone held sideways; on a portrait screen it is turned by a quarter turn, which keeps every distance and crossing. A correct touch draws a line from the previous circle and turns the circle green; a wrong circle flashes red and counts as an error, and the trail stays at the last correct circle while the clock runs on. Touches outside the circles and on circles already joined are ignored.

When to use

For processing speed (part A) and alternating between two sequences (part B) in the touch format of the computerised trail-making tests used in traffic-psychology assessments, and as practice for that format; also as a short executive-function measure in baseline or occasional sessions. It differs from Trail-Making Analogue, which stays as it was: parts A and B run in one task, each after its own sample; the layouts are generated from a seed by published layout rules (no crossing path, no line through or close to another circle, balanced leftward and rightward steps, part B on part A's positions mirrored); and the scores are those of the published computer version (time and errors per part, B − A, B ÷ A). Sessions can use new layouts (no seed) or one fixed form (a set seed).

When not to use

Not the published test and not normed: no layout, item or instruction of a published form is used, and scores are not comparable with norms of the paper or computer versions; device versions of the test are not interchangeable with paper (Drapeau et al., 2007; Bracken et al., 2019). No study has compared practice on a phone with later performance on the touch screen or mouse of a test centre, so phone practice carries no claim of transfer to those devices. Not for frequent EMA: about 4 minutes of full attention. For a shorter sequencing probe on fewer circles, use Trail-Making Analogue.

How to use in a study

The defaults give part A, then part B, 25 circles each, each after an 8-circle sample that does not count (repeated once on a new layout when it had an error), with the time and errors after each part and at most 300 s per part. Use the compact form (13 circles) for small screens or a first try, and part A or part B alone only when B − A and B ÷ A are not needed. Leave the seed empty for new layouts per session, or set one to give every participant the same fixed form.

Researcher-configurable parameters

  • Parts: part A, then part B (default; as the computer version TMT-L), part A only, or part B only
  • Circles per part: 25 (default; TMT-L) or 13 (compact; the form of ResearchKit's trail-making step, validated on iPhones by Zhou et al., 2025)
  • Samples: an 8-circle sample before each part (default; Strelcyk et al., 2019), repeated once after an error (our choice); or none
  • Time limit per part: default 300 s (Strelcyk et al., 2019, after Bowie & Harvey, 2006); 60–600 s
  • Time and errors after each part: on (default; our choice; no norms are shown) or off
  • Seed: empty (new layouts; the seed is stored with the result) or a number (the same layouts for everyone)

Outputs collected

  • Per part, the time from the correct touch on the first circle to the correct touch on the last (completionMsA, completionMsB)
  • Per part, the errors: touches on a wrong circle (errorsA, errorsB)
  • Per part, the time from the drawn board to the first touch (firstTouchMsA, firstTouchMsB)
  • Per part, the circles reached and whether the part was finished within the time limit (reachedA, reachedB, finishedA, finishedB)
  • With both parts: part B − part A in ms and part B ÷ part A (bMinusAMs, bOverA)
  • Every touch on a circle: sample or part, the circle touched and the one expected, correct or not, the time since the board was drawn; the seed and each part's result

Interpretation notes

A part's time runs from the correct touch on its first circle to the correct touch on its last, so the search for the first circle is kept apart (the time to the first touch); a wrong touch costs time but does not move the trail. B − A and B ÷ A remove much of the motor and visual-search component the two parts share. On the paper form part B's path is longer and has more interfering items than part A's (Gaudino et al., 1995); here part B uses part A's positions mirrored, so the paths have the same length and the same distractors. The layouts are generated per seed: the circles are placed first, then a path through them is untangled until no line crosses another and no line passes within 1.5 mm of a circle it does not join, with steps of at most 40 mm and leftward and rightward steps within two of each other. Generated layouts can differ in difficulty from one seed to the next, so the seed is stored with every result. In younger adults the paper parts take about 25–35 s (A) and 50–80 s (B) (Tombaugh, 2004); completion times fall most between the first and the second administration (Bertoleza et al., 2026). Times come from the app's touch events and have not been validated on real devices. The layouts have no norms; compare sessions or groups within a study.

Scientific evidence

  • The Trail Making Test – Langensteinbach version (TMT-L), the computer version in traffic-psychology test sets, presents the numbers 1–25 (part A) and the numbers 1–13 with the letters A–L in turn (part B), tapped with the forefinger on a touch screen or clicked with a mouse, in parallel forms of about 2 minutes for both parts; the paths and the number of distractors are the same in both parts, leftward and rightward steps are balanced, and the variables are the time and errors per part, error-corrected times, B − A and B ÷ A (publisher's product and help pages).
  • A touch-screen version with 25 circles per part used part A's layout mirrored left to right for part B, an 8-circle practice before each part, a line and a green flash for a correct touch, a red flash for a wrong one, and at most 300 s per part, after the protocol of Bowie & Harvey (2006) (Strelcyk et al., 2019).
  • ResearchKit's trail-making step uses 13 circles (part B 1–7 and A–F), counts a wrong tap as an error without moving the trail and draws the lines automatically; a version on participants' own iPhones, with layouts in which the path never crossed a previous line, was validated by Zhou et al. (2025).
  • Thumb targets on small touch screens need about 9.2 mm for single taps and 9.6 mm for serial taps (Parhi, Karlson & Bederson, 2006); 10 mm touch targets around 8 mm circles let 25 circles fit the field of a 6.1-inch phone under the spacing rules above.
  • Normative data for the paper test, stratified by age and education (Tombaugh, 2004).