*See also: probability*

The calculator below will calculate number of permutations or combinations.

Please report any error to [email protected]

**Permutation** is an ordered arrangement of a number of elements of a set.

Mathematically, given a set with $n$ numbers of elements, the number of permutations of size $r$ is denoted by $P(n,r)$ or ${}_{n}P_{r}$ or ${}^{n}P_{r}$.

The formula is given by

$$P(n,r)={}_{n}P_{r}={}^{n}P_{r}=\frac{n!}{(n-r)!}$$where $n!$ ($n$ factorial) $=n\times (n-1)\times (n-2)\times \mathrm{...}\times 1$ and $0!=1$.

For example, given the set of letters
$\{\text{a},\text{b},\text{c}\}$,
the permutations of size 2 (take 2 elements of the set) are
$\{\text{a},\text{b}\}$,
$\{\text{b},\text{a}\}$,
$\{\text{a},\text{c}\}$,
$\{\text{c},\text{a}\}$,
$\{\text{b},\text{c}\}$, and
$\{\text{c},\text{b}\}$.
Please note that the *order* is important; $\{\text{a},\text{b}\}$ is considered different from $\{\text{b},\text{a}\}$.

The number of permutations is 6.

$$\begin{array}{rl}P(3,2)={}_{3}P_{2}={}^{3}P_{2}& =\frac{3!}{(3-2)!}\\ & =\frac{3\times 2\times 1}{1!}\\ & =\frac{6}{1}\\ & =6\end{array}$$Another example: How many different ways are there can 5 different books be arranged on the self?

*Answer:* Here,
$n=5$ and $r=5$.

So,

As can be seen from the above example, when $n=r$, then ${}^{n}P_{r}=n!$.

**Combination** is an unordered arrangement of a number of elements of a set.

Given a set with $n$ numbers of elements, the number of combinations of size $r$ is denoted by $C(n,r)$ or ${}_{n}C_{r}$ or ${}^{n}C_{r}$.

The formula is given by

$$C(n,r)={}_{n}C_{r}={}^{n}C_{r}=\frac{n!}{r!(n-r)!}$$For example, given the set of letters
$\{\text{a},\text{b},\text{c}\}$,
the combinations of size 2 (take 2 elements of the set) are
$\{\text{a},\text{b}\}$,
$\{\text{a},\text{c}\}$, and
$\{\text{b},\text{c}\}$.
Please note that the *order* is not important; $\{\text{b},\text{a}\}$ is considered the same as $\{\text{a},\text{b}\}$.

The number of combinations is 3.

$$\begin{array}{rl}C(3,2)={}_{3}C_{2}={}^{3}C_{2}& =\frac{3!}{2!(3-2)!}\\ & =\frac{3\times 2\times 1}{2\times 1\times 1!}\\ & =\frac{6}{2}\\ & =3\end{array}$$Another example: A basket contains an apple, an orange, a pear, and a banana. How many combinations of three fruits are there?

*Answer:* Here,
$n=4$ and $r=3$.

So,

For combination, when $n=r$, the number of combinations is always equal to 1.

*See also: probability*