The number of different orders a deck of 52 cards can be in. Here it is in full, because almost nowhere writes it out.
80658175170943878571660636856403766975289505440883277824000000000000
68 digits · about 8.0658 × 1067 · ends in 12 zeros
You have heard that there are more ways to shuffle a deck than there are atoms in the universe. That is false, and it is off by a factor of more than a trillion.
The observable universe holds roughly 1080 atoms. 52 factorial is about 8 × 1067. So the universe wins, by about 1.24 × 1012 to one.
The true version of the claim uses Earth. Our planet holds about 1.33 × 1050 atoms, and 52 factorial is roughly 600 quadrillion times larger than that. That is still an absurd number, and it does not need exaggerating.
This is why the claim keeps turning up on r/theydidthemath. It is repeated far more often than it is checked.
Each row takes a published estimate and divides. The estimates are other people's and are listed at the bottom. The arithmetic is ours, and you can redo it.
| Compared with | How many | Against 52! |
|---|---|---|
| Grains of sand on Earth | 7.5 × 1018 | 52! is 1.08 × 1049 times more |
| Stars in the observable universe | 1024 | 52! is 8.07 × 1043 times more |
| Seconds since the Big Bang | 4.35 × 1017 | 52! is 1.85 × 1050 times more |
| Atoms in the Earth | 1.33 × 1050 | 52! is 6.06 × 1017 times more |
| Atoms in the observable universe | 1080 | 52! is 1.24 × 1012 times fewer |
Take every human being who has ever lived, about 117 billion of them. Give each one a deck at the moment of the Big Bang and have them shuffle once a second, without stopping, until today.
They would produce about 5.09 × 1028 orders. That is one part in 1.58 × 1039 of the total. Not one order in a billion billion billion billion of them.
So the honest answer is: almost certainly never, for a properly shuffled deck. That qualifier does real work. A new deck comes in a fixed order, and casinos and card rooms see the same near-orders constantly, because a bad shuffle does not reach anywhere near 52 factorial. Which is the next question.
Seven. Dave Bayer and Persi Diaconis proved in 1992 that a 52-card deck needs about seven riffle shuffles before it is close to random. Below seven, the order left over is large enough to measure. After seven, the improvement per shuffle falls away sharply.
Everywhere else says that and asks you to take it on trust. Here is the deck.
A sorted deck has one. A properly shuffled deck has about 26.5. Riffle it and watch.
The riffle here is the Gilbert-Shannon-Reeds model, which is the one the theorem is about: cut the deck roughly in half, then drop cards from whichever half is thicker, more often. A rising sequence is a run of consecutive cards still in order inside the deck, and counting them is how you measure what is left of the order you started with.
Orders you have generated in this browser: 0. That is 0 of 52 factorial.
This is why card magic works at all. A single cut leaves the deck in one of only 52 arrangements out of 8 × 1067, which is why a stacked deck survives being cut all evening. And it is why the tricks on this site can promise an outcome: they do not fight the number, they arrange never to depend on it.
Exact, using whole-number arithmetic rather than floating point, so nothing is rounded away. Try 32 for a piquet deck, 40 for a Spanish one, or 78 for a tarot deck.
52 × 51 × 50 and so on down to 1, which counts the different orders a 52-card deck can be in. It is a 68-digit number, printed in full at the top of this page.
No. The observable universe holds roughly 1080 atoms, about 1.24 trillion times more than 52 factorial.
The claim is true of Earth rather than the universe. Our planet has about 1.33 × 1050 atoms, and 52 factorial is around 600 quadrillion times larger than that.
Twelve, at the end. Each trailing zero needs a factor of 10, which means a 5 paired with a 2, and there are far more 2s than 5s in the product.
So count the 5s: ten multiples of 5 between 1 and 52, plus one extra each from 25 and 50, since those contribute two apiece. Twelve.
Seven riffle shuffles, from Bayer and Diaconis in 1992. Fewer leaves order a statistician can detect, and a magician can exploit.
Because it is the size of the haystack, and every trick is a way of not searching it. A mathematical card trick works by making the outcome independent of the order, so the number stops mattering.
Every estimate above is somebody else's and carries its own uncertainty. What this page adds is the division, done exactly and shown.
This sits under mathematical card tricks, which collects the tricks that run on arithmetic rather than on sleight of hand: parity, base three, arithmetic modulo 13, and one number that cancels itself out.