Maths & numbers

Derangement count calculator

Count permutations in which every item moves from its original position.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

One object cannot move to a new position on its own. With two objects, swapping them is the only solution.

THE FORMULADₙ = (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.

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ₙ₋₂)

Find your calculator

Start typing to explore the library.