A Shuffled A Deck Of Cards: The Order Has Never Appeared Before

When you well shuffle a deck of cards the resulting order has never appeared before in all of history! Amazing but true. This is just another example of how our intuition misleads us.

A few years ago I decided I should learn a few card tricks. …

While idly shuffling cards I stopped and wondered: what is the chance that a deck of cards has ever occurred before in exactly the same order as the ones in my hand? [1]

On the one hand, I knew that there are many, many, many possible orderings of a 52-card deck. On the other hand, there are millions of decks of cards being shuffled all the time. Just imagine all the shuffling in Vegas alone!

The answer is truly startling! I was surprised and delighted by the how incredibly likely my deck of cards had never occurred before. Let’s do the numbers together.

First, how many orderings are there for 52 card deck?

Well, let’s say we have an ordered deck and work our way from top to bottom counting the possibilities. There are 52 possibilities for the top card. Whatever that is, there are 51 possibilities for the second card (because it can’t be whatever the top card was). Whatever the top two cards are, there are 50 possibilities for the third card (because it can’t be either of the two top cards). And so on. At the very end there is only one possibility for the last card as the other 51 are already accounted for.

To get the total number of possible orderings, we should multiple 52, 51, 50, …., 3, 2, 1 all together (to see that this is right, it’s easier to try it first with a 3 or 4 card deck). The shorthand for this product is 52! (read fifty-two factorial). According to wolframalpha, the number of different orderings of a 52 card deck is:


This is round about 80 vigintillion. That’s 80 with 63 zeros after it. By way of comparison, that is way, way more than the number of atoms which make up the Sun. A big number by anyone’s measure!

Now, how many different orderings have occurred in the history of card shuffling? There is no way to know, of course, but we can estimate. To be on the safe side, at every step we’ll err on the side of overestimating.

Now, imagine that from the moment cards were invented everyone devoted every second of every day to shuffling decks of cards. To count the number of orderings which have occurred, we multiply these numbers. That is, the number of orderings we’ve seen so far is at most:


That’s 5 sextillion; a 5 with 21 zeros after it. That’s a huge number – but it’s way, way smaller than the 80 vigintillion possible orderings.

In fact, to go back to my original question, the odds that my well mixed deck of cards has occurred before is (5,000,000,000,000,000,000,000)/(52!). Computing this on wolframalpha, we see that’s comparable to the odds of picking one out of all the atoms in the earth.

Here’s another way to put it in perspective. Let’s compare the likelihood of my deck of cards having previously occurred with winning the Powerball lottery. The odds of winning the grand prize in the Powerball lottery is 1 in 175,223,510. A quick calculation shows that it is more likely that I will win the next five Powerball drawings in a row!


[1] By well mixed, I mean the cards have been shuffled enough so that every possible ordering is equally likely. By shuffle I’m thinking of the usual riffle shuffle used by most card players. It’s not hard to see that certain orderings can’t possibly happen after only one shuffle. For example, if you think about the card which is at the bottom of your deck, after one shuffle it is still somewhere in the bottom half of your deck. So definitely not all orderings are equally likely after one shuffle. And indeed there are card tricks which depend upon the fact that even after three shuffles a deck is still not well mixed!

So how many shuffles does it take to ensure a deck is well mixed? Mathemagician Persi Diaconis and Dave Bayer answer that question in a delightful paper entitled “Trailing the dovetail shuffle to its lair” which is available here. In it they compute how close a deck of cards is to well mixed after m shuffles. Here is the table from their paper where they compute the “distance” between a deck shuffled m times (Qm in the table) and a well mixed deck (U in the table). Remarkably, their work shows that while the first few shuffles of a deck aren’t very random, you converge to a well mixed deck very rapidly thereafter. You can also read about their work here.

Screen Shot 2014-02-27 at 10.21.06 AM

The upshot is that seven shuffles is probably enough to consider the deck well mixed for every day card play, and 15 shuffles is plenty if you’re playing for serious money.

Liked it? Take a second to support Dr John Messerly on Patreon!
Become a patron at Patreon!

2 thoughts on “A Shuffled A Deck Of Cards: The Order Has Never Appeared Before

  1. the fact regarding shuffling of cards was unknown to me. I know little about combinations; permutations or probabilities, but would have found it difficult to believe:
    there are “only” fifty-two cards in a deck. ..so many things to know;so little time. I saw two butterflies this April morning. I suppose that is not so uncommon. but, it is only April.

  2. intuition fits well into matters of philosophy. as Dennett wrote, it is a nother tool for thinking—not necessarily to get one onto a successful track to solution of a problem but to get him/her to thinking better. in situations where there is much doubt and uncertainty, it is better to have more spahgetti to throw on the wall.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.