# Permut - script and chart function

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

Syntax:

Permut(p, q)

Return data type: integer

Limitations:

Non-integer arguments will be truncated.

Examples and results:

Examples and results

| Examples | Results |
| --- | --- |
| In how many ways could the gold, silver and<br>bronze medals be distributed after a 100 m final with 8 participants?<br><br>`Permut(<br>8,3 )` | Returns 336 |

## Learn more

* [Combin - script and chart function](https://help.qlik.com/en-US/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/combin.htm)