Derangement count calculator
Count permutations of n distinct items in which no item remains in its original position.
Calculator
How to use this calculator
Count permutations of n distinct items in which no item remains in its original position.
- Enter Number n. Match the units shown beside each field and review the result together with the assumptions below.
- Read the worked example below to check the expected input format and result.
- Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Derangement count calculator
Count permutations of n distinct items in which no item remains in its original position.
Inputs and units
- Number n: Total number of distinct items; enter a nonnegative whole number.
Formula and method
!n=n!∑ₖ₌₀ⁿ(−1)ᵏ/k!
Worked example
For n=4, !4=4!−4!/1!+4!/2!−4!/3!+4!/4!=9.
Interpreting the result
This is an exact integer count; for large n it is close to n!/e, but the calculator recurrence avoids rounding.
Assumptions and limits
n must be a nonnegative integer. For n=0 there is one empty permutation; the displayed n input alone determines this derangement count.
Frequently asked questions
Which inputs determine this result?
The visible inputs are Number n. Each is used by the displayed formula; the calculator does not use any other hidden measurement.
When does this method apply?
n must be a nonnegative integer. For n=0 there is one empty permutation; the displayed n input alone determines this derangement count.
How do I use the Derangement count calculator?
Enter Number n. Match the units shown beside each field and review the result together with the assumptions below.
What is a worked example of Derangement count?
For n=4, !4=4!−4!/1!+4!/2!−4!/3!+4!/4!=9.
What does the Derangement count calculator calculate?
Count permutations of n distinct items in which no item remains in its original position.
See the calculation methodology.
Good calculators show their work.
CalcWorldHub is built around clear inputs and visible assumptions. Results are estimates for planning; check official sources or your provider’s terms when exact figures matter.