Work out secret santa pairing instantly with clear inputs, formula shown and shareable results.
Valid Secret Santa assignments are derangements, permutations with no fixed point, counted by the recurrence D(n) = (n - 1) x (D(n-1) + D(n-2)). The share of valid draws converges on 1 over e, about 36.8%, so a naive draw from a hat fails roughly two thirds of the time regardless of group size.
Derangements
D(n) = (n - 1) x (D(n-1) + D(n-2)), with D(1) = 0 and D(2) = 1
Valid share
share = D(n) / n!, which tends to 1/e
D(n) = (n - 1) x (D(n-1) + D(n-2)), with D(1) = 0 and D(2) = 1. Valid Secret Santa assignments are derangements, permutations with no fixed point, counted by the recurrence D(n) = (n - 1) x (D(n-1) + D(n-2)).
The share of valid draws converges on 1 over e, about 36.8%, so a naive draw from a hat fails roughly two thirds of the time regardless of group size.
Enter number of participants, gift budget each. The defaults shown are a realistic worked example — swap in your own figures to get a result you can use.