How to do the 21-card trick: step by step, and why it works

The Online Magic Store ·

Bicycle Standard red-back playing cards with the box, spread out on a metal surface

TL;DR: Deal 21 cards face up into three piles of seven while a friend silently picks one. Ask which pile it’s in, gather the piles with that one in the middle, and repeat for three deals in total. Their card is now the 11th card from the top. The maths does the work, so your job is to make the dealing feel like something other than counting.

What does the audience see?

A friend thinks of one card out of a small packet. They never say which. You deal the cards a few times, ask a couple of harmless questions, and then reveal their card. No sleight of hand, no special deck, nothing to set up. That’s why it sits squarely in self-working magic: the procedure guarantees the result. If you’re new to the categories, our guide to self-working vs gimmick vs sleight of hand explains where this fits.

How old is the 21-card trick?

Old. The earliest version we found in our free library is in Henry Dean’s Hocus Pocus, or The Whole Art of Legerdemain (1722), under the title “To tell what card any one thinketh on.” Dean has you lay out 21 cards in three heaps three times, putting the named heap in the middle, then count down to the eleventh card, “for that will always be the noted card.” His reveal was to pretend to sniff each card as you count. Charming, if odd.

Professor Hoffmann teaches the same procedure in Modern Magic (1876) and adds that it works “so long as such number is odd, and a multiple of three.” W. W. Rouse Ball’s Mathematical Recreations and Essays covers it as the “three pile problem,” mentions versions with 15, 21 and 27 cards, and credits the mathematician J. D. Gergonne with the general theory, published in 1813 to 1814.

How do you do it, step by step?

  1. Count off 21 cards. Put the rest of the deck away. You can count them before you start so you’re not counting in front of anyone.
  2. Deal three piles, face up. Deal left to right, one card to each pile, then back to the left, until all 21 are out. Each pile has seven cards. Overlap them so every face shows.
  3. Have them think of one card. They don’t touch it or tell you. They only remember it.
  4. Ask which pile it’s in. Gather the three piles into one packet with their pile in the middle. Order of the other two doesn’t matter.
  5. Deal again the same way and ask which pile. Gather with that pile in the middle.
  6. Deal a third time, ask which pile, and gather with that pile in the middle once more.
  7. Their card is 11th from the top. It’s also 11th from the bottom, because 11 is the exact centre of 21.

Shortcut from Hoffmann: on the third deal, glance at the middle (fourth) card of each pile. When they name the pile, you already know the card, and you don’t need to gather at all.

Why does it work?

Each time you put their pile in the middle, you trap their card closer to the centre of the packet. You don’t need the algebra, just this table:

After this gather Where their card can be
First Somewhere from 8th to 14th (the middle pile of seven)
Second 10th, 11th or 12th
Third Always 11th

The second deal spreads the middle seven cards across all three piles, so the named pile only holds two or three of them, and they land in its centre. By the third deal, those three possible cards each become the fourth card of a different pile. Naming the pile names the card.

How do you stop it feeling like maths?

Here’s the honest problem: three slow deals can feel like homework. Rouse Ball called the usual count-down finish “a very clumsy one.” Some fixes that help:

  • Give the dealing a reason. “I’m going to watch your eyes while the cards go past. Don’t react.” Now the deals are a test of them, not a procedure. Our post on writing patter walks through building a script like this.
  • Deal briskly and talk. Keep a light conversation going. Don’t mouth numbers or pause between piles.
  • Act out the narrowing. After each answer, look at that pile as if you’re reading it. It makes the questions feel like clues rather than steps.
  • Don’t count down at the end. Use the fourth-card shortcut and name the card, or square up and use one of the reveals below.
  • Never repeat it for the same people. Three deals twice in a row is when people start counting along.

What are some good variations?

  • Spell it. ABRACADABRA has 11 letters. Hand them the packet and have them deal one card per letter. Their card turns up on the final A.
  • Let them do the dealing. The method doesn’t care who deals, as long as each pile gets one card at a time and their pile goes in the middle. It looks fairer and takes you out of the picture.
  • The 27-card version. Three piles of nine, same three deals, and the card ends up 14th, the centre of 27. Rouse Ball works through this version in detail.
  • The 15-card version. Three piles of five, three deals, and the card is 8th. Quicker, and good for younger audiences.
  • A prediction. Before you start, the 11th card is unknown, so you can’t predict a card. But you can write “11” on a note and leave it in view, then have them count to their card at the end.

What do you need to practise it?

Just a deck and ten minutes. Run it alone a few times, thinking of a card yourself, until gathering with the named pile in the middle is automatic. The only real mistake is gathering in the wrong order, so check that one every time. Then practise the talking, which is where the trick lives. It’s a perfect first trick on the beginner shelf, and a fine opener for anyone browsing our card magic.

Sources: Henry Dean, Hocus Pocus, or The Whole Art of Legerdemain (1722); Professor Hoffmann, Modern Magic (1876); W. W. Rouse Ball, Mathematical Recreations and Essays (tenth edition, 1922); Cut the Knot, “Gergonne’s Magic Trick”.

Frequently asked questions

How many times do you deal in the 21-card trick?

Three times. After each deal, ask which pile holds the card and gather the piles with that pile in the middle. After the third gather the card is 11th from the top.

Does the 21-card trick always work?

Yes, as long as you deal one card at a time to each pile in turn and always put the named pile between the other two. The usual way it fails is gathering in the wrong order.

Can you do the trick with a different number of cards?

Yes. Older books note it works with an odd number of cards that divides by three, such as 15 or 27. With 15 cards the card ends 8th, with 27 cards it ends 14th.

Is the 21-card trick good for beginners?

It is one of the best first tricks because it needs no sleight of hand or special deck. The skill is in the presentation, so it stays interesting rather than feeling like counting.