PERMUT
Returns the number of permutations for selecting and ordering k items from n.
PERMUT computes n!/(n-k)! after truncating both inputs toward zero.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=PERMUT(number, number_chosen)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
number | number | Required | — |
number_chosen | number | Required | — |
Remarks
- Fractional inputs are truncated to integers.
- Argument errors propagate directly.
Error cases
- If
n < 0,k < 0, ork > n, the function returns#NUM!.
Examples
Count selections of size two from a population of five.
Formula =PERMUT(5,2)
Expected result 20
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Compare the result when selecting a single member.
Formula =PERMUT(5,1)
Expected result 5
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Count the ways to make an empty selection.
Formula =PERMUT(5,0)
Expected result 1
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
A negative population size is invalid.
Formula =PERMUT(-1,2)
Expected result #NUM!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Fractional arguments are truncated
Formula =PERMUT(7.9, 3.1)
Expected result 210
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Out-of-range k returns numeric error
Formula =PERMUT(4, 6)
Expected result #NUM!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Why does PERMUT fail when k is larger than n?
Permutations require choosing at most n items, so k > n returns #NUM!.
How are decimal inputs handled?
PERMUT truncates n and k toward zero before computing n!/(n-k)!.