Permutation and Combination Calculator
Enter n and r as whole numbers. Use permutations when the order of the selection matters, combinations when it does not.
How it works
A permutation is an ordered selection: P(n, r) = n! / (n−r)!. A combination is an unordered selection: C(n, r) = n! / (r!(n−r)!). P(5, 2) = 5×4 = 20 (first and second place).
C(5, 2) = 10 (a pair from five people). n and r must be integers, r cannot exceed n, and neither can be negative. Overflow is rejected instead of Infinity.
Formula
P(n, r) = n! / (n − r)! C(n, r) = n! / (r! (n − r)!)
Worked examples
Permutations of 5 take 2
P(5, 2) → 20
Combinations of 5 take 2
C(5, 2) → 10
Useful notes
- C(n, 0) = 1 and P(n, 0) = 1: there is one way to choose nothing.
FAQ
- When do I use permutations vs combinations?
Permutations if order matters (gold/silver, a PIN). Combinations if it does not (a committee, a dealt hand).
- Why is C(5, 2) smaller than P(5, 2)?
Each pair of people can be lined up in 2! = 2 ways. Dividing by r! removes that extra order.
- What if r is larger than n?
You cannot choose more items than you have. The result is rejected.
Related tools
Probability Calculator
Combine two event probabilities as independent, mutually exclusive, or overlapping, plus complements and “at least one”.
Sample Size
Estimate how many observations a proportion survey needs for a chosen confidence level and margin of error.
Statistics Calculator
Paste a list and get count, mean, median, mode, range, and both sample and population variance and SD.
See all Statistics tools.