Permutation and Combination Calculator
Print| Combinations: nCr | 15 |
| Formula (Permutations) | n! / (n - r)! |
| Formula (Combinations) | n! / (r! * (n - r)!) |
Permutations and combinations belong to a branch of discrete mathematics known as combinatorics. Both concepts determine the number of possible arrangements or selections within a set of elements. The primary difference lies in whether order matters: in permutations, the sequence of elements is critical; in combinations, the order of selection is entirely irrelevant.
Our free Permutation and Combination Calculator solves these equations instantly. Enter the total number of items in your set (n) and the number of items in each subset (r), and our tool computes permutations (nPr) and combinations (nCr) simultaneously, demonstrating the step-by-step factorial math.
1. Permutations: When Order Matters
A permutation is an arrangement of elements where the order of selection is important. A common real-world example is a combination lock. Mathematically, a “combination lock” is actually a permutation lock. If the code is 1-2-9, entering 2-9-1 will not unlock it, even though the digits are identical. The order of entry is crucial.
Formula for Permutations Without Replacement
When elements cannot be chosen more than once, we calculate the partial permutations (r-permutations of n) using the formula:
nPr = n! / (n - r)!
Where ! denotes a factorial (the product of all positive integers up to that number).
Permutations Example
Determine how many ways a team captain and a goalkeeper can be selected from a soccer squad of 11 players. The captain and goalkeeper must be different people.
Here, the total set size is n = 11, and we are selecting a subset of r = 2:
11P2 = 11! / (11 - 2)! = 11! / 9!
11P2 = (11 × 10 × 9!) / 9! = 11 × 10 = 110
There are 110 ways to select the captain and goalkeeper.
Permutations With Replacement
If elements can be repeated (like digits in a passcode, e.g., 3-3-3), the choices do not decrease. The formula is:
nPr = n^r
2. Combinations: When Order Does Not Matter
A combination is a selection of elements where the order of choice is irrelevant. Combinations are essentially permutations with the redundancies removed, and they are typically denoted as nCr, C(n,r), or as the binomial coefficient (n over r).
Formula for Combinations Without Replacement
To eliminate redundant arrangements (such as counting selection A-then-B and selection B-then-A as separate outcomes), we divide the permutation formula by the subset redundancies (r!):
nCr = n! / [ r! × (n - r)! ]
Combinations Example
Determine how many ways 2 strikers can be selected from a soccer squad of 11 players. Unlike the captain/goalkeeper example, both players will fill the same striker role, so the order of selection does not matter.
Here, the total set size is n = 11, and we are selecting r = 2:
11C2 = 11! / [ 2! × (11 - 2)! ] = 11! / (2! × 9!)
11C2 = (11 × 10 × 9!) / (2 × 1 × 9!) = 110 / 2 = 55
There are 55 ways to select the strikers.
Combinations With Replacement
If elements can be repeated and order does not matter, the formula is:
nCr = (r + n - 1)! / [ r! × (n - 1)! ]
Analyze how these arrangements affect probability outcomes with our Probability Calculator or determine survey demographics with the Sample Size Calculator.
Frequently Asked Questions (FAQ)
Why is nPr always larger than nCr?
Because permutations are order-sensitive, treating arrangements of the same elements (like A-B vs. B-A) as distinct outcomes. Combinations ignore order, treating A-B and B-A as a single outcome. Combinations divide out these redundancies, resulting in a smaller final count.
What does factorial (!) mean?
A factorial is the product of all positive integers less than or equal to a given number. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By mathematical definition, 0! = 1, which ensures that calculations where n = r resolve correctly.
Why is a combination lock actually a permutation lock?
Because combination locks require you to enter the numbers in a specific, exact order to unlock them. If order matters, it is a permutation. If a lock was a true combination lock, entering the correct numbers in any order would open it.
When should I use permutations vs. combinations in research?
Use permutations when you are tracking ranked positions, schedules, passwords, or order-dependent events. Use combinations when you are forming committees, selecting samples, drawing lottery numbers, or choosing ingredients where ordering is irrelevant.