Formualizer Docs
ReferenceFunctionsMath Functions

COMBIN

Returns the number of combinations for selecting `k` items from `n`.

Summary

COMBIN evaluates n choose k using truncated integer inputs.

Remarks

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

Examples

Basic combinations
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
10
Fractional arguments are truncated
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
20
Invalid k returns numeric error
Grid
CellValue
No inputs on Sheet1.
Formula
=
Result
Not evaluated yet.
Expected
#NUM!

FAQ

When does COMBIN return #NUM!?

It returns #NUM! if n or k is negative, or if k is greater than n after truncation.

Can COMBIN take non-integer values?

Yes, but both inputs are truncated toward zero before evaluation.

Runtime metadata

Category

Math

Signature

COMBIN(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