The Combination and Permutation Calculator computes how many ways you can choose or arrange items from a set. These are two of the most important concepts in probability and combinatorics, and they come up in everything from card games and lottery odds to scheduling problems and statistics.
A permutation counts the number of ways to arrange r items chosen from n items when the order matters. If you are picking 3 people for 1st, 2nd, and 3rd place from a group of 10, the order matters — that is a permutation. A combination counts the number of ways to choose r items from n items when the order does not matter. If you are picking 3 people for a committee from a group of 10, it does not matter who is listed first — that is a combination.
This calculator handles both P(n,r) and C(n,r), also written as nPr and nCr, with instant results and the formula used for each calculation.
Combination and Permutation Calculator
How Combinations and Permutations Work
Both formulas use factorials (n! = n × (n−1) × (n−2) × … × 1). The permutation formula is P(n,r) = n! / (n−r)!, which counts all ordered arrangements. The combination formula is C(n,r) = n! / (r! × (n−r)!), which divides the permutation count by r! to remove duplicate orderings of the same set of items. Every combination corresponds to r! permutations, since there are r! ways to arrange the same r chosen items.
Example Calculations
How many 3-person committees can be formed from 10 people? Order does not matter (committee members are equal), so use combination: C(10,3) = 10! / (3! × 7!) = 120. How many ways can 3 runners finish in 1st, 2nd, and 3rd from 10 runners? Order matters, so use permutation: P(10,3) = 10! / 7! = 720. Notice that 720 = 120 × 6, where 6 = 3! (the number of ways to order 3 items).
Combination and Permutation Reference
| n | r | P(n,r) | C(n,r) |
|---|---|---|---|
| 5 | 2 | 20 | 10 |
| 10 | 3 | 720 | 120 |
| 52 | 5 | 311,875,200 | 2,598,960 |
| 6 | 6 | 720 | 1 |
Frequently Asked Questions
When do I use a permutation vs. a combination?
Use a permutation when order matters — like assigning distinct roles (1st place, 2nd place), arranging letters in a word, or creating a PIN code. Use a combination when order does not matter — like forming a team, choosing lottery numbers, or selecting items from a menu.
What is a factorial?
A factorial (written n!) is the product of all positive integers from 1 to n. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1. Factorials grow very rapidly — 10! = 3,628,800 and 20! is over 2 quintillion.
What are the odds of winning the lottery?
A standard 6/49 lottery requires choosing 6 numbers from 49 without regard to order, so the total number of combinations is C(49,6) = 13,983,816. Your odds of winning the jackpot are 1 in nearly 14 million. This is a classic combination problem.
What is C(n,0) or P(n,0)?
C(n,0) = 1 for any n, because there is exactly one way to choose zero items (choose nothing). P(n,0) = 1 as well, because 0! = 1 and n!/n! = 1. These edge cases are mathematically consistent with the factorial definition.
Does C(n,r) equal C(n, n-r)?
Yes — this is a key symmetry of combinations. Choosing r items to include is the same as choosing n−r items to exclude. So C(10,3) = C(10,7) = 120. This makes sense intuitively: forming a 3-person group from 10 is equivalent to choosing the 7 people who are left out.