You’ve probably seen a few ways to shuffle a deck of cards. Sometimes the deck is split in half and the halves are switched. Sometimes the deck is smooshed until it’s all mixed up. But most of the time, a deck of cards is shuffled using a riffle.

Here’s a question: how many times do you have to riffle a deck of cards before it is completely shuffled? It’s a tricky one, but math has us covered: you need seven riffles.

Riffle seven times and you’ll have a sufficiently random ordering of cards, an ordering that has likely never existed before. In other words, it’s unlikely you’ll ever shuffle two decks the same.

The card shuffling result appears in a Numberphile video from 2015, along with a number of other card shuffling facts. Here’s another problem posed in that video: what if instead of a standard riffle using a deck roughly split in half, you were to only riffle 1 card at a time?

That is, using a standard deck of 52 cards, in one hand hold 51 cards and in the other hold the remaining single card. Now riffle these together. This is equivalent to taking one card and placing it at random inside of the deck.

**So here’s the question:** How many single riffles do you have to do in order to have a completely shuffled deck?

## Theorem

You could simulate this in a short program, which we will do towards the end, but first we can solve for the number of riffles explicitly.

Consider an ordered deck of cards. Without loss of generality, let’s say the suits are in the following order: ♠, ♣, ♥, ♦. So our ordered deck looks like this.

The bottom suit is ♦, which means the bottom card of our deck is the King of Diamonds (K♦). Now perform the following iteration:

This means taking the A♠ and placing it randomly somewhere in the deck. The top card then becomes 2♠.

If this procedure is repeated, eventually the top card will be placed at the very bottom of the deck, shifting the K♦ to the penultimate position. Since every riffled card has a 152frac{1}{52}521 chance of moving to any new position in the deck, that means, on average, after about 52 top card riffles, the top card will become the new bottom card.

Once the K♦ moves up one position, upon subsequent riffles there are now two spots for the new top card to be placed underneath it. That means there is now a 152+152=252frac{1}{52}+frac{1}{52}=frac{2}{52}521+521=522 chance of a riffled card going underneath the K♦.

Continuing this procedure, the original bottom card, the K♦, will eventually rise to the top of the deck and be riffled. Once this happens, the deck is randomly shuffled: the order we’re left with is equally as likely as any other order.

So, how many single card riffles does this take? Recall each time a card is placed underneath the K♦, our chances of placing another card increases by 152frac{1}{52}521 . We can calculate the number of riffles this would take.

∑i=15252i=521+522+523+…+5252≈236sum_{i=1}^{52} frac{52}{i} = frac{52}{1} + frac{52}{2} + frac{52}{3} + … + frac{52}{52} approx 236i=1∑52i52=152+252+352+…+5252≈236

On average, 236 single card riffles will randomly shuffle a deck of cards.

## Let’s Riffle

Equations are great, but let’s visualize this! Below is the same ordered deck of cards from before, except the K♦ has been highlighted red so we can follow its journey to the top of the deck.

Click the **Riffle** button to move the top card somewhere else in the deck randomly.

Did you see where it went? Click again.

Click a bunch more really fast.

Now I could tell you to keep clicking until the highlighted K♦ rises to the top, but as we have already shown, that would take about 236 clicks. Instead, click the **Riffle (x10)** button to riffle 10 times. Keep riffling until the K♦ moves to the top.

Here is a chart of the K♦’s position in the deck for each riffle. Notice how it takes many riffles to move the K♦ up just a few positions, but once the K♦ starts rising towards the top of the deck, it accelerates.

On average, the K♦ will reach the top position somewhere around 236 riffles. Since this is the average result, there is a chance your first shuffled deck of cards took less riffles (or many more!). To try again, click the **Clear** button and get riffling.

### Acknowledgements

- This article was created using Idyll.
- Shoutout to @mathisonian for help and feedback.
- The source code is available on Github.

## Top 5 how many ways can you shuffle a deck of cards Synthesized by BSS news

### 52 Factorial

**:**czep.net**:**09/01/2022**:**4.88 (713 vote)**:**52! is the number of different ways you can arrange a single deck of cards. You can visualize this by constructing a randomly generated shuffle of the deck.

### There are more ways to arrange a deck of cards than there are atoms on Earth

**:**mcgill.ca**:**07/14/2022**:**4.4 (225 vote)**:**Card games tend to order decks in common ways, so you need to shuffle really well (about seven times using the “riffle” method) before you’re …**:**If this procedure is repeated, eventually the top card will be placed at the very bottom of the deck, shifting the K♦ to the penultimate position. Since every riffled card has a 152frac{1}{52}521 chance of moving to any new position in the deck, …

### How unique is a random shuffle? – Quantum Base

**:**quantumbase.com**:**07/15/2022**:**4.2 (576 vote)**:**The number of possible ways to order a pack of 52 cards is ’52!’ (“52 factorial”) which means multiplying 52 by 51 by 50… all the way down to 1. The number you …**:**If this procedure is repeated, eventually the top card will be placed at the very bottom of the deck, shifting the K♦ to the penultimate position. Since every riffled card has a 152frac{1}{52}521 chance of moving to any new position in the deck, …

### Wild Explanation Of How Many 52-Card Deck Combinations There Are Just Crushed My Brain

**:**brobible.com**:**05/19/2023**:**4.09 (403 vote)**:**If you were to shuffle a deck of 52 cards and lay them out the possible order combinations are practically endless. The total number of …**:**When you’ve circled the earth once, take a drop of water from the Pacific Ocean, and keep going When the Pacific Ocean is empty, lay a sheet of paper down, refill the ocean and carry on. When your stack of paper reaches the sun, take a look at the …

### Crazy Math: Every time you shuffle a deck of cards, chances are that you make history.

**:**blog.priyanshrastogi.com**:**11/07/2022**:**3.82 (368 vote)**:**Let’s see how- If you have studied Permutations and Combinations, you can simply say that there are 52! (factorial 52) ways, in which you can …**:**When you’ve circled the earth once, take a drop of water from the Pacific Ocean, and keep going When the Pacific Ocean is empty, lay a sheet of paper down, refill the ocean and carry on. When your stack of paper reaches the sun, take a look at the …