How memory works
What is working memory?
Working memory is the small amount of information you can keep in mind and use at the same moment. It holds the first half of a sum while you work out the second. What’s in it is quickly lost once your attention moves on, and most estimates put its limit at a handful of items.
Multiply 27 by 42 in your head. You get 1,080 from 27 × 40, and you have to keep it while you work out 27 × 2 and add the 54. If the 1,080 slips away halfway, that’s the limit you just met.
- Term used by
- Miller, Galanter and Pribram, 1960
- Best-known model
- Baddeley and Hitch, 1974, revised in 2000
- Holds
- about 7 digits with rehearsal and grouping; 3 to 5 chunks without
- Lasts
- seconds without attention or rehearsal; no agreed number
- Measured by
- digit span, reading span, n-back, change detection
An AI drafted this page from the sources below and another AI checked it. No person has tried the demos yet.
Try it
How many digits can you hold?
This is digit span, the classic task, run three ways. Run it forward first, then see what the other two do to it.
Digits appear one at a time. When they stop, type them back. Lists grow by one until you miss twice at the same length, which takes a minute or two. Try forward first.
- Forward: type them in order.
- Backward: type them last to first.
- Saying “the”: say “the the the” out loud the whole time the digits are showing, which stops you repeating them to yourself.
Forward, the classic figure is about seven, which is the seven people quote from Miller. Backward is a harder version, since you have to rework the list while you hold it. Saying “the” aims at rehearsal: Baddeley and Hitch note that it impairs digit span, and it’s the method Cowan uses to take rehearsal out of the measurement.
It’s a demonstration, and these are rough versions of the tasks with no norms behind them. It says nothing about your memory: practice, tiredness and luck all move the number. Your digits and scores stay on this page, and we only count that a demo was started.
If you can’t see it: single digits appear about one a second, marked so a screen reader should announce each one. The task is to type them back once they stop, starting at four digits and adding one each time you get a list right.
Where did the idea come from?
The name came first. In 1960 Miller, Galanter and Pribram wrote about “the memory we use for the execution of our Plans” as “a kind of quick access, ‘working memory’”. They were thinking about how you get back to a plan after something interrupts it.
By the early 1970s, models treated short-term memory as the mind’s general workspace, and few had tested that. Alan Baddeley and Graham Hitch asked, as they later put it, “What is STM for?”
The 1974 experiments
Their test was simple. Fill short-term memory with something irrelevant, then see what happens to reasoning. If short-term memory were the workspace, filling it should badly disrupt thinking. The task was a statement about two letters, like “A is not preceded by B”, followed by “AB”, to judge true or false.
- Holding one or two letters had no reliable effect on reasoning time.
- Holding six spoken letters, close to many people’s span, slowed people from 2.73 to 4.73 seconds if they were told their recall had to be perfect. (The chapter’s heading and figure say “six-digit”; its procedure and table say letters.)
- Told both tasks mattered equally, people barely slowed, and their recall fell from 5.5 letters to 3.7.
- Repeating six random digits aloud while reasoning raised the time from 2.79 to 4.27 seconds. Errors went from 8.1% to 10.3%.
The same numbers as a table
| Experiment | Condition | Mean time | Also |
|---|---|---|---|
| Holding six letters, told to protect them (Exp. II) | no load | 2.73 s | 5.8 of 6 letters recalled |
| Holding six letters, told to protect them (Exp. II) | six letters | 4.73 s | 5.0 of 6 letters recalled |
| Holding six letters, told both matter equally (Exp. II) | no load | 3.27 s | 5.5 of 6 letters recalled |
| Holding six letters, told both matter equally (Exp. II) | six letters | 3.46 s | 3.7 of 6 letters recalled |
| Repeating something aloud while reasoning (Exp. III) | nothing | 2.79 s | 8.1% of problems wrong |
| Repeating something aloud while reasoning (Exp. III) | “the the the” | 3.13 s | 10.6% wrong |
| Repeating something aloud while reasoning (Exp. III) | “one two three…” | 3.22 s | 5.6% wrong |
| Repeating something aloud while reasoning (Exp. III) | six random digits | 4.27 s | 10.3% wrong |
On the no-load rows of Experiment II, people still memorised six letters, but after the problem, so both conditions memorised about the same amount.
Reasoning got slower and carried on working, and errors rose only a little. Fifty years on, the authors describe this as “moderate but far from catastrophic interference”, and it’s why they concluded short-term storage is only part of the system.
The “the the the” condition mattered too. Tying up the voice alone cost about a third of a second, which didn’t reach significance, against about a second and a half for the random digits. So a clash over the voice couldn’t explain all of it.
Try the 1974 task
Ten rounds, about three minutes. In each you see six digits and a statement like “A is not preceded by B” with the letters “AB” under it. Is the statement true of that order? Sometimes the digits come first, so you have to hold them while you decide. Sometimes the statement comes first.
Get every digit right first. Then answer as fast as you can without making mistakes. The example is true: A comes first, so nothing precedes it.
If you can’t see it: each round has six digits and a true-or-false statement, in either order, and the page times your answer to the statement. The T and F keys answer it. It’s a demonstration, with far fewer trials than the original, digits on a screen where they used spoken letters, and timing from your browser.
What is the working memory model?
The multicomponent model, the one most courses teach, splits working memory into a controller and several stores. It comes from experiments in which two tasks do or don’t interfere with each other: tasks that clash are taken to share a part.
Phonological loop
This holds speech sounds. The authors split it into “the inner ear”, a store, and “the inner voice”, which rehearses. Spoken words get in directly, and written words have to be said silently first.
The classic evidence: lists of similar-sounding items are harder to recall in order, and lists of long words are harder than lists of short ones. Saying “the” over and over removes the word-length effect, which suggests rehearsal was producing it. Later studies question the word-length effect itself, and the authors say that hasn’t changed their view that the loop exists.
Visuospatial sketchpad
This holds what things look like and where they are. The evidence started with Brooks’s experiments in the late 1960s: a mental image holds up poorly during a visual task, and a phonemic task holds up poorly during a verbal one.
Central executive
This is the part that directs attention and steps in when habit won’t do. The authors called it a “crucial” component they had “done little to investigate”. They later conceded it was open to criticism as “little more than a label for the homunculus”, the little person inside your head who explains nothing. In its defence, they say, it put attentional control on the agenda.
Episodic buffer
You can repeat a sentence far longer than any list of unrelated words, which the loop alone can’t explain. In 2000 Baddeley added a fourth part: a limited store that binds sights, sounds and long-term knowledge into one scene.
The main alternative
Nelson Cowan draws it differently. Short-term storage is the part of long-term memory that’s active right now, and inside that sits a focus of attention holding about four chunks.
The two now look more alike than they did, as Hitch, Allen and Baddeley say themselves. The main remaining difference is whether short-term memory is a separate store. They point to learning something new, such as a new word, which they argue activation of what you already know can’t explain. Cowan accepts the need for such a mechanism, and suggests it belongs to learning generally.
How much can it hold?
Seven, four or three, depending on what you count and whether you can use tricks.
The figures as a table
| Study | Figure | What it rests on |
|---|---|---|
| Miller 1956 | about 7 | Repeating back a list straight away, with rehearsal and grouping free to help. Title: seven, plus or minus two |
| Cowan 2001, 2010 | 3 to 5 chunks | Young adults, in tasks that curtail rehearsal and grouping |
| Chen & Cowan | about 3 chunks | Word lists while saying “the” throughout, as Cowan 2010 describes it |
| Luck & Vogel 1997 | 4 objects | Coloured or oriented shapes seen briefly. Up to 16 features fit if spread across 4 objects |
Chunks
Miller argued that the span counts chunks, “almost independent” of how much each one holds, on the data he had. Cowan calls this perhaps the paper’s most important point. Try these, one at a time: read the line, look away, say it back.
F C B I U A I S A
F B I C I A U S A
The same nine letters. If you know those three abbreviations, the second line is three things. This is an illustration, and it works only because long-term memory already holds them.
So why does Cowan say four?
Cowan argues that seven is what you get when rehearsal and grouping help out. Stop those, by showing everything at once, by making people say a word over and over, or by ending a list without warning, and young adults hold 3 to 5 chunks. In one version, people learned word pairs like “desk-ball”, and held about 3 units while saying “the”, whether those units were single words or pairs.
Maybe there’s no number
Ma, Husain and Bays argue that for vision the limit is a resource shared among items. Asked to recall a colour exactly, people get steadily less precise as items are added, with no sudden drop at some count. Cowan and others defend a fixed limit against this.
What about people who remember 79 digits?
After more than 230 hours of practice, an undergraduate known as SF went from 7 digits to 79. He recoded digits as running times and stored them in long-term memory, with a structure for getting them back, and Chase and Ericsson give several reasons for thinking his short-term capacity hadn’t grown. After three months on digits, his span for consonants was around 6, with “no transfer at all”.
How long does it last?
Seconds, and nobody has a good number. Peterson and Peterson (1959) had people hold three letters while counting backward by threes, and memory fell sharply as the delay ran up to 18 seconds. Sceptics blamed interference from letters on earlier trials for that.
Baddeley and Scott tested a large number of people for one trial each, in a trailer at a shopping mall, to avoid that confusion. They found a drop only within the first 5 seconds. Cowan’s 2008 verdict is that decay “is not yet on very firm ground”.
You’ll see the loop given 1 to 2 seconds. That came from early word-length work, and its authors now say later findings have “clearly challenged” it. Whether things fade with time, or get pushed out by what comes next, is still open.
How is working memory tested?
| Task | What you do | Worth knowing |
|---|---|---|
| Digit span | Repeat a list straight back, or backward | Often counted as short-term memory more than working memory |
| Complex span | Read sentences or solve sums, and remember a word or letter from each. Reading span is the first version, from 1980 | Among the best correlates of fluid intelligence, according to Cowan |
| N-back | Watch a stream and respond when an item matches the one n steps back | Common in brain imaging. Correlates only weakly with span tasks |
| Change detection | See a brief array of shapes, then say whether one changed | The source of the “four objects” figure |
Online “working memory tests” are mostly one of these. We used span here because the seven people quote comes from it, and the 1974 reasoning task because the model comes from it. Kane and colleagues found that n-back and span tasks correlated weakly, so one may not stand in for the other.
Where is it in the brain?
In 1971 Fuster and Alexander recorded prefrontal neurons in monkeys that kept firing during a delay, while the animal held something no longer in view. For a long time this made the prefrontal cortex look like the store.
It’s since widened. A 2005 meta-analysis of 24 n-back imaging studies found a network of frontal and parietal regions. D’Esposito and Postle’s influential 2015 review argues that “networks of neurons located anywhere in the brain can potentially store information”, with prefrontal cortex a source of the control signals.
Even the firing may not be the whole of it. In one study, the signal for an item held in mind but out of focus dropped to baseline, and people could still retrieve the item when cued. Whether storage is done by persistent firing, by changes at synapses, or by both, is an open question in that review.
Is working memory the same as short-term memory?
Not quite, and the field isn’t tidy about it. Cowan counts three definitions in use: short-term memory applied to tasks, a multi-part system that holds and manipulates information, and the use of attention to manage short-term memory.
| Working | Short-term | Long-term | Echoic | |
|---|---|---|---|---|
| Job | hold and use | hold | keep | keep a raw sound |
| Lasts | seconds, unless kept going | seconds, unless kept going | minutes to decades | usually seconds |
| Limit | a handful of chunks | a handful of chunks | a vast store | not settled |
| Classic test | complex span | digit span | recall after a delay | suffix effect |
Cowan calls the disagreement “a slightly confusing discrepancy in the usage of terms” more than a debate about substance. One practical difference does hold up: in adults, simple serial recall correlates with aptitude tests less well than tasks that add processing or prevent rehearsal. Why is still argued about.
For the briefer store that comes before all of this, see echoic memory. For how short-term memory was told apart from long-term, see short-term and long-term memory.
What do people get wrong about it?
That the limit is seven
Simply Psychology’s summary gives “around 7 ± 2 items or only a handful of chunks”, and the seven is the part people remember. Miller was describing the span of immediate memory, with its tricks included. He called seven turning up in both absolute judgment and immediate memory a “coincidence”, and the two “quite different kinds of limitations”. His opening is a joke about being “persecuted by an integer”, and Cowan reports from Miller’s later essay that he was never very serious about seven: it tied a talk together.
That the 1974 chapter set out all three parts
The usual summary, Baddeley’s own 2000 abstract included, says the 1974 model had three parts. The chapter’s model names two: a central executive and a phonemic rehearsal buffer.
Its section on vision says “it is clear” that visual and auditory storage use different subsystems, and leaves open how they relate. The authors’ later account says the visual component was built in over the following years. Courses usually expect three parts, so use your course’s wording in an exam.
That 1 to 2 seconds is a known fact about the loop
Simply Psychology gives the store “1-2 seconds” without comment. The loop’s own authors no longer treat that as settled, as the section above describes.
That the prefrontal cortex is where it’s stored
This was the reading of the early monkey recordings. The 2015 review treats prefrontal cortex mainly as a source of control signals, with storage possible well beyond it.
That training it makes you smarter
Melby-Lervåg, Redick and Hulme pooled 87 publications. Training raised scores on memory tests, most of all on tasks similar or identical to those trained, and those gains lasted about five months. On other verbal memory tests the gains had gone by then in studies with treated controls, and modest visuospatial ones remained. With treated control groups, they found “no convincing evidence” of gains on intelligence tests, reading or arithmetic.
Gobet and Sala’s later analysis found the same near-zero result, and criticises the field’s optimism. Researchers on the other side, such as Au and colleagues, read the control groups differently. We’re reporting the studies here, and none of this is advice about anyone’s own memory.
Working memory and fluid intelligence are strongly related, so this surprises people. Melby-Lervåg and colleagues suggest one reading: the link may not be causal.
Is an AI’s context window its working memory?
That’s the usual comparison, and it holds in some ways. The context window is what a model can use while it answers, and anything else has to be brought into it. MemGPT says information “must always be explicitly moved into main context”, much as you pull a fact out of long-term memory to use it. The CoALA framework goes wider: it says earlier methods used the model’s own context “as a form of working memory”, and defines its own as “a data structure that persists across LLM calls”.
The comparison fails on the limit. Anthropic’s context windows run up to a million tokens, far more than a handful of anything, and tokens don’t decay with time, so nothing needs rehearsing. It stops at a hard edge, and long conversations can be compacted to fit.
The part that does carry over is what happens at the end. Both empty out unless something gets written somewhere lasting. Counterparts, the memory system whose site this is, has the AI write down what it learned in its own words, and brings related memories back in as you talk.
The Field Guide takes other mechanisms through to what AI systems did with them, and the directory compares the systems.
Questions people ask
What is working memory in simple terms?
The few things you can keep in mind and use at once, like the number you're carrying while you add up in your head. It's quickly lost once your attention moves on.
What is an example of working memory?
Multiplying 27 by 42 in your head: you keep 1,080 while you work out 54, then add them. Cowan's examples are carrying a digit in a sum, keeping the start of a long sentence until its end arrives, and planning the best order for three errands.
What is the difference between working memory and short-term memory?
Short-term memory usually means holding information for a short time, and working memory means holding it and using it. Researchers draw the line in different ways: Cowan counts short-term memory as part of working memory, and Engle keeps the name working memory for the part that takes attention.
What is the working memory model?
Usually Baddeley and Hitch's multicomponent model. A central executive controls attention, a phonological loop holds speech sounds, a visuospatial sketchpad holds what things look like and where they are, and an episodic buffer, added in 2000, binds these with long-term memory into one scene.
How many things can working memory hold?
About seven digits if you can rehearse and group them, which is what Miller described in 1956. When rehearsal and grouping are curtailed, Cowan puts it at 3 to 5 chunks in young adults. Some researchers doubt there's a fixed number of items at all.
How long does working memory last?
Seconds without rehearsal or attention, but there's no agreed number. Whether things fade with time or get displaced by other things is still argued about.
Who came up with working memory?
Miller, Galanter and Pribram used the term in 1960. Baddeley and Hitch's 1974 chapter tested the idea and started the model most courses teach.
Is there a working memory test?
Researchers use digit span, complex span tasks such as reading span, n-back and change detection. The demos on this page show two tasks of that kind and aren't a standardised test: they have no norms and too few trials to say anything about a person.
Can you improve working memory?
In training studies, practice raised scores on similar memory tasks, for some months on those tasks. A 2016 meta-analysis found no convincing evidence that this carried over to intelligence tests, reading or arithmetic when training was compared with a treated control group. Some researchers still dispute how to read these studies.
Where in the brain is working memory?
Imaging of the n-back task shows frontal and parietal regions working together. One influential review, D'Esposito and Postle's, argues that storage can happen across the brain, with the prefrontal cortex a source of the signals that control it.
What should I write in an exam?
Your course's definition first: a limited system that holds and manipulates information. Then Baddeley and Hitch (1974) and its later revisions, the components your course lists, and the evidence: word length (since questioned) and articulatory suppression for the loop, dual tasks for separate stores. Then the capacity debate, Miller's seven against Cowan's four, and that the central executive is criticised as vague.
Questions about how any of this carries over to AI? Ask in r/AIMemorySystems.
References
Sources
- Baddeley & Hitch (1974). Working memory. In Bower (Ed.), The Psychology of Learning and Motivation, 8, 47-89. Read in the parts cited, from a scan on a course site; Tables II and III read from the page images.
- Hitch, Allen & Baddeley (2025). The multicomponent model of working memory fifty years on. Quarterly Journal of Experimental Psychology. Read in the parts cited.
- Baddeley (2000). The episodic buffer: a new component of working memory? Trends in Cognitive Sciences, 4, 417-423. Abstract only.
- Miller (1956). The magical number seven, plus or minus two. Psychological Review, 63, 81-97. Read in the parts cited.
- Cowan (2010). The magical mystery four. Current Directions in Psychological Science, 19, 51-57. Read in full. Our source for Chen & Cowan and for Cowan (2001).
- Cowan (2008). What are the differences between long-term, short-term, and working memory? Progress in Brain Research, 169, 323-338. Read in the parts cited. Our source for Peterson & Peterson (1959), Baddeley & Scott (1971), Lewandowsky et al. (2004) and Daneman & Carpenter (1980).
- D'Esposito & Postle (2015). The cognitive neuroscience of working memory. Annual Review of Psychology, 66, 115-142. Read in the parts cited. Our source for the 1960 passage from Miller, Galanter & Pribram, and for Fuster & Alexander (1971).
- Ma, Husain & Bays (2014). Changing concepts of working memory. Nature Neuroscience, 17, 347-356. Read in the parts cited.
- Luck & Vogel (1997). The capacity of visual working memory for features and conjunctions. Nature, 390, 279-281. Abstract only.
- Ericsson, Chase & Faloon (1980). Acquisition of a memory skill. Science, 208, 1181-1182. Abstract only.
- Chase & Ericsson (1980). Skilled memory. Technical report TR-5, Carnegie-Mellon University. Read in the parts cited, from a copy of the DTIC report on another site, since DTIC's own host refused the download.
- Kane, Conway, Miura & Colflesh (2007). Working memory, attention control, and the n-back task. JEP: Learning, Memory, and Cognition, 33, 615-622. Abstract only.
- Owen, McMillan, Laird & Bullmore (2005). N-back working memory paradigm: a meta-analysis of normative functional neuroimaging studies. Human Brain Mapping, 25, 46-59. Abstract and the parts cited.
- Conway et al. (2005). Working memory span tasks: a methodological review and user's guide. Psychonomic Bulletin & Review, 12, 769-786. Abstract only.
- Melby-Lervåg, Redick & Hulme (2016). Working memory training does not improve performance on measures of intelligence or other measures of "far transfer". Perspectives on Psychological Science, 11, 512-534. Read in the parts cited.
- Gobet & Sala (2023). Cognitive training: a field in search of a phenomenon. Perspectives on Psychological Science, 18, 125-141. Read in the parts cited. Our source for the view that other researchers read these studies differently.
- Sumers, Yao, Narasimhan & Griffiths (2024). Cognitive architectures for language agents. Transactions on Machine Learning Research. Read in the parts cited.
- Packer, Wooders, Lin, Fang, Patil, Stoica & Gonzalez (2023). MemGPT: towards LLMs as operating systems. Read in the parts cited.
- Anthropic, Context windows. Read in the part cited, for the size of a context window.
- Simply Psychology, Working memory model. A secondary source, used for what summaries say, and for backward span and complex span tasks.
- Wikipedia, Working memory. A secondary source, used for what summaries say, and for how the reading span task runs.
Last checked on . Peterson & Peterson (1959), Cowan (2001), Miller, Galanter & Pribram (1960) and Daneman & Carpenter (1980) weren’t read directly, so the notes above say whose description we relied on. Made by Counterparts AI. Counterparts is an open source memory for AI. If something here is wrong, tell us.