When you riffle shuffle a real deck, the randomness doesn't come from the shuffle itself. It comes from your hands: a cut that's a little off center, cards that fall in uneven clumps. Here you control how sloppy the hands are, and watch what that does to the deck.
This deck's number: 0 Open it on the Shuffle page →
A perfect riffle cuts the deck into exactly 26 and 26 and lets the cards fall one at a time, perfectly alternating. Magicians call it a faro shuffle, and the best of them can do it on demand. Nothing about it is random: the same deck in always gives the same deck out.
If the top card stays on top (an out-faro, which is what this lab does), 8 perfect shuffles bring a 52-card deck all the way back to its starting order. If the top card goes second instead (an in-faro), it takes 52. Because every perfect shuffle is predictable, a skilled card handler can work out exactly where any card will be after any number of them.
Real hands cut a little off center and drop cards in clumps. The standard model of this, known as the Gilbert–Shannon–Reeds model, is what the Ordinary end of the slider does: the cut follows the spread you'd get from flipping 52 coins, and each card falls from one half or the other with odds that depend on how many cards that half has left.
In 1992, Dave Bayer and Persi Diaconis worked out exactly how close to random a deck gets after each of these shuffles. For the first four, the deck is still easy to tell apart from a random one. Then it changes fast:
How far the deck is from perfectly mixed after each ordinary riffle (total variation distance, from Bayer and Diaconis). 100% means you could always tell it apart from a random deck; 0% would be perfectly mixed.
Seven is where the deck first gets reasonably close to random, which is why it's the number people quote. Fewer than that and clear traces of the starting order survive; that's the rising-sequences meter above, which one shuffle can at most double.
Even the sloppiest riffle is limited. Every card goes to one half or the other, so a single riffle can produce at most 252 − 51 different orders. Four riffles can then reach at most about 2208 orders, but there are about 2225.6 possible decks. So it takes at least five riffles just to make every deck possible, and about seven before they're all close to equally likely.
Which is also why a well-shuffled deck in someone's hands, not just one picked by a computer, is almost certainly an order nobody has ever held before.