🔢 Permutation / Combination Calculator
Enter n and r to calculate nPr (permutation), nCr (combination), and n! (factorial).
Formulas
nPr = n! / (n − r)!
nCr = n! / (r! × (n − r)!)
Use permutation when order matters, combination when order does not matter.
Examples
10P3 = 10×9×8 = 720 (ordered selection of 3 from 10)
10C3 = 720÷6 = 120 (unordered selection of 3 from 10)
Examples
Handing out gold, silver and bronze to 3 of 10 runners gives 10P3 = 10 × 9 × 8 = 720 possibilities, because the order is part of the result.
Choosing 3 toppings from 10 gives 10C3 = 720 ÷ 6 = 120, since the order on the pizza does not change it.
What the counts assume
n must be a non-negative integer and r cannot exceed it; n above 170 overflows double precision because 170! is already close to the largest representable number. Each item is used at most once and all items are distinct, so repeats or identical objects need the multinomial formulas instead. Both counts ignore arrangement constraints such as seating restrictions.
Frequently asked questions
- How do I decide between permutation and combination?
- Ask whether swapping two chosen items produces a different outcome. Medals, passwords and finishing orders are permutations; teams, lottery tickets and pizza toppings are combinations.
- Why does nCr equal nC(n−r)?
- Picking which r items to take is the same as picking which n − r to leave behind, so 10C3 = 10C7 = 120 and the symmetry halves the work.
- What is 0! and why?
- It is 1 by definition, which keeps the formulas consistent: 10C10 = 10! / (10! × 0!) = 1, the single way of taking everything.