Formula
nPr = n! ÷ (n − r)!nCr = n! ÷ (r! (n − r)!)With repetition: nʳ (ordered), (n + r − 1)! ÷ (r! (n − 1)!) (unordered) How it works
Permutations and combinations both count ways of picking r items from a set of n. The difference is whether order matters. A podium finish (gold, silver, bronze) is a permutation — Alice-Bob-Carol is a different result from Carol-Bob-Alice. A three-person committee is a combination — the same three people form the same committee no matter the order they were picked.
Because every group of r items can be arranged in r! orders, there are always r! times as many permutations as combinations: nCr = nPr ÷ r!. Choosing 3 from 10 gives 720 permutations but only 120 combinations.
With repetition allowed — like digits in a PIN, where the same digit can appear more than once — ordered selections number nʳ. A 4-digit PIN has 10⁴ = 10,000 possibilities. Unordered selections with repetition (such as choosing 3 scoops from 10 ice-cream flavours, doubles allowed) use the “stars and bars” formula C(n + r − 1, r).
Frequently asked questions
Is a combination lock really a combination?
Mathematically, no — the order of the numbers matters and repeats are allowed, so it is a permutation with repetition. “Permutation lock” would be more accurate.
What are the odds of winning a 6/49 lottery?
There are 49C6 = 13,983,816 possible tickets, so a single ticket has about a 1 in 14 million chance of matching all six numbers.
What is 0! ?
0! is defined as 1. This makes formulas work at the edges: there is exactly one way to choose nothing, so nC0 = 1.