Documentation/Calc Functions/COMBINA/en

Function name:
COMBINA

Category:
Mathematical

Summary:
Calculates the number of combinations with repetition when choosing a subset of k objects from a pool of n objects.

Syntax:
COMBINA(Number1; Number2)

Returns:
Returns a non-negative integer that is the number of combinations with repetition for the given arguments.

Arguments:
Number1 is a non-negative integer, or a reference to a cell containing that number, that is the number of objects in the pool.

Number2 is a non-negative integer, or a reference to a cell containing that number, that is the number of objects to be chosen from the pool.


 * If either Number1 or Number2 is non-numeric, then COMBINA reports a #VALUE! error.
 * If either Number1 or Number2 is a non-integer value, then COMBINA converts it to an integer by taking its floor value.
 * If either Number1 or Number2 is less than 0, then COMBINA reports an invalid argument error (Err:502).
 * If Number1 < Number2, then COMBINA reports an invalid argument error (Err:502).

Additional details:
$$\text{COMBINA}(n, k)~=~\frac{(k+n-1)!}{k!(n-1)!}$$
 * For example, if there are 3 items A, B and C in a set, you can choose 2 items in 6 different ways, namely AA, AB, AC, BB, BC and CC; you can choose 3 items in 10 different ways, namely AAA, AAB, AAC, ABB, ABC, ACC, BBB, BBC, BCC, CCC.
 * The formula specifying the number of possible combinations with repetition if selecting k items from a collection of n items (when order does not matter), with k ≤ n, is as follows:
 * For more information, visit Wikipedia’s Combination page.

Related LibreOffice functions:
COMBIN

PERMUT

PERMUTATIONA

ODF standard:
Section 6.16.17, part 2

Equivalent Excel functions:
COMBINA