GCSE
GCSE (Foundation)GCSE (Higher)
A-level
IB
IB AA (Standard Level)IB AA (Higher Level)
1-1 Tutoring
← All articles

Why no one has ever shuffled a deck of cards the same way twice

80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,824,000,000,000,000. That is how many different orders a standard deck of 52 playing cards can be in — about 8.07×10678.07 \times 10^{67}. It is the reason card players love to claim that every time you give a deck a proper shuffle, you are holding an arrangement of cards that has never existed before in human history. In this paper we will derive that number for ourselves using a single counting tool — the factorial — and then, in the honest spirit of this series, put the "never the same twice" claim itself on trial.

Counting arrangements with the factorial

Imagine building an arrangement one card at a time. For the first card you have 5252 choices. Whichever card you pick, only 5151 remain for the second position, then 5050 for the third, and so on, until a single card is left for the final slot. Each choice multiplies the possibilities, so the total number of orderings is:

52×51×50××2×1=52!52 \times 51 \times 50 \times \cdots \times 2 \times 1 = 52!

This product is called a factorial — written n!n!, it counts the number of ways to arrange nn distinct objects in a row. A quick sanity check with three cards A, B, C: we expect 3!=3×2×1=63! = 3 \times 2 \times 1 = 6 orderings, and indeed we can list them all — ABC, ACB, BAC, BCA, CAB, CBA.

A shrinking tree of choices: 52 options for the first card, 51 for the second, 50 for the third

Factorials grow explosively. After just three cards we are already at 52×51×50=132,60052 \times 51 \times 50 = 132{,}600 possibilities; multiplying all the way down to 11 produces the 68-digit monster above, which we will round to 8.07×10678.07 \times 10^{67}.

Numbers like this defeat intuition, so let us convert it into time. The universe is about 13.813.8 billion years old — a figure we derive in another article — which works out to roughly 4.4×10174.4 \times 10^{17} seconds.

  1. Suppose you had dealt out one new arrangement every second since the Big Bang. You would have seen about 4.4×10174.4 \times 10^{17} arrangements — a fraction 4.4×10178.07×10675×1051\frac{4.4 \times 10^{17}}{8.07 \times 10^{67}} \approx 5 \times 10^{-51} of the total. You would not have made a dent.

  2. Now recruit all 8.18.1 billion people alive today [2] and have every one of them deal a new arrangement each second since the Big Bang. Together you cover about 4×10414 \times 10^{-41} of the possibilities — still effectively nothing.

  3. To work through all 52!52! arrangements at one per second would take about 1.9×10501.9 \times 10^{50} ages of the universe.

Has anyone really repeated a shuffle?

Here we must be careful. A huge number of possibilities does not, by itself, prove that no repeat has ever happened — for that we need to think about collisions, the same idea that powers the famous birthday paradox. With NN random shuffles ever performed, the probability that some pair of them matches is approximately:

P(repeat)N22×52!P(\text{repeat}) \approx \frac{N^2}{2 \times 52!}

Let us overestimate wildly: say 1010 billion people have each shuffled a deck once every three seconds, non-stop, for a century. That gives roughly 101910^{19} shuffles; call it N=1020N = 10^{20} to be safe. Then:

P(repeat)(1020)22×8.07×10676×1029P(\text{repeat}) \approx \frac{(10^{20})^2}{2 \times 8.07 \times 10^{67}} \approx 6 \times 10^{-29}

The chance that any two properly shuffled decks in all of history have matched is about 11 in 102810^{28}. The claim survives — with one honest caveat. It assumes shuffles are genuinely random. Fresh decks all leave the factory in the same order, and Bayer and Diaconis famously showed that it takes about seven riffle shuffles to properly randomise a deck [1]. Two people each giving a new deck a single lazy riffle could quite plausibly produce the same arrangement.

So the legend holds

A deck of 52 cards has 52!8.07×106752! \approx 8.07 \times 10^{67} possible orderings — so many that all of humanity shuffling every second since the Big Bang would explore only a 104110^{-41} sliver of them, and the probability of any repeat in history is about 6×10296 \times 10^{-29}. So the legend holds: shuffle a deck well, and the arrangement in your hands has almost certainly never existed before. Just make sure you actually shuffle it well.


References:

[1] Dave Bayer and Persi Diaconis, "Trailing the Dovetail Shuffle to its Lair", The Annals of Applied Probability 2(2), 294–313 (1992).

[2] Our World in Data: Population Growth

Note: The "never the same twice" claim applies to well-shuffled decks. Freshly opened decks given one or two lazy riffles genuinely can repeat, because they all start from the same factory order.