# Documentation/Calc Functions/COMBINA

Other languages:
English • ‎dansk

COMBINA

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

• 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 kn, is as follows:

$\displaystyle{ \text{COMBINA}(n, k)~=~\frac{(k+n-1)!}{k!(n-1)!} }$

## Examples:

Formula Description Returns
=COMBINA(3; 2) From a group of 3 items, 2 can be chosen with repetitions in 6 ways. 6
=COMBINA(D1; D2) where cells D1 and D2 both contain the number 3. From a group of 3 items, 3 can be chosen with repetitions in 10 ways. 10
=COMBINA(7.6; 3.3) COMBINA truncates both arguments, to 7 and 3 respectively. From a group of 7 items, 3 can be chosen with repetitions in 84 ways. 84

COMBINA