Permutations vs Combinations: When Does Order Matter?
Counting problems often come down to a single decision: does the order of the chosen items matter? If it does, you are counting permutations. If it does not, you are counting combinations. Picking the wrong one is the most common mistake, and it can be off by a large factor.
This guide explains both formulas, gives a one-question test for choosing between them, and ends with the classic lottery calculation so you can see how big these counts get.
The one-question test
Imagine you have chosen your items and then swap two of them. Is the outcome different?
- Yes, it is different (gold and silver medals, a PIN code, a race finishing order, who sits in which seat): use permutations.
- No, it is the same (a committee, a hand of cards, toppings on a pizza, lottery numbers): use combinations.
The two counts are linked. Every group of r items can be arranged in r! ways (r factorial, the product of all whole numbers from 1 to r), so the permutation count is the combination count multiplied by r!.
The formulas
Permutations: P(n, r) = n! ÷ (n − r)!Ordered arrangements of r items chosen from n, with no repeats.
Combinations: C(n, r) = n! ÷ (r! × (n − r)!)Unordered selections of r items from n, with no repeats.
Both start from n! and cancel the part you do not need. In practice you rarely compute the full factorials: P(10, 3) is just 10 × 9 × 8, the first three terms.
Cancelling is worth the habit because factorials grow very fast. 5! is 120, 10! is 3,628,800, and 20! is about 2.4 × 10¹⁸, a figure that overflows many simple calculators.
Worked example: the same ten people, two questions
Ten runners enter a race. How many different ways can gold, silver and bronze be awarded? Order matters, so use permutations: P(10, 3) = 10 × 9 × 8 = 720.
Now suppose you only need to pick a group of three finalists, with no ranking. Order does not matter: C(10, 3) = 720 ÷ 3! = 720 ÷ 6 = 120.
The ratio is exactly 3! = 6, because each group of three can be ranked in six different orders. You can check both counts with the permutations calculator and the combination calculator.
Handy facts that save work
- 0! = 1 by convention, so choosing none or all of the items has exactly one outcome: C(n, 0) = C(n, n) = 1.
- Symmetry: C(n, r) = C(n, n − r). Choosing 3 people to include from 10 is the same as choosing 7 to leave out, so C(10, 3) = C(10, 7) = 120. Use the smaller r to shorten the arithmetic.
- Card hands: a five-card hand from a 52-card deck is a combination, since the order you pick up the cards does not matter. C(52, 5) = 2,598,960.
- Seating: arranging all n people in a row is n!, so 5 people can sit in 5! = 120 different orders.
What if items can repeat?
The formulas above assume you cannot use the same item twice. When repeats are allowed and order matters, the count is simpler: n choices for each of r positions gives nʳ possibilities.
A four-digit PIN uses the digits 0 to 9 with repeats allowed, so there are 10 × 10 × 10 × 10 = 10,000 possible codes. Counting the codes with four different digits instead gives P(10, 4) = 10 × 9 × 8 × 7 = 5,040.
Combinations with repeats allowed use a different formula, C(n + r − 1, r). The standard C(n, r) in this article is the no-repeat case.
Lottery odds as a combinations problem
In a lottery where you pick 6 numbers from 49, the order the balls are drawn in does not affect whether your ticket wins, so this is a combination. C(49, 6) = (49 × 48 × 47 × 46 × 45 × 44) ÷ 6! = 10,068,347,520 ÷ 720 = 13,983,816.
A single ticket therefore has a 1 in 13,983,816 chance of matching all six numbers, or about 0.0000072%. Choosing "nice" numbers such as 1-2-3-4-5-6 does not change that: every specific set is equally likely.
Real lotteries differ in how many numbers they draw and from what range, so use the figures of your own game with the combination calculator.
- Permutations Calculator: Enter how many items you can choose from and how many places you are filling, and the calculator counts the different ordered arrangements. Tick the repetition box when the same item may be used more than once.
- Combination Calculator: Enter how many items you can choose from and how many you will pick, and the calculator returns the number of different selections. Tick the repetition box when the same kind of item may be picked more than once.
This article is general information, not professional advice. See our Disclaimer and Editorial Policy.
More articles
How to Add and Subtract Fractions With Different Denominators
You cannot add 1/2 and 1/3 by adding the tops and bottoms. This guide shows the common-denominator method, with worked examples and mixed numbers.
Common Probability Mistakes and How to Avoid Them
Probability is full of results that feel wrong. Here are five classic mistakes, each with a short calculation showing the correct answer.
Converting Between Fractions, Decimals and Percentages
Fractions, decimals and percentages are three ways of writing the same quantity. Learn the six conversions, repeating decimals and the equivalents worth memorising.