Secret Santa: someone will probably draw their own name

Put everyone’s name in a hat and let each person draw one. The chance that at least one of them pulls out their own name is about 63.2% — and the surprise is that it hardly depends on how many of you there are. For any group of 6 or more it is the same nearly-two-in-three.

People drawing names
8

Chance someone in a group of 8 draws their own name

63.2%

Of the 40,320 ways the names can come out of the hat, only 14,833 leave nobody holding their own.

Three people, every possible draw

With Ann, Ben and Cat there are only six ways the names can come out, so here they all are. Each row says who draws whom.

Ann → Ann, Ben → Ben, Cat → Catall three drew their own names
Ann → Ann, Ben → Cat, Cat → BenAnn drew their own name
Ann → Ben, Ben → Ann, Cat → CatCat drew their own name
Ann → Ben, Ben → Cat, Cat → Annworks
Ann → Cat, Ben → Ann, Cat → Benworks
Ann → Cat, Ben → Ben, Cat → AnnBen drew their own name

Only two of the six work, so with three people the chance of a problem is 66.7%. Notice that the two that work are both a single loop — Ann to Ben to Cat and back to Ann, or the other way round. With three people there is no other way to do it.

Why the group size hardly matters

Each person has a 1 in 8 chance of drawing their own name, and there are 8 of them. So on average exactly one person per hat draws themselves — whatever the size of the group. A bigger group gives more people the chance to slip up, but makes each one less likely to, and the two cancel out.

An average of one is not a guarantee of one, though. Some hats have nobody holding their own name and some have two or three, and they average out at one. In a group of 8:

  • Nobody draws their own name36.8%
  • Exactly one person does36.8%
  • Exactly two people do18.4%
  • Exactly three people do6.1%
  • Four or more do1.9%

The hats where nobody draws themselves — 36.8% of them — are why the answer is 63.2% and not 100%. And because those shares stop moving once a group is more than a handful of people, so does the answer: by 6 people it reads 63.2% and stays there.

The exact working for 8 people

Start by counting every draw (1). Take away the draws where person one has their own name, and the same for each of the others — but a draw where two people both have their own got taken away twice, so add those back, then take away the triples, and so on. Each step is one over a factorial — 3! means 3 × 2 × 1, and 6! is already 720 — which is why the corrections shrink so fast:

StepCorrectionChance nobody has their own
01100%
1− 1/1!0%
2+ 1/2!50.0%
3− 1/3!33.3%
4+ 1/4!37.5%
5− 1/5!36.7%
6+ 1/6!36.8%

The remaining 2 corrections change it by less than 0.02 of a percentage point between them.

Carried on forever, the series comes to 1/e, where e is the number 2.718… that shows up across mathematics. That is about 36.8%, so the chance of a problem is 1 − 1/e.

What to do about it

Redraw. Put every name back and start again whenever anyone gets their own. For 8 people that takes 2.72 draws on average, the same as for any bigger group. It is fair in a precise sense: every draw that works is equally likely to be the one you end up with.

Even a draw where nobody has their own name can feel wrong, in two ways. Two people can simply swap presents with each other, and the group can split into little separate circles instead of one chain through everybody. In a group of 8, a working draw contains at least one swapped pair 39.4% of the time, and is a single circle through everyone only 34.0% of the time — so a swap is more likely than one big circle.

Or use a circle. Shuffle the names, write them round a circle, and have each person give to the next. Nobody can get themselves and nobody swaps. It does not produce every possible draw — only the single-loop ones — which is usually what a group wants anyway. The catch is that whoever writes out the circle knows everyone’s match.

Questions people ask

What are the odds someone draws their own name in Secret Santa?
63.2% for any group of 6 or more — that is 1 − 1/e, and it hardly changes however big the group gets. Smaller groups differ a little: with three people it is 66.7%.
How many times will we have to redraw?
If you put every name back and draw again whenever anyone gets their own, it takes 2.72 draws on average for a group of 8, and about 2.72 for any large group.
How do you draw Secret Santa so nobody gets themselves?
Shuffle the names into a circle and have each person give to the next one round. Nobody can get themselves, nobody swaps with anyone, and the gifts form one loop through the whole group.

Check it yourself

Every count on this page is computed from scratch and checked against a published list before it ships.

  1. Derangement — Wikipedia — the readable one

    A “derangement” is the mathematicians’ word for a draw where nobody gets their own name — they call it the hat-check problem. The article gives the 1/e limit and says the chance settles on it “extremely quickly”, which is why six people already read 63.2%.

  2. A000166: derangements — The On-Line Encyclopedia of Integer Sequences — the reference list

    The number of ways to draw so that nobody gets their own name, for every group size. The first twenty values are checked here exactly, along with the two recurrences the entry credits to Euler.

  3. A038205: derangements with no 2-cycles — The On-Line Encyclopedia of Integer Sequences

    The number of working draws in which nobody swaps with anybody, behind the “pair giving to each other” figure. Checked to sixteen terms.

  4. This page’s dataset — Odds The Law

    Every figure on this page, as a downloadable file.

Try next

How the site works out its numbers is on the methodology page.

Odds The Law uses cookies for analytics and to show ads. Decline and neither will load. See our Privacy Policy for details.