# Combin - Script and chart function

Combin() returns the number of combinations of q elements that can be picked from a set of p items. As represented by the formula: `Combin(p,q) = p! / q!(p-q)!` The order in which the items are selected is insignificant.

Syntax:

Combin(p, q)

Return data type: integer

Limitations:

Non-integer items will be truncated.

Examples and results:

Examples and results

| Examples | Results |
| --- | --- |
| How many combinations of 7 numbers can be picked from a total of 35 lottery numbers?<br><br>`Combin(<br>35,7 )` | Returns 6,724,520 |

## Learn more

* [Permut - Script and chart function](https://help.qlik.com/en-US/sense/November2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/permut.htm)