Permutations & Combinations
Count ordered permutations and unordered combinations.
Inputs
Loading calculator…
Calculating…
Was this helpful?
Formula
nPr = n! ÷ (n−r)! · nCr = n! ÷ (r! × (n−r)!)
Permutations count ordered arrangements — picking a president, vice-president, and treasurer from a club. Combinations count unordered selections — choosing any three officers where role order doesn't matter.
Worked example
From 10 people, choosing and ordering 3 gives 720 permutations (10P3). Choosing any 3 without order gives 120 combinations (10C3) — six times fewer because each trio can be arranged 3! ways.
Where this can give the wrong answer
- r cannot exceed n — there's no way to choose more distinct items than exist.
- n above 170 is rejected because factorials overflow JavaScript's number type.
- 0C0 and nC0 equal 1 — there's exactly one way to choose nothing (or everything when r = n).
FAQ
- Permutations when order matters (PIN codes, podium finishes). Combinations when order doesn't (lottery balls, pizza toppings). If swapping two picks changes the outcome, use nPr.