MyVIPWebTools logo

Derangement Calculator — Count Permutations With No Fixed Points

Our Derangement Calculator computes the subfactorial !n, the number of ways to permute n objects so that not a single one ends up in its original position, using the recurrence !n = (n − 1) × (!(n − 1) + !(n − 2)), computed with exact BigInt precision so results stay exact no matter how large n is.

Quick Answer

!n counts the permutations of n objects with no fixed points. Enter n below to instantly get the exact subfactorial via its recurrence, computed with BigInt precision.

Enter n, then click Calculate.

How to Use the Derangement (Subfactorial) Calculator — !n Online

  1. 1

    Enter n, the number of objects to derange.

  2. 2

    Click 'Calculate' to get the exact number of derangements !n.

  3. 3

    Review the recurrence used to compute the result.

Why Use Derangement (Subfactorial) Calculator — !n Online?

A derangement is a permutation with no fixed points — every object ends up somewhere other than its original spot, the classic setup behind puzzles like 'in how many ways can n people's hats get mixed up so nobody gets their own hat back.' The count of derangements, denoted !n, satisfies a simple recurrence built from smaller derangement counts, and is closely approximated by n!/e for large n — in fact, the probability that a random permutation is a derangement converges to 1/e, a surprising appearance of Euler's number in pure combinatorics. This calculator computes !n exactly using BigInt arithmetic via the standard recurrence.

Frequently Asked Questions

Related Tools

Derangement (Subfactorial) Calculator — !n Online | MyVIPWebTools