The Math Behind Everything All games

Through the deck

Cards through

1

Best today

1

Tries today

1

Can you make it through the deck?

Call whether each next card is higher or lower, all 51 calls. One wrong call and the dealer shuffles and you start over.

How it works
  1. A full deck of 52 cards is shuffled and the first card is turned over. Aces are low, kings are high.
  2. Call whether the next card will be higher or lower. If it's the same rank, it's a tie: nothing lost, keep going.
  3. Get every call right through the last card and you're out. Call one wrong and the deck is shuffled for a new try.

Keyboard: up arrow for higher, down arrow for lower, space to shuffle.

Leaderboard

You're on the board as .

Want a game like this for your brand? Work with me

How the math works

Why 1 in 580,000?

That's how often you'd make it with the best play there is: always calling the side with more cards left. Here's what three ways of playing are worth, at one call a second.

    1. Guess at random and each call is a coin flip. Ties are free, and a shuffled deck has about 3 of them, so you need about 48 right in a row: about 1 in 95 trillion.
    2. Play the card you see. Call higher on an ace through 6, lower on an 8 through king, and either on a 7. The first call is right 77% of the time, but as cards leave the deck the rule starts making bad calls: about 1 in 1.4 million.
    3. Count the cards. Keep track of what's gone and call the side with more cards left. With a 4 showing and only a 2 and a 3 left, lower is a sure thing: about 1 in 580,000.

    Odds from 1.5 million simulated decks for each way of playing. Times assume one call a second and count only the calls, not shuffling; an average try lasts about 2 calls guessing at random and about 4 with either strategy.

    Want a game like this for your brand? Work with me

    How long would you be stuck?

    The room

    Imagine you wake up in a locked room with a dealer and a deck of cards. The dealer explains the game. They turn over a card, and you call whether the next one will be higher or lower. If you're right, you keep going. If the next card is the same rank, that's a tie, and you keep going too. If you're wrong, the dealer shuffles and you start over. Get through the whole deck and the door opens.

    A deck has 52 cards, so after the first one is turned over you have 51 calls to make. Aces are low and kings are high. How long are you in there?

    Guessing at random

    Start with the simplest way to play: call higher or lower at random. Each call is right about half the time. Ties help a little, since they're free. A shuffled deck has about 3 of them, so you need about 48 right calls in a row instead of 51.

    Simulate it and the chance of getting all the way through comes out to about 1 in 95 trillion. In other words, you'd expect to need about 95 trillion tries.

    Most of those tries end fast. Guessing at random, an average try lasts about 2 calls before you miss. At one call a second, 95 trillion tries works out to about 6.4 million years.

    Playing the card you see

    You can do much better by looking at the card. With aces low, the middle rank is 7. If the card showing is an ace through 6, most of the deck is above it, so you call higher. If it's an 8 through king, you call lower. On a 7 it's even, so you pick either one.

    On the first call, this rule is right 77% of the time. That's a big jump from 50%, but it doesn't stay that good. The rule only looks at the card in front of you, not at what's left in the deck. As cards come out, the rest of the deck can lean one way, and the rule starts making calls the remaining cards say are wrong.

    Playing this way, you get through the deck about once in 1.4 million tries. A try now lasts about 4 calls on average, so at one call a second that's about 10 weeks in the room.

    Counting the cards

    The last improvement is to remember every card that's been turned over. Then at each call you know exactly what's left, and you call whichever side has more cards remaining.

    Here's where it pays off. Say two cards are left in the deck and the dealer is showing a 4. The simple rule says call higher, and most of the time that's right. But if you've been counting and you know the last two cards are a 2 and a 3, higher can't happen. Lower is a sure thing.

    Always calling the side with more cards left is the best play there is. It gets you through about once in 580,000 tries. Tries still last about 4 calls, so at one call a second you'd be out in about four weeks, or roughly a month.

    What it means

    It's the same deck and the same rules every time. Only the way you call changes:

    Just looking at the card takes you from millions of years down to a couple of months. Keeping track of the cards cuts that time by more than half again. And those times count only the calls. Add the time it takes to shuffle between tries and you'd be in the room longer.

    Try it yourself

    The game above deals a real shuffled deck. Call higher or lower with the buttons or the arrow keys and see how far you get before a wrong call sends you back to the start. The leaderboard shows how close other players have come to making it all the way through.

    For education and entertainment. Found a mistake in the math? Email me and I'll fix it.