Permutations and combinations calculator
Enter n and r to get nPr, nCr, factorials, and the versions with repetition.
Use whole numbers up to 500.
Permutation or combination?
Ask whether order matters. Picking a president, vice president, and treasurer from a club is a permutation, because the roles differ. Picking three people for a committee is a combination, because the group is the same no matter how you list it.
The formulas
Permutations: nPr = n! ÷ (n − r)!. Combinations: nCr = n! ÷ (r! (n − r)!). Every combination can be ordered r! ways, which is why nPr = nCr × r!.
With repetition
If items can be reused, such as digits in a PIN, the number of ordered choices is nʳ. If order does not matter but repeats are allowed, such as scoops of ice cream from n flavors, the count is C(n + r − 1, r).
Big numbers
Factorials grow extremely fast: 20! is already over two quintillion. This tool uses exact whole-number arithmetic, so results are not rounded until they get too long to show, when they switch to scientific notation.