WhimWheel

Random Card Generator

Draw one or more random playing cards from a fairly shuffled 52-card deck — with or without jokers, with or without putting them back.

Draw random cards

52 cards in the deck.

A virtual deck that’s always shuffled fairly

This random card generator works like a real deck that never gets sticky or loses its ace. It builds a standard 52-card French deck — four suits (spades, hearts, diamonds, clubs) of thirteen ranks from ace to king — and shuffles it with a Fisher–Yates shuffle driven by cryptographic randomness. You can add two jokers, draw up to the whole deck at once, and choose whether drawn cards stay out of the deck.

With Don’t put drawn cards back ticked, the generator behaves like dealing: the remaining-card counter goes down and you will never see the same card twice until you shuffle. Untick it to draw with replacement, which is what probability classes usually need. It’s handy for solo card games, teaching odds, writing prompts (each suit a theme) or deciding turn order.

Drawing cards from the virtual deck

  1. Choose how many cards to draw.
  2. Decide whether to include jokers and whether drawn cards go back in the deck.
  3. Press Draw cards.
  4. Press Shuffle full deck to start again with all cards.

Playing card probabilities

Event (one card, 52-card deck)Probability
A specific card (e.g. ace of spades)1/52 ≈ 1.9%
Any ace4/52 ≈ 7.7%
Any heart13/52 = 25%
A face card (J, Q, K)12/52 ≈ 23.1%
A red card26/52 = 50%

Drawing two cards without replacement, the chance both are aces is (4/52) × (3/51) ≈ 0.45%, about 1 in 221.

Every shuffle is probably a first

A standard deck of 52 cards can be arranged in 52 factorial different orders. Written out, that’s a 68-digit number, roughly 8 followed by 67 zeros. It’s so large that if every person who has ever lived had shuffled a deck every second of their lives, they wouldn’t have come close to producing every order. A properly shuffled deck is almost certainly in an arrangement that has never existed before and never will again.

The catch is the word properly. Mathematicians Dave Bayer and Persi Diaconis showed in a 1992 paper that it takes about seven riffle shuffles to mix a deck well. Many people shuffle two or three times, which leaves clumps of the previous game’s order. Overhand shuffling, the kind where you slide small packets from one hand to the other, is even weaker and can take thousands of repetitions.

Our generator skips the problem. It uses the Fisher–Yates shuffle, an algorithm first described by Ronald Fisher and Frank Yates in 1938 and adapted for computers by Richard Durstenfeld in 1964. With cryptographic random numbers driving it, every one of those 52-factorial orders is equally likely.

With or without putting cards back

The single most important setting is the “Don’t put drawn cards back” checkbox. It changes the maths completely.

SettingBehaves likeSame card twice?Use it for
Ticked (no replacement)dealing from a real decknever, until you reshufflecard games, dealing hands, turn order
Unticked (replacement)shuffling the card back in after every drawpossibleprobability experiments, independent random picks

Here’s how different they are in practice. Draw cards with replacement and the chance of seeing a repeat climbs quickly: after 9 draws it’s already better than even, about 52%. Draw without replacement and you’ll never see a repeat in 52 draws.

Another example: how many cards do you need to turn over, on average, before the first ace appears? Without replacement, the answer is 53 divided by 5, or 10.6 cards. With replacement it’s 13, because every draw has the same 1-in-13 chance.

Poker hand odds

Draw five cards without replacement and you’ve dealt a poker hand. There are 2,598,960 possible five-card hands, and here’s how they break down:

HandNumber of waysOdds, roughly
Royal flush41 in 649,740
Straight flush (not royal)361 in 72,193
Four of a kind6241 in 4,165
Full house3,7441 in 694
Flush (not straight)5,1081 in 509
Straight (not flush)10,2001 in 255
Three of a kind54,9121 in 47
Two pair123,5521 in 21
One pair1,098,2401 in 2.4
High card only1,302,5401 in 2

Draw five cards a few dozen times and you’ll see the table come to life: lots of high-card hands and pairs, a two pair every so often, and maybe a three of a kind if you’re lucky. A royal flush is so rare that you could draw hands every minute for a year and probably never see one.

Blackjack in a few numbers

Blackjack is another easy game to practise solo. A “natural,” an ace plus a ten-value card as your first two cards, comes up about 4.8% of the time from a single fresh deck, roughly once every 21 hands. Ten-value cards (tens, jacks, queens and kings) make up 16 of the 52 cards, nearly a third of the deck, which is why so much of blackjack strategy revolves around assuming the next card is worth ten.

Use the generator to practise basic strategy without real money: draw two cards for yourself, one for the dealer, and decide whether to hit or stand.

Thirteen-card hands

Draw 13 cards without replacement and you’ve dealt a bridge hand. The numbers get large quickly: there are 635,013,559,600 possible 13-card hands. A few facts bridge players like to quote:

Event in a 13-card handProbability
A 4-4-3-2 suit distribution (the most common shape)about 21.6%
At least one void (a suit with no cards)about 5.1%
All 13 cards in one suit1 in 158,753,389,900

That last figure is why newspaper stories about a “perfect hand” at a local bridge club are almost always the result of a poorly shuffled new deck rather than a miracle. A brand-new deck comes sorted by suit, and a couple of casual shuffles leave long runs together. It’s a good real-world reminder of why the seven-shuffle rule matters.

When computer shuffles go wrong

A digital shuffle is only as good as its random numbers. In 1999, security researchers at Reliable Software Technologies showed that a popular online poker platform had a fatal flaw: its shuffle was seeded from the system clock, so it could produce only a few billion different decks rather than the full 52 factorial. Knowing the time and a few visible cards, they could predict every player’s hand in real time.

That story is why we use your browser’s cryptographic random generator, which is designed to be unpredictable, rather than a basic random function seeded from the clock. Every card draw on this page comes from the same source used for security-sensitive work like generating encryption keys.

Card games to teach children

A virtual deck is handy when the real one is missing cards, and many classic children’s games teach useful skills:

  • Snap builds speed and visual matching. Draw cards one at a time and shout “snap” when two consecutive ranks match.
  • Go Fish teaches sets of four and asking questions politely.
  • War is pure luck but great for comparing numbers. Each player draws a card; higher wins both.
  • Make ten practises number bonds. Draw two cards; if they add to ten, keep them.
  • Sequence race builds ordering. Draw five cards and race to put them in order from lowest to highest.

For younger children, agree that any face card drawn is simply put aside and drawn again, which keeps the numbers simple. Bring jacks, queens and kings back into play once they’ve learned that those cards are worth more.

Probability lessons with a virtual deck

Teachers love cards for probability because the deck has so much structure: 4 suits, 13 ranks, 2 colours, 12 face cards. Lesson ideas:

Predict, then test. Students predict how many hearts will appear in 20 draws with replacement (the expectation is 5). Then draw and compare. Combine the class’s results to see the total approach a quarter.

Dependent events. Draw two cards without replacement. What’s the chance both are red? It’s 26/52 × 25/51, just under 25%, not the 25% students often guess. The difference is a neat introduction to dependent probability.

The gambler’s fallacy. Draw with replacement until you get five black cards in a row. Ask the class whether red is now “due.” It isn’t; every draw is still 50/50. Students who’ve watched the streak are often surprised by how strongly they feel otherwise.

Expected value. Assign points to cards (ace 1, face cards 10) and ask for the average value of a draw. Work it out on paper, then check with fifty draws.

A brief history of the deck

The 52-card deck with spades, hearts, diamonds and clubs is French in origin, dating from the late 15th century. Other suit systems still thrive elsewhere: Spanish and Italian decks use cups, coins, swords and batons, and German decks use hearts, bells, leaves and acorns.

A few details of the French deck have stories attached:

  • The ornate ace of spades. For a long period, English playing cards were taxed, and the duty was recorded on the ace of spades, which is one reason it became so elaborately decorated.
  • The “suicide king.” On many decks, the king of hearts appears to be pushing a sword into his own head. It’s most likely the result of centuries of redrawing a design in which he originally held an axe or sword raised behind him.
  • One-eyed jacks. The jack of spades and jack of hearts are usually shown in profile, which is why some games make them wild.
  • Jokers. Jokers were added in the United States in the 19th century, originally for the game of euchre.

Fortune-telling and party fun

Long before tarot cards became widespread for divination, people told fortunes with ordinary playing cards, a practice called cartomancy. Traditional meanings vary wildly by region and book, and none of them has any predictive power, but they make a fun party game. Draw three cards for past, present and future and invent a reading together. The more dramatic the delivery, the better.

A gentler version for children: each suit means a kind of day. Hearts is a kind day, diamonds is a lucky day, clubs is a busy day and spades is an adventurous day. Draw one in the morning and see whether it comes true.

Card tricks with a virtual deck

Most card magic depends on sleight of hand, but a few mathematical principles work with any random draw, and they’re a great way to show that maths can be surprising.

The 21-card trick. Deal 21 cards in three columns of seven, have someone pick a card mentally and tell you its column, gather the columns with the chosen one in the middle, and deal again. After three rounds the chosen card is always the eleventh. You can do this by drawing 21 cards without replacement and writing them in a grid.

Predicting the colour count. Shuffle and split a full deck into two halves of 26. The number of red cards in the first half always equals the number of black cards in the second. It sounds like magic but it’s simple arithmetic, and students love working out why.

Creative uses

Writing prompts

Assign each suit a theme and draw a card for your story’s next scene. One common scheme: hearts for relationships, diamonds for money or ambition, clubs for work or conflict, spades for loss or danger. The rank sets the intensity, with an ace the most extreme. Three draws give you a beginning, middle and end.

Deck-of-cards workout

A well-known home workout: each suit is an exercise (say, hearts for squats, diamonds for push-ups, clubs for sit-ups, spades for lunges), and the card’s number is the reps. Face cards count as 10, aces as 11 or as a rest. Draw without replacement and work through as much of the deck as you can. For more variety, try workout roulette.

Turn order and team picks

Each player draws a card; highest goes first. Use suits to form teams: reds versus blacks, or one team per suit for four teams. It’s quicker than arguing, and nobody can say it was rigged.

Decision making

Assign options to red and black, or to suits, and draw. It’s no different from a coin flip or a die, but somehow feels more dramatic.

Solo card games

Plenty of solitaire games work with a virtual deck if you write down the layout. Draw without replacement and lay out the cards on paper or in your head. Simple ones include:

  • Clock solitaire: deal 13 piles of four, one for each hour plus the kings in the centre. Pure luck, but surprisingly absorbing.
  • Accordion: deal cards in a row and move a card onto its neighbour, or the card three to the left, when they match in suit or rank. The aim is to end with one pile.
  • Higher or lower: draw a card and guess whether the next will be higher or lower. Count your streak.

For a physical feel, you can also use the generator to decide the opening deal of a game you’re playing with real cards, so a stubborn clump from the last round can’t skew things.

For number draws without suits, the random number generator is faster. For tabletop games, the dice roller covers polyhedral dice.

Resetting the deck

When you’re dealing without replacement, the remaining-card counter tells you how many cards are left. Once it reaches zero, or whenever you want a fresh start, reshuffle to put every card back. Each reshuffle is a brand-new random order, just as fair as the first, and no previous game leaves a trace in it.

Random card questions

How many cards are in the deck?

52 standard cards, or 54 if you tick “Include 2 jokers”.

Is the card shuffle fair?

Yes. The deck is shuffled with the Fisher–Yates algorithm using your browser’s cryptographic random generator, so every order is equally likely.

What does “don’t put drawn cards back” mean?

Drawn cards are removed until you reshuffle, like dealing from a real deck. Untick it to draw from a full deck every time.

Do the jokers change the probabilities?

Yes, slightly. With two jokers the deck has 54 cards, so the chance of any particular card on a single draw drops from 1 in 52 to 1 in 54, and the chance of drawing any joker is 2 in 54, about 3.7%. Leave jokers out for games and probability lessons that assume a standard deck.

Published · Last updated by the WhimWheel team.

Browse all numbers, dice & cards

Featured on