Permutation & Combination Calculator
Calculate permutations (nPr) and combinations (nCr) with or without repetition, including exact BigInt factorials.
Scientific References & Assumptions
- Items in the set are distinct and identifiable.
- In standard selections without repetition, each item can only be chosen at most once.
- In repetition selections, there is an infinite supply or replacement of each item.
- Permutations and Combinations. (2026). Encyclopædia Britannica. britannica.com/science/permutation
- Rosen, K. H. (2019). Discrete Mathematics and Its Applications (8th ed.). McGraw-Hill Education.
Frequently Asked Questions
What is the main difference between permutations and combinations?
In permutations, the order of selection matters (e.g. {A, B} is different from {B, A}). In combinations, the order does not matter (e.g. {A, B} is the same as {B, A}).
What are permutations and combinations with repetition?
Permutations and combinations with repetition allow an item to be selected more than once (e.g., pulling marbles from a bag and putting them back before the next pull).
Why does standard nCr and nPr require n to be greater than or equal to r?
Without repetition, you cannot choose more items than the total number of items available. For example, you cannot choose 5 distinct marbles from a bag containing only 3 marbles.
How is nCr calculated when r is greater than n?
For standard combinations (without repetition), choosing more items than are available is impossible, so the result is mathematically 0. For combinations with repetition, it is possible and calculated using the formula C(n+r-1, r).
What is the value of 0! (zero factorial)?
0! is mathematically defined as 1. This ensures that formulas like combinations and permutations work consistently when r = 0 or r = n.
What is the difference between nCr and nPr?
nCr calculates the number of ways to select r items from n items where the order of selection does not matter. nPr calculates the number of ways to select and arrange r items from n items where order does matter. nPr is always greater than or equal to nCr.
Can n and r be decimals or negative numbers in permutations?
No, permutations and combinations deal with counting distinct discrete objects. Therefore, n and r must be non-negative integers.
How does the calculator handle extremely large results without overflowing?
The calculator utilizes BigInt arithmetic, which supports arbitrarily large integers. Additionally, instead of computing large factorials directly and dividing them, the calculator uses multiplicative cancellation to compute results efficiently.
About the Permutation & Combination
Quickly calculate permutations and combinations for standard discrete sets. Toggle between options with or without repetition, view step-by-step arithmetic factorials, and see a list of actual example arrangements.
Mathematical Formula & Logic
Step-by-Step Example
Worked Examples: 1. Standard Selection (n = 10, r = 3): To select 3 distinct items from a pool of 10: - For permutations (order matters): P(10, 3) = 10! / (10 - 3)! = 10! / 7! = 10 Γ 9 Γ 8 = 720 possible arrangements. - For combinations (order does not matter): C(10, 3) = 10! / [3! Γ (10 - 3)!] = 720 / (3 Γ 2 Γ 1) = 120 possible groups. 2. Selection with Repetition (n = 5, r = 5): When selecting 5 items from 5 with replacement allowed: - For permutations with repetition: P_R(5, 5) = 5^5 = 3,125 sequences. - For combinations with repetition: C_R(5, 5) = (5 + 5 - 1)! / [5!(5 - 1)!] = 9! / (5! Γ 4!) = 126 multisets.
Reference Data & Values
| selection mode | formula | order matters | repetition allowed | example 3_from_5 |
|---|---|---|---|---|
| Standard Permutations (nPr) | P(n, r) = n! / (n - r)! | Yes | No | 60 |
| Standard Combinations (nCr) | C(n, r) = n! / [r! * (n - r)!] | No | No | 10 |
| Permutations with Repetition | P_R(n, r) = n^r | Yes | Yes | 125 |
| Combinations with Repetition | C_R(n, r) = (n + r - 1)! / [r! * (n - 1)!] | No | Yes | 35 |