How this calculation works
One object cannot move to a new position on its own. With two objects, swapping them is the only solution.
Dₙ = (n−1)(Dₙ₋₁ + Dₙ₋₂)A worked example
For five items there are 44 such permutations.
Good to know
The empty arrangement counts as one derangement.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Count permutations in which every item moves from its original position.
The primary result is labeled “Derangements”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
The empty arrangement counts as one derangement.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
For five items there are 44 such permutations.
Which rule does this calculator apply?
Dₙ = (n−1)(Dₙ₋₁ + Dₙ₋₂)