The Math · 02
Why seven shuffles?
0.334
In 1992, mathematicians Dave Bayer and Persi Diaconis published “Trailing the Dovetail Shuffle to its Lair,” the paper that pinned down exactly how many riffle shuffles it takes to randomize a 52-card deck. Their headline result: after seven riffle shuffles, a deck's distance from a truly uniform random order (measured as total variation distance) is 0.334. That single number is where the popular advice “shuffle seven times” actually comes from.
What that number means
Total variation distance measures how far a probability distribution is from another one: here, how far “the actual chance of each deck order after k shuffles” is from “every one of the 52! orders being exactly equally likely.” It runs from 1 (nowhere close to random: an observer who knows the shuffling process could guess a lot about the order) down to 0 (perfectly uniform: no information about the process helps predict the order at all).
A distance of 0.334 is not zero. It means a small amount of structure from the original order is still statistically detectable after seven shuffles, not structure a person could see or exploit at a card table, but structure a mathematician with the full probability distribution in hand could still measure. It's “good enough for practical purposes,” not “mathematically perfect.”
The Bayer–Diaconis numbers
Their paper reports the distance for a range of shuffle counts. The published values for five through eight shuffles show the shape of the drop:
| Shuffles | Distance from random |
|---|---|
| 5 | 0.924 |
| 6 | 0.614 |
| 7 | 0.334 |
| 8 | 0.167 |
Before five shuffles, the distance sits close to its maximum. Nowhere near random yet. Between six and eight it falls sharply: it roughly halves from seven shuffles to eight alone. That sharp-drop-then-diminishing-returns shape is what mathematicians call a mixing “cutoff,” and it's why seven became the number everyone quotes: it's close to where the curve bends, not an arbitrary round number.
Why this archive runs 7 to 13, not exactly 7
Seven is the number that made the result famous, but it isn't a wall: 0.334 is still a nonzero distance, and the curve keeps falling well past it. Every shuffle archived here runs a number of passes chosen uniformly at random between 7 and 13, rather than a fixed count.
Two reasons. First, it means every archived deck sits somewhere between “the famous minimum” and “deep into the flat part of the curve, essentially indistinguishable from uniform,” never relying on 7 being exactly enough on its own. Second, varying the pass count avoids locking the entire archive into the statistical fingerprint of one fixed protocol; see the GSR model page for how each individual pass is actually simulated, and methodology for why that choice doesn't affect the odds of a match either way.