Use a permutation when the order of the chosen items matters, and a combination when it does not. Picking a president, secretary and treasurer is a permutation. Picking three people for a committee is a combination.
Factorials
Both formulas use the factorial. The factorial of n, written n!, is the product of every whole number from n down to 1.
- 5! = 5 × 4 × 3 × 2 × 1 = 120
- 3! = 6
- 0! = 1 by definition
n! is also the number of ways to arrange n different items in a row. Five books can be lined up on a shelf in 120 ways.
Permutations: order matters
The number of ways to choose r items from n and arrange them in order is:
In practice, start at n and multiply r descending numbers.
Example 1. Eight runners compete for gold, silver and bronze. How many different podiums are possible?
Any of 8 can take gold, then any of the remaining 7 silver, then any of 6 bronze: 8 × 7 × 6 = 336. With the formula, 8! ÷ 5! = 40,320 ÷ 120 = 336.
Combinations: order does not matter
The number of ways to choose r items from n when order is irrelevant is:
This is the permutation count divided by r!, because each group of r items can be arranged in r! orders that all count as the same selection.
Example 2. From the same eight runners, how many ways can three be picked for a drug test? Order does not matter, so divide the 336 ordered picks by 3! = 6. The answer is 336 ÷ 6 = 56.
Example 3. A pizza shop offers 10 toppings and you choose 3. 10C3 = (10 × 9 × 8) ÷ (3 × 2 × 1) = 720 ÷ 6 = 120 different pizzas.
Example 4. A lottery draws 6 numbers from 49. The number of possible tickets is 49C6 = 13,983,816, so one ticket has about a 1 in 14 million chance. The permutations and combinations calculator handles numbers this large, and the percentage calculator can turn such odds into a percent.
How to tell which applies
Ask one question: if I rearrange the same chosen items, is it a different outcome? If yes, use permutations. If no, use combinations.
| Situation | Order matters? | Use |
|---|---|---|
| Ranking the top 3 finishers | Yes | Permutation |
| Assigning different job titles | Yes | Permutation |
| PINs, passwords, phone numbers | Yes | Permutation |
| Choosing a committee or team | No | Combination |
| A hand of cards | No | Combination |
| Lottery numbers | No | Combination |
Words such as "arrange", "rank", "order", "schedule" and "assign" point to permutations. Words such as "choose", "select", "group" and "pick" usually point to combinations. A "combination lock", despite the name, is a permutation: 1-2-3 will not open a lock set to 3-2-1.
When repetition is allowed
The formulas above assume each item can be used only once. If items can repeat and order matters, the count is simply n multiplied by itself r times.
Example 5. A 4-digit PIN using digits 0 to 9:
- Digits may repeat: 10 × 10 × 10 × 10 = 10,000 PINs.
- No digit repeats: 10 × 9 × 8 × 7 = 5,040 PINs.
If order does not matter and repeats are allowed, such as choosing 3 scoops from 5 ice cream flavors, the count is (n + r − 1)C r. Here that is 7C3 = 35.
Arrangements with identical items
When some of the items being arranged are identical, divide n! by the factorial of each repeat count. The letters of LEVEL have two Ls and two Es, so there are 5! ÷ (2! × 2!) = 120 ÷ 4 = 30 distinct arrangements, not 120.
Useful facts
- nPr is never smaller than nCr, since nPr = nCr × r!.
- Choosing r items to take is the same as choosing n − r to leave behind, so nCr = nC(n − r). For example 10C7 = 10C3 = 120.
Common mistakes
- Using permutations for groups. Counting committees with nPr overcounts by a factor of r!. Three people give 6 orderings of one committee.
- Using combinations for ranked or labelled positions. If the roles differ, order matters.
- Ignoring repetition. Check whether an item can be picked twice before choosing a formula.
- Computing huge factorials in full. Cancel first. 49C6 does not need 49!, only 49 × 48 × 47 × 46 × 45 × 44 divided by 720.
- Treating 0! as 0. It equals 1, which keeps the formulas working when r = n.
Run the numbers yourself
Common questions
What is the difference between a permutation and a combination?
In a permutation the order of the selected items matters, and in a combination it does not. ABC and CBA are two permutations but only one combination.
How do I know whether order matters?
Ask whether rearranging the same chosen items produces a different result. Rankings, codes and assigned roles depend on order, while committees, hands of cards and lottery picks do not.
How are nPr and nCr related?
nCr equals nPr divided by r!, because every group of r items can be ordered in r! ways. For 8 items taken 3 at a time, 336 permutations become 56 combinations.