# COMBINA

**The function COMBINA returns the number of ways a given number of items can be combined, with repetitions, into groups of a given size.**

This function takes two [Numbers](../../variable-data-types/the-number-variable-data-type) as input: one gives the number of items that can be pulled from and combined, the other gives the number of items in each combination. It returns another Number: the number of different combinations that can be created given the constraints. A unique combination is defined only by which items are in it, not by how they might be arranged. Each item can appear multiple times in each combination.&#x20;

#### Declaration

```javascript
COMBINA(items, chosen) -> number
```

&#x20;

#### Parameters

**items** (required, type: _Number_) The number of item that can be used to make new combinations.&#x20;

**chosen** (required, type: _Number_) The number of items that make up each combination.

Return Values

**number** (type: _Number_) The number of unique combinations that can be made given the number of items that can be used to make new combinations and the number of items that make up each combination. A unique combination is defined only by which items are in it, not by how they might be arranged. Each item can appear multiple times in each combination.&#x20;

#### Examples

The following example calculates how many ways three items might appear in combinations of two. Note that each item can appear multiple times in each combination:

```javascript
COMBINA(3, 2) -> 6
```

The following example calculates how many ways four items might appear in combinations of three. Note again that each item can appear multiple times in each combination:

```javascript
COMBINA(4, 3) -> 20
```

#### Discussion

The function COMBINA is similar to the function [COMBIN](combin), but with one crucial difference: the COMBIN function returns the number of possible combinations assuming each item can appear only once in each combination, while the COMBINA functions assumes each item can appear multiple times.
