How many shuffles does it take to randomize a deck of cards?

The answer depends on the type of shuffle you use. With a bit of math, we can determine that a brand-new deck will be effectively randomized after seven traditional (or “riffle") shuffles.

First, a quick definition of a riffle shuffle: Divide the deck into two roughly equal halves, then use your thumbs to pull up (or down) on the ends of each stack. Allow the halves to fall so that the cards alternate. If you’re having trouble visualizing that, here’s a quick video that shows the riffle shuffle in more detail.

This is the shuffle that most people visualize when they think about a card shuffle, and it’s a fairly effective means of randomizing a deck (as opposed to other types of shuffles, which might not mix the cards quite as thoroughly).

Now, let’s assume that you’re starting with a brand-new deck of cards. All of the cards are in order by suit and by rank. To randomize the cards, you should riffle shuffle at least seven times.

A paper written by Brad Mann of Harvard University’s Department of Mathematics explains why. It’s a bit complex, but basically, a single riffle shuffle won’t result in a totally random deck, since many of the cards will be in a predictable position. The top card will likely remain in the top position, and while it might be in the second or third position, that’s not really random—if the two of hearts started on top, you can say with confidence that it’s near the top after a single shuffle.

However, every additional shuffle increases the likelihood that a given card will be in any given position. After two shuffles, you can say with confidence that your two of hearts is near the top, but you can’t necessarily declare that it’s in a certain position. More shuffles introduce more randomness.

To call the deck “random,” every possible combination of cards needs to be equally likely, and that occurs after seven shuffles. Six shuffles is much less random—but eight shuffles won’t make the deck significantly more random. Seven shuffles should do the trick in a real-world setting.

So, what if you use an overhand shuffle? That’s another common shuffle, often favored by people who can’t master the riffle, where you simply drop groups of cards into your hand to form a new stack.

If that’s your preferred technique, you’ll need to do a lot of work. Overhand shuffling doesn’t really change the order of the cards too significantly, so you’ll need about 2,500 shuffles to get the same level of randomness you’d get from seven riffle shuffles.

What about perfect shuffles?

Riffle shuffles work well for randomizing because they move a large number of the cards out of order, but they also work because they’re imperfect. You don’t spend time making sure that the cards alternate perfectly between the two halves of the deck—that would take quite a while, and it would actually make your shuffles less effective if your goal is total randomization.

Perfect shuffles do exist, however. If you cut the cards into two completely equal halves and perfectly interlace them with the top card staying on top, that’s called an out-shuffle. If the top card moves to the second position, that’s called an in-shuffle.

Those might seem like better options for randomizing a deck, but eight perfect out-shuffles will return the deck to its original position. In other words, if you start with a brand-new deck and out-shuffle eight times, the deck will be in the sequential order it was in when you took it out of the box. Similarly, 52 in-shuffles will return the deck to its original position.

Magicians often use trick shuffles to control the position of cards in the deck. They know, for instance, that a single riffle shuffle is unlikely to radically change the position of the cards, so they might offer to shuffle after forcing a card to add some mystery to a trick. They might use in-shuffles and out-shuffles to send cards to a certain position, or they might use overhand shuffles to keep the deck in roughly the same order.

With that said, if you riffle shuffle seven times, you can count on a high degree of randomness. That’s an understatement: There are more ways to arrange a deck than there are atoms in the universe, and after seven shuffles, all of those arrangements are about equally as likely.