sleightless.

The 27 Card Trick

Someone thinks of a card. Then, before you touch anything, they name any number from 1 to 27. You deal three times into three piles and their card is sitting at exactly the number they asked for.

Name a number

Pick where the card should end up. This is the sum you would do in your head before dealing a single card.

No setup27 cardsSome counting10 min to learn

Play it through

Be the spectator and it is done to you: think of a card, name the number you want it to finish at, and point at piles. Be the magician and the roles swap: you deal all twenty-seven yourself, and each gather has a right answer — the number they asked for, in base three.

The 21 card trick finds a card. This one puts it wherever it is told, which is a different and much stranger claim, and it is the reason this is the trick mathematicians write about.

How to perform it

  1. Count off twenty-seven cards. Any twenty-seven. They can shuffle first.
  2. Have them think of one, and name a number from 1 to 27. The number comes before the dealing, which is what makes this feel impossible. Write it down if you like — you are about to need it.
  3. Work out three digits, once, in your head. Subtract one from their number and write it in base three. That gives you three digits, each 0, 1 or 2, and those three digits are the entire method. The demo above does this for you so you can see the shape of it.
  4. Deal three piles, across, face up. One card to each pile in turn until all twenty-seven are down. Across, never down.
  5. Ask which pile, and gather according to your first digit. 0 means their pile goes on top, 1 means in the middle, 2 means underneath.
  6. Do it twice more, using the second digit and then the third. Same deal, same question, and the digit tells you where their pile goes each time.
  7. Count to the number they named. Their card is there. It was never anywhere else.

The 27 card trick chart

All twenty-seven numbers and where their pile goes on each deal. This is the cheat sheet to photograph if you would rather carry it than work the base-three sum out at the table — though the sum is quick enough that most people stop needing this after a few performances.

Every row is generated from the same code the demonstration above runs, and each one is dealt through before the table is drawn. A printed chart that disagreed with the method would be worse than no chart.

Download the 27 card trick chart PDF · 1 page · free to print

No email required. The same twenty-seven rows, laid out for one sheet of paper, with the base-three rule beside them so you can work without it.

Why it works

Because dealing into three piles is counting in base three.

Each round, which pile their card is in tells you one base-three digit of where it currently sits. Placing that pile on top, in the middle or underneath sets the corresponding digit of where it will sit next. Three rounds means three digits, and three base-three digits describe exactly 27 positions — one for every card in your hand.

Which is why it is 27 and not 26 or 30.

Three piles, three rounds: 3 × 3 × 3. Twenty-one works for the simpler trick because you only need to find the card. To place it at a position you name, the number of cards has to be exactly the number of positions your digits can describe.

Checked in code: all 27 requested positions, and every one lands exactly where asked.

Making it play

Questions people ask

What is the 27 card trick?

Somebody thinks of a card among twenty-seven. Then they name any number from 1 to 27. You deal the cards into three piles three times, asking only which pile their card is in, and at the end their card is sitting at exactly the number they asked for.

They choose the number before they have settled on a card, and you never learn either one.

How does the 27 card trick work?

Dealing into three piles is counting in base three.

Take the number they named and subtract one. Write that in base three and you get three digits. Read them from the small end: each digit tells you whether their pile goes on top, in the middle, or underneath that round. Nothing else about the trick is a decision.

Why 27 cards and not 26 or 30?

Because three piles dealt three times is three times three times three. Twenty-seven is the exact number of positions three base-three digits can describe, so every number from 1 to 27 has its own set of instructions and none are wasted.

Twenty-six would leave a position you could not ask for. Thirty would leave three.

Is the 27 card trick the same as the 21 card trick?

They are cousins. Both deal into three piles and both put their pile back between deals.

The 21 always finishes in the same place, so you take the eleventh card. The 27 lets the spectator choose where it finishes, which is a far stronger ending and costs you one small sum in your head.

Do you need to set the deck up for the 27 card trick?

No. Take any twenty-seven cards from a shuffled deck. Somebody else can shuffle them and count them out for you.

More

All of these, with the ones you can deal through on screen, are on the self-working card tricks page.

Harrison Alley

Harrison Alley

Hobbyist · Writes Sleightless

A hobbyist, not a professional. I write up the self-working end of card magic, because it is the door I would point a beginner at, and every trainer here is played through and checked before it ships.