If everyone throws their hat in a pile and grabs one at random, will someone still get their own?

After you watchIf everyone throws their hat in a pile and grabs one at random, will someone still get their own?

The short answer

Yes — surprisingly often. If a group throws their hats in a pile and everyone grabs one at random, the chance that at least one person gets their very own hat back is about 63% (almost 2 out of 3). And it barely changes whether the group is 5 people or 500.

Try this next

  • What if you make the group really tiny, like 2 or 3 people? Drag the group size all the way down and predict: with only 2 people, will a match be more or less likely than the big-crowd 63%? Then auto-run and watch where the meter parks.
  • What if instead of 'did SOMEONE match', you track 'did NOBODY match'? Run hundreds of rounds and count the no-match rounds yourself before you read the meter. Guess the share, then check it against the leftover 37%.
  • What if you change the group size again and again — does the chance ever break out of 63%? Pick three very different sizes (say 5, 50, 500), predict the meter for each one before running, then run all three and see if any size pulls it off 63%.

Now you — bend it

  • What if What if people could grab any kind of hat, even duplicates, instead of one each?Now a person's own-hat chance no longer shrinks with the crowd. Predict whether a match gets more common, then think about why the 'two forces cancel' story breaks.
  • What if What if the only allowed mix-up is two people swapping hats with each other?Predict the no-match chance now. With pure swaps, far fewer people end up holding their own hat — guess whether matches go up or down versus a free-for-all shuffle.
  • What if What if you had to predict the meter's resting spot before any round runs?Commit to a number for a 500-person crowd, then run. Were you closer to 'almost zero', 'about half', or the real 63%?

Can you prove it?The chance that NOBODY gets their own hat is about 37%, and it equals roughly 1 divided by the math constant e. — Run hundreds of rounds at a fixed group size and tally only the rounds where the meter shows zero matches. Divide those by the total rounds — you should land near 0.37. Then check 1 / 2.718 on a calculator and compare.

Design your own test:Pick a size nobody has tried yet, write down where you think the at-least-one-match meter will settle, then auto-run and see how close 'about 63%' really is.

Explain it to a 6-year-old: If everyone tosses their hat in a pile and grabs one without looking, almost always at least one kid happens to grab their very own.

The whole story

How it works

Two forces fight and almost exactly cancel. As the group grows, each single person's chance of grabbing their own hat shrinks (1 out of the whole crowd). But a bigger group also means more people each rolling that long shot, so there are more separate chances for a match. The shrinking odds and the growing number of tries nearly perfectly offset, and the chance that at least one person matches settles at about 63% and stops moving.

What people get wrong

People assume that with many people, the odds anyone gets their exact own item back are nearly zero — because each one person almost certainly won't. That mixes up one person's chance with the whole group's chance. Your personal odds really do shrink toward zero, but the group still lands a match about 63% of the time, because there are so many people trying at once.

The catch

Both intuitions are partly right. The 'longer odds' feeling is true for any single person: in a big crowd, your own chance of getting your own hat is tiny. The 'more tries' feeling is true for the group: more people means more chances. But more tries does not push the group chance to 100% — the two pulls cancel and lock the answer near 63%, not at either extreme.

Questions kids ask

Why doesn't the chance of a match drop to zero with a huge crowd?

Because two things change at once. Each person's own-hat chance shrinks, but the number of people trying grows. They almost exactly cancel, so the chance that at least one person matches stays near 63% instead of falling toward zero.

What about the chance that NO ONE gets their own hat?

That is the leftover: about 37% (roughly 1 in 3). It is the famous derangement chance, and it equals about 1 divided by the math constant e (around 2.718).

Does my own personal chance of getting my own hat stay at 63%?

No. Your personal chance is 1 out of the whole group, so in a big crowd it is tiny. The 63% is the chance that SOMEONE in the group matches, not the chance that you do.

Is 63% exact?

It is very close for any decent-sized group. The exact answer for n people is 1 minus the number of no-match shuffles over all shuffles, and it settles onto 1 − 1/e ≈ 0.632 almost immediately — by 5 people it is already within about 1%.

Talk about it

  • Before we run it: with a whole class throwing hats in a pile, guess how often at least one kid grabs their own.
  • Your own chance of getting your own hat back keeps shrinking in a big crowd — so how can the group still land a match most of the time?
  • If we did this at Secret Santa, would you bet on someone drawing their own name, or against it? Why?

For grown-ups

A random handout is a random permutation, and a person getting their own item is a fixed point. A permutation with no fixed points is a derangement. The number of derangements is D(n) = n!·∑(−1)^k/k!, so the probability of NO match is D(n)/n! → 1/e ≈ 0.368. The probability of at least one match is therefore 1 − 1/e ≈ 0.632. It converges fast — within about 1% by n = 5 — so it is effectively constant for any real group. It is a neat appearance of the constant e in pure counting.

Keep going

What else makes you wonder?

  • What if hats could repeat, so two people could grab the same kind — would a match get more or less likely?
  • Why does the same number, about 63%, show up no matter how big the crowd is?
  • Where else does that funny math constant e quietly turn up?

Embed this explainer

Drop it into any page, blog, or class site — it runs on its own, free.

Open standalone
<iframe src="https://clickory.org/embed/will-anyone-get-their-own-back/" width="100%" height="760" style="border:0;border-radius:16px;max-width:840px" title="If everyone throws their hat in a pile and grabs one at random, will someone still get their own? — Clickory" loading="lazy"></iframe>