A standard deck of 52 different cards can be arranged in exactly 52 factorial ways:
80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,824,000,000,000,000
That's 52 × 51 × 50 × … × 1. The number has 68 digits, and in scientific notation it is about 8.07 × 1067. It ends in 12 zeros, which come from factors of 10 in the product, not from rounding. This is the exact integer.
If the question is "how many ways can you shuffle a deck of cards?", that exact count is the answer: the number of possible orders of a thoroughly shuffled 52-card deck.
Why it's 52 factorial
Picture building a shuffled deck one card at a time. Any of the 52 cards can sit on top. Once that card is chosen, 51 remain for second place, then 50 for third, and so on, down to the last card, which has no choice left. Multiply those options together and you get 52 factorial, written 52!.
This only works because the cards are all different. In a standard deck they are: the ace of spades is not the ace of hearts, and four suits of 13 ranks make 52 unique cards. If two cards were identical, some of those arrangements would be indistinguishable, and the count would be smaller. Add two distinct jokers and the count becomes 54!, which is larger still. Leave the jokers in the box, and 52! is the right number.
The product grows faster than it looks. A 5-card deck has 120 orders. A 10-card deck has 3,628,800. Thirteen cards can be arranged in 6,227,020,800 ways, already in the same ballpark as the number of people alive today. Twenty cards get you to about 2.43 × 1018. Then the remaining 32 cards do the real damage.
How big is that, really?
A 68-digit number is hard to feel, so people reach for comparisons. Some of the ones that travel farthest don't hold up. Here are a few that do, with the arithmetic attached.
One shuffle per second since the beginning of the universe. The universe is about 13.8 billion years old. Planck's 2018 cosmological parameters put the age at 13.797 ± 0.023 billion years. Using the International Astronomical Union's Julian year of 365.25 days (31,557,600 seconds), that is about 4.35 × 1017 seconds. If you had written down one new deck order every second since the Big Bang, you would have only 4.35 × 1017 of the 8.07 × 1067 possible orders — roughly 1 in 1050 of them. 52! is about 1.85 × 1050 times larger than the number of seconds since the universe began.
The atoms-in-the-universe comparison is backwards. You will still see it claimed that there are more ways to shuffle a deck than there are atoms in the universe. That one is close enough to be tempting, and it is wrong. The number of atoms in the observable universe is an order-of-magnitude estimate, on the order of 1080, based on the measured density of ordinary matter (baryons) and the volume of the observable universe. 1080 is about a trillion times larger than 8.07 × 1067. 52! is still almost unimaginably large. It is just not larger than that.
We are deliberately not piling on looser comparisons — grains of sand, stacked hypothetical planets, and the like — because those estimates vary a lot depending on who is counting, and 52! does not need the help.
How many riffle shuffles randomize a deck?
Having 52! possible orders is one thing. Getting a real deck close to a random one of those orders is another.
The usual riffle, or dovetail, shuffle is the one where you split the deck about in half and let the two halves fall together. In 1992, Dave Bayer and Persi Diaconis analyzed a precise model of that shuffle — the Gilbert–Shannon–Reeds model — and calculated how far a 52-card deck sits from a uniformly random order after each riffle. In their model, the deck is cut around the middle, with some natural variation, and cards then drop from each half in proportion to how many cards are left in it.
The distance they used is called total variation distance. A value of 1 means the deck is still essentially distinguishable from random. A value of 0 would be perfectly random. Here is their Table 1 for 52 cards, to the three decimal places printed in the paper:
| Riffle shuffles | Distance from random |
|---|---|
| 1 | 1.000 |
| 2 | 1.000 |
| 3 | 1.000 |
| 4 | 1.000 |
| 5 | 0.924 |
| 6 | 0.614 |
| 7 | 0.334 |
| 8 | 0.167 |
| 9 | 0.085 |
| 10 | 0.043 |
The distance stays at its maximum through four riffles. It barely budges at five (0.924), then falls fast: 0.614 after six, 0.334 after seven, 0.167 after eight. From there, each extra riffle cuts the remaining distance roughly in half. That sudden drop after a long flat stretch is what mathematicians call a cutoff. Seven riffles is the first point at which the distance falls below one half, and it is the figure usually taken from this paper: seven shuffles approximately randomize a 52-card deck.
"Approximately" is doing real work. After seven riffles the distance is 0.334, not zero. Eight or nine get you closer. The result also applies to this model of a riffle shuffle, not to every way of mixing cards. Bayer and Diaconis note that experiments reported in Diaconis (1988) suggest the model is a good description of how real people riffle. A messy overhand shuffle, a wash on the table, or a few lazy riffles from a brand-new deck are different processes, and a new deck still has cards sitting in factory-order runs until it has been mixed well.
A perfect faro is a different animal. Split a 52-card deck exactly in half and interleave the cards one for one, leaving the original top card on top — an "out" shuffle, in the language of Diaconis, Graham and Kantor (1983) — and eight perfect shuffles return the deck to its original order. We checked that by following the shuffle; it also follows from their result on the cycle length of a perfect out-shuffle. That's a great trick, and the opposite of mixing.
Why your shuffle is almost certainly unique
Take a deck that has actually been well shuffled — close to a uniform random order, not three riffles out of the tuck. The order in your hands is almost certainly one that has never been seen before, and will never be seen again.
The arithmetic is lopsided enough that you don't need a precise head count of every deck ever shuffled. Even if eight billion people had each produced a thoroughly random shuffle every second for the entire 13.8-billion-year age of the universe, they would have made about 3.5 × 1027 decks. That's roughly 1 in 1040 of the possible orders.
The qualifier matters. A new deck comes in a fixed factory order, and that order has been produced many times. A poorly shuffled new deck is still close to that starting point, so it is not sampling from all 52! possibilities. Once the deck is actually mixed, though, you can be about as sure as these numbers allow that the sequence in front of you is unique.
Every standard 52-card deck has the same number of possible orders, whether it's a workhorse Bicycle you deal for poker night or a limited edition that never leaves the tuck. The math does not care about the back design. PlayingCardHub is a free deck database and collection tracker, so if you want to look up a particular 52-card deck, you can find it in the catalog.
Our take
52! is one of those facts that sounds like a bar-bet exaggeration until you multiply it out. The exact number is the one at the top of this page. It is far larger than the number of seconds since the Big Bang, and — despite a comparison you will still see everywhere — smaller than the number of atoms in the observable universe. Seven careful riffle shuffles will get a 52-card deck reasonably close to a random one of those orders, and that random order is almost certainly unique. That's already strange enough. It doesn't need the shaky comparisons.
FAQ
Q: How many ways can you shuffle a deck of cards? A: A standard deck of 52 different cards can be arranged in 52! ways: 80,658,175,170,943,878,571,660,636,856,403,766,975,289,505,440,883,277,824,000,000,000,000, or about 8.07 × 1067. That is the number of possible orders, not an estimate.
Q: Is 52 factorial bigger than the number of atoms in the universe? A: No. 52! is about 8.07 × 1067. The number of atoms in the observable universe is an order-of-magnitude estimate around 1080, roughly a trillion times larger. The popular claim has it backwards.
Q: Does this count include jokers? A: No. 52! counts a standard 52-card deck with no jokers, which is 4 suits of 13 ranks, each card unique. Two distinct jokers would make it 54!, or 54 × 53 × 52!.
Q: How many times should I shuffle a deck of cards? A: For ordinary riffle shuffles, seven is the usual answer from Bayer and Diaconis (1992). After seven riffles, a 52-card deck is reasonably close to random (total variation distance 0.334), and the mixing happens in a rush after staying almost unmixed through the first four or five. A few more riffles get you closer. The result is about riffles, not overhand shuffles or a quick wash on the table, and it assumes you are actually splitting and interleaving the deck, not doing perfect faros.
Q: Has anyone ever shuffled the same order twice? A: For a thoroughly shuffled deck, almost certainly not. Even a generous thought experiment — eight billion people, each producing one truly random shuffle per second for the age of the universe — covers only about 1 in 1040 of the possible orders. Factory-fresh decks are the exception: they start in a fixed order, and a poorly shuffled new deck is not a unique random arrangement.
Q: Why does 52! end in 12 zeros? A: Each trailing zero is a factor of 10, which is 2 × 5. There are more than enough factors of 2 in 52 × 51 × … × 1, so the zeros are limited by the factors of 5: twelve of them, from 5, 10, 15, 20, 25 (which contributes two), 30, 35, 40, 45 and 50. The zeros are exact, not a sign that the number has been rounded.
Sources
- Bayer, D. and Diaconis, P., "Trailing the Dovetail Shuffle to its Lair," The Annals of Applied Probability 2, no. 2 (May 1992): 294–313. Table 1 (total variation distance after 1–10 riffle shuffles of 52 cards); Gilbert–Shannon–Reeds model; cutoff discussion; citation of shuffling experiments in Diaconis (1988). DOI: https://doi.org/10.1214/aoap/1177005705 — open PDF: https://www.stat.berkeley.edu/~aldous/157/Papers/bayer_diaconis.pdf
- Diaconis, P., Group Representations in Probability and Statistics, IMS Lecture Notes–Monograph Series, Vol. 11 (Hayward, CA: Institute of Mathematical Statistics, 1988). Cited by Bayer and Diaconis (1992) for experiments suggesting the Gilbert–Shannon–Reeds model is a good description of how real people riffle.
- Diaconis, P., Graham, R. L., and Kantor, W. M., "The Mathematics of Perfect Shuffles," Advances in Applied Mathematics 4, no. 2 (1983): 175–196. Definition of in- and out-shuffles; Lemma 1 (the order of an out-shuffle of 2n cards is the order of 2 modulo 2n − 1; for 52 cards, that order is 8). DOI: https://doi.org/10.1016/0196-8858(83)90009-X — PDF: https://pages.uoregon.edu/kantor/PAPERS/PerfectShuffles.pdf
- Planck Collaboration, "Planck 2018 results. VI. Cosmological parameters," Astronomy & Astrophysics 641, A6 (2020). Table 1, baseline TT,TE,EE+lowE+lensing: age of the universe 13.797 ± 0.023 Gyr. DOI: https://doi.org/10.1051/0004-6361/201833910 — open access: https://www.aanda.org/articles/aa/full_html/2020/09/aa33910-18/aa33910-18.html
- NASA Jet Propulsion Laboratory, Solar System Dynamics, "Astrodynamic Parameters." Julian year = 365.25 days; day = 86,400 seconds, citing Seidelmann, P. K. (ed.), Explanatory Supplement to the Astronomical Almanac (University Science Books, 1992). This is the standard IAU Julian year of 31,557,600 seconds used to convert the Planck age into seconds. https://ssd.jpl.nasa.gov/astro_par.html
- 52! itself is 52 × 51 × … × 1, computed directly as an integer (68 digits; 8.065817517… × 1067, which rounds to 8.07 × 1067; 12 trailing zeros from the 12 factors of 5 in the product). The seconds-since-the-Big-Bang and unique-shuffle comparisons in the text are arithmetic from the Planck age, that Julian year, and this integer.
- The "on the order of 1080" atom count for the observable universe is a standard order-of-magnitude estimate, not a census. It comes from converting a measured baryon density — Planck 2018, Table 1, reports Ωbh2 = 0.02237 ± 0.00015 — over the volume of the observable universe. Careful estimates typically fall in the 1079–1080 range. We use ~1080 and do not quote a more precise figure; even several orders of magnitude of slack would leave 52! smaller than the atom count by a wide margin.

