Miller’s Law
Synonyms: The magical number seven, 7±2 rule, memory span limit, working memory capacity, short-term memory limit
Definition
Use cases
- The 7-link nav myth: A team cuts the menu to exactly 7 links “because Miller’s Law” and hides pages people need. Menus stay on screen while users scan them, so their length barely touches memory.
- Disappearing codes: A booking code shows on one screen and gets asked for on the next. Users have to carry 6 to 8 random characters across a page change, and typos follow.
- Unbroken card fields: Baymard saw users struggle to type 15 to 16 straight digits without a mistake. One typo means a validation error at the worst moment.
How it's used in practice
- Auto-format long strings: Split card, phone, and IBAN fields into groups (4-4-4-4 for most cards, 4-6-5 for Amex).
- Section long forms: Group fields under labels like Contact, Shipping, and Payment so users deal with one set at a time.
- Carry details forward: Keep the order total, chosen plan, or code visible on later steps.
- Test recall: In usability tests, ask what users picked 2 screens back. If they can’t say, the flow is too heavy.
Challenges & limitations
- The number gets abused: “7±2” gets quoted as a hard cap for tabs, menus, and slides. Miller studied recall after brief exposure, and most UI tasks don’t work that way.
- Chunks are personal: A developer reads “API-KEY-V2” as 1 chunk. A new user sees 9 random characters. Stress and multitasking shrink capacity too.
- Hard to measure: No analytics tool tracks working memory. You have to read it from errors, drop-offs, and back-button use.
Free resources
- NN/g: The Magical Number 7 and UX (video) — short video on what the number does and doesn’t mean for design
- NN/g: Minimize Cognitive Load to Maximize Usability — practical ways to cut mental effort
- Baymard: Auto-Format Credit Card Spaces — usability data on chunking card numbers, including Amex’s 4-6-5 format
