๐ŸŽฒPermutation & Combination Calculator

Enter n (total items) and r (items chosen) to calculate nPr, nCr, and factorials instantly.

Combination nCr

โ€”
ItemValue
Permutation nPrโ€”
Combination nCrโ€”
n! (n factorial)โ€”
r!โ€”
(n-r)!โ€”

Permutations vs. Combinations โ€” When Order Matters and When It Doesn't

Permutations and combinations are the two fundamental tools for counting the number of ways to select or arrange items from a set. The key distinction: if the order of selection matters, use permutations; if only the selection itself matters (not the order), use combinations.

Formulas and real-world examples:
Permutation: nPr = n! / (nโˆ’r)! โ€” Ordered selection of r from n
Combination: nCr = n! / (r! ร— (nโˆ’r)!) โ€” Unordered selection of r from n
Relationship: nPr = nCr ร— r!

1. Lottery โ€” Choosing 6 numbers from 45 (order doesn't matter): C(45,6) = 8,145,060 ways
2. PIN codes โ€” Choosing 4 digits from 10 without repetition (order matters): P(10,4) = 5,040 ways
3. Team selection โ€” Picking 3 members from 10 for a committee: C(10,3) = 120 ways
4. Race results โ€” Predicting 1st, 2nd, and 3rd place from 8 runners: P(8,3) = 336 ways
5. Card hands โ€” The number of possible 5-card poker hands from 52: C(52,5) = 2,598,960
6. Probability โ€” P(event) = favorable outcomes / total outcomes, both calculated via combinations

Factorials grow extremely fast โ€” 20! exceeds 2.4 ร— 10ยนโธ. For very large n, the calculator may display results in exponential notation when the value exceeds JavaScript's safe integer limit.

Frequently Asked Questions

Q: Why is 0! defined as 1?

A: By convention, 0! = 1. There is exactly one way to arrange zero objects (doing nothing). This definition ensures nC0 = nCn = 1 and makes the combination formula work for edge cases.

Q: Is nC0 always 1?

A: Yes. nC0 = 1 because there is exactly one way to choose nothing from n items. Similarly, nCn = 1 because there is exactly one way to choose all n items.

Q: Does this handle repetition (with replacement)?

A: No, this calculator handles only standard permutations and combinations without repetition. With-repetition permutations = nสณ; with-repetition combinations = C(n+rโˆ’1, r).