A mathematical card trick has a theorem where the sleight of hand would be. You deal by a rule, and the rule forces the ending. Nothing is palmed, nothing is switched, and nothing depends on your hands being quick.
Every other list of these is sorted by trick. This one is sorted by the mathematics underneath, because there are only about four ideas here and once you have one of them you have every trick built on it. Parity. Sorting in base three. Arithmetic that wraps at thirteen. And a quantity that cancels itself out.
Every trick below runs in your browser before you touch a deck, from either side of the table. And where the claim is arithmetic, the demo tests it against every case — all twenty-one starting positions, all twenty-seven numbers a spectator can name, every number from five to eighteen. Almost nothing else written about these tricks does that, which is why almost everything written about them repeats the same three mistakes.
Odd and even, and the fact that dealing cannot change it
Split any even number of things into two heaps and the heaps are both odd or both even together. Add one more thing to one heap and you have broken the tie permanently. No amount of moving pairs around puts it back. That is the whole idea, and it is the first piece of mathematics most people meet without noticing.
Their hands rest on the table like a pianist's. You slot pairs of cards between their fingers, then one last single card. The pairs are split into two piles, and without seeing anything you name which pile the odd card is in.
The math: the pairs keep both piles even together. The single card breaks it, and it can never be broken back. You are not tracking a card — you are tracking whether a number is odd.
Play it →Three piles, three deals, and 3 × 3 × 3 = 27
Deal cards across three piles and ask which pile something is in, and you have learned exactly one digit of a base-three number. Do it three times and you have learned three digits, which is enough to name one thing out of twenty-seven. These two tricks are the same idea run at two different sizes, and they are the reason mathematicians write about card tricks at all.
Somebody picks one of twenty-one cards. You deal three piles, three times, asking only which pile it is in — never which card — and you find it.
The math: each deal cuts the possibilities to a third. Twenty-one, then seven, then three, then one. Gathering their pile in the middle each time is what makes the narrowing land in the same place, so their card finishes 11th every single time. Checked: all 21 starting positions.
Play it →Somebody thinks of a card. Then, before you touch anything, they name any number from 1 to 27. You deal three times and their card is sitting at exactly the number they asked for.
The math: 27 is three cubed. Take the number they named, subtract one, and write it in base three. You get three digits, and each digit tells you whether their pile goes on top, in the middle, or underneath that round. Nothing else about it is a decision. Checked: all 27 numbers a spectator can name.
Play it →Adding three, over and over, and counting to thirteen
Thirteen ranks and four suits. Step through the deck adding three to the rank each time and wrapping around at thirteen, and cycle the suits in a fixed order, and you have a deck where every card tells you the next one. It will pass a riffle and a cut and still be in order, because a cut does not change what follows what.
A deck in a secret order that looks, when you riffle it, exactly like a shuffled one. Learn two small sums and you know the card underneath any card named, the card at any position, and where a named card is sitting.
The math: rank plus three, modulo 13. Suit advances by one, modulo 4. Both sums are small enough to do while talking, which is the only reason this is performable rather than merely clever.
Play it →The strongest idea here, and the least known
The best mathematical tricks do not compute the answer. They arrange for the thing you do not know to disappear from the expression. A spectator makes a free choice, that choice enters the arithmetic twice with opposite signs, and it is gone. You never learn it because you never needed it.
They think of a number, take that many cards off the top, and remember a card you never see. Three piles counted down from ten find it.
The math: the number they chose subtracts from one part of the count and adds back to another, so it cancels completely. Their card sits 34th whatever they picked — and it stays 34th whether they hand their packet back or keep it in their pocket, because their cards sit below it and nothing below a card can move it. Checked: every number from 5 to 18.
Play the trick →Aldo Colombini's, from his book Impromptu Card Magic. Playing it is open to anybody. The method is his, so it opens to people who own the book.
Counting rather than mathematics, and worth knowing why
Two more on this site run on position rather than on a theorem. In the Four Robbers three ordinary cards ride on top of four Jacks, so the cards you push into the deck are the strangers and the Jacks never move. In Spectator Cuts to the Aces the dealing buries the aces exactly three deep, so moving three cards digs them out again.
Both are arithmetic in the sense that a recipe is chemistry. They are counting, done carefully. Calling them mathematical card tricks stretches the phrase, and knowing where it stretches is part of understanding the rest.
A card trick whose method is a piece of mathematics rather than a sleight. You deal according to a rule, and the rule forces the ending.
The usual principles are the four above: parity, sorting in base three, arithmetic modulo 13, and quantities that cancel out of an expression. Nothing is palmed and nothing is switched, so nothing can go wrong with your hands.
The Piano Trick runs on odd and even. The 21 Card Trick and the 27 Card Trick both sort in base three. The Si Stebbins stack is arithmetic modulo 13 and modulo 4. Easy Location works because the number the spectator chooses cancels out of the arithmetic entirely.
No. The mathematics is why the trick works, not what you do.
Performing the 21 Card Trick asks you to deal three piles and remember to gather the named pile in the middle. Only the Si Stebbins stack asks you to add while somebody is watching, and that sum is adding three.
The 27 Card Trick, because the answer is base three and the trick cannot be explained without it. A spectator names any number from 1 to 27, and each digit of that number written in base three tells the performer where to put one pile.
The 21 Card Trick is the easier first demonstration. The Piano Trick is the fastest way to show that parity survives being moved about, and it takes three minutes.
Two. The Si Stebbins stack orders the whole deck so that every card tells you the next one. Easy Location uses a full 52 and finishes on the 34th card every time, whatever number the spectator thought of.
The Piano Trick and the 21 Card Trick, yes — both are short, neither has a move, and a child can perform either one after two run-throughs.
The 27 Card Trick is the one worth showing a class that is learning number bases, but it needs somebody who can already convert a number to base three, which is usually the teacher.
All nine, mathematical or not, are on the self-working card tricks page — including the ones that run on a key card, a switch, or a story rather than on a sum.