Formualizer Docs
ReferenceFunctionsMath Functions

PERMUT

Returns the number of permutations for selecting and ordering `k` items from `n`.

Summary

PERMUT computes n!/(n-k)! after truncating both inputs toward zero.

Remarks

  • Fractional inputs are truncated to integers.
  • If n < 0, k < 0, or k > n, the function returns #NUM!.
  • Argument errors propagate directly.

Examples

Basic permutations
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
20
Fractional arguments are truncated
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
210
Out-of-range k returns numeric error
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
#NUM!

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)!.

Runtime metadata

Category

Math

Signature

PERMUT(arg1: Number, arg2: Number)

Arity

min 2, max 2

Arguments

arg1

Number · Scalar · coercion NumberLenientText

arg2

Number · Scalar · coercion NumberLenientText

Caps

PURE

Source

On this page