Easily calculate permutations (nPr) and combinations (nCr). View step-by-step solutions and formulas.
Choose between Permutation (order matters) and Combination (order doesn't matter). Select permutation if order is important, combination if it isn't.
Enter n (total items) and r (selected items). n ranges from 0-170, r ranges from 0-n. Use quick example buttons for common values.
See the result, formula, step-by-step calculation, and factorial values. Copy the result for use elsewhere.
Permutation considers the order of selection while combination does not. For example, choosing 2 from 3 people in order (permutation) gives AB, BA, AC, CA, BC, CB = 6 ways, but choosing 2 without order (combination) gives AB, AC, BC = 3 ways.
Permutation: passwords (order matters), race rankings, electing president/vice-president. Combination: lottery numbers (45 choose 6), team formation (order irrelevant), choosing dishes from a menu, poker hands (5 from 52 cards).
Factorial (n!) is the product of all natural numbers from 1 to n. Example: 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1. Factorials are fundamental components in permutation and combination formulas.
Yes, we use JavaScript's BigInt for arbitrary-precision arithmetic. We support n up to 170, and 170! is approximately 7.3 × 10^306. Even these huge numbers are calculated exactly.
Permutations and Combinations are fundamental mathematical concepts at the heart of probability and statistics. Permutations count ordered arrangements while combinations count unordered selections. They are applied to lottery odds, password combinations, team formations, and many real-world problems.
Permutation nPr = n!/(n-r)! counts the number of ways to arrange r items from n items in order. Combination nCr = n!/(r!(n-r)!) counts the number of ways to choose r items from n without regard to order. The relationship nPr >= nCr always holds, and nPr = nCr × r!. Pascal's Triangle visually represents combination values.
Permutations and combinations appear everywhere in daily life. The probability of winning Lotto 6/45 is 1 in 45C6 = 8,145,060. The number of 4-digit passwords is 10P4 = 5,040. In poker, one pair occurs in 1,098,240 out of 52C5 = 2,598,960 hands (about 42.3%). These concepts are essential in probability calculation, business decision-making, cryptography, genetics, and many other fields.