How many different four-digit PINs are possible? How many ways can you choose 3 winners from 20 raffle entries? Both questions are about counting β but they need different formulas, because one cares about order and the other doesn't. Permutations and combinations are the two core tools for counting possibilities without listing every single one by hand, and confusing them is one of the most common errors in introductory probability.
- The single question that tells you whether to use a permutation or a combination
- Both formulas, with full worked examples
- Why C(n,k) is exactly a permutation divided by the ways to arrange the chosen items
- How these connect directly to the binomial distribution
The One Question That Decides Which to Use
These two formulas are the systematic foundation behind counting outcomes in any probability calculation more complex than a single coin flip or die roll β every C(n,k) that appears in the binomial distribution formula, and every "how many ways can this happen" question in basic probability, ultimately reduces to one of the two counting principles covered here.
Ask: does the order of selection matter? If arranging the same items in a different order counts as a different outcome, use a permutation. If the same items in any order count as the same outcome, use a combination. A PIN code (1234 is different from 4321) needs permutations. A committee of 3 people chosen from 10 (the same 3 people are the same committee regardless of who was picked first) needs combinations.
Permutations: Order Matters
This counts the number of ways to arrange k items chosen from a set of n, where order matters. Worked example: in how many ways can a 3-digit medal (gold, silver, bronze) be awarded to 8 runners? P(8,3) = 8!/(8β3)! = 8!/5! = 8Γ7Γ6 = 336. Each different assignment of runners to gold/silver/bronze counts as a distinct outcome, exactly because order (which position each runner gets) matters here.
Combinations: Order Doesn't Matter
This counts the number of ways to choose k items from n, where order doesn't matter. Worked example: in how many ways can a 3-person committee be chosen from 8 people? C(8,3) = 8!/(3!Γ5!) = 336/6 = 56. Notice this is exactly the permutation count (336) divided by 3! = 6 β the number of ways to arrange any 3 chosen people among themselves. Combinations are permutations with the "which order" information thrown away, dividing out the redundant arrangements.
Why the Combination Formula Divides by k!
This division is the entire conceptual difference between the two formulas, and it's worth sitting with. For the committee example, the permutation count (336) treats "Alice, Bob, Carol" and "Bob, Alice, Carol" as two different outcomes β but they're the same 3-person committee. Every group of 3 people gets counted 3! = 6 times in the permutation total (once for each way to order those same 3 people), so dividing by 6 correctly collapses those 6 duplicate orderings down to the single actual committee they represent.
Worked Example Comparing Both Directly
Problem: A lottery draws 4 numbered balls from 1-20, without replacement. (a) If the balls are drawn into ordered positions (1st ball, 2nd ball, etc.) and you need to match the exact order, how many outcomes are possible? (b) If only the set of 4 numbers matters (any order counts as a win), how many outcomes are possible?
(a) Order matters: P(20,4) = 20!/16! = 20Γ19Γ18Γ17 = 116,280
(b) Order doesn't matter: C(20,4) = 20!/(4!Γ16!) = 116,280/24 = 4,845
This is exactly why most real lotteries use the combination count, not the permutation count, to describe your odds β matching 4 numbers "in any order" (the usual rule) is a far more generous, and far more common, 1-in-4,845 chance rather than the much steeper 1-in-116,280 odds of matching the exact draw order.
Connection to the Binomial Distribution
The C(n,k) term inside the binomial probability formula is exactly this same combination β it counts how many different orderings of k successes among n trials are possible, which is precisely what's needed to convert "the probability of one specific sequence of successes and failures" into "the probability of exactly k successes in any order." Understanding combinations is what makes the binomial formula's structure make sense, rather than just something to memorize.
The formulas above assume items are chosen without replacement (each item used at most once) and are all distinct. A PIN code where digits CAN repeat (like 1,1,2,2) uses a simpler count instead: each of the n positions has k independent choices, giving kβΏ total permutations β for a 4-digit PIN with repeats allowed from digits 0-9, that's 10β΄ = 10,000 possible codes, a different (and larger) count than the no-repetition permutation formula above would give.
Real-World Uses
Cryptography and password security: the total number of possible passwords of a given length and character set is a permutation-with-repetition calculation, directly determining how long a brute-force attack would take.
Genetics: the number of possible orderings of genes along a chromosome, or possible combinations of allele pairs, uses these exact counting principles.
Card games and gambling: the odds of specific poker hands are calculated using combinations β the number of distinct 5-card hands from a 52-card deck is C(52,5) = 2,598,960, the denominator behind every standard poker probability calculation.
Common Mistakes
Using the permutation formula when order genuinely doesn't matter. This overcounts the true number of outcomes, sometimes dramatically β as the lottery example shows, treating "order matters" when it doesn't inflates the count by a factor of k! (24Γ for choosing 4 items, 120Γ for choosing 5), which correspondingly understates the true probability of any specific outcome by that same factor.
Forgetting that combinations already account for order internally. A common confusion is trying to further divide a combination count by an additional arrangement factor β but C(n,k) has already fully accounted for the irrelevance of order; no further adjustment is needed or correct.
Applying the without-replacement formulas when repetition is actually allowed. As the callout above notes, permutations and combinations "with repetition" use different formulas (kβΏ for permutations with repetition; a related but distinct formula for combinations with repetition) β always check whether the situation genuinely prevents reuse of the same item (like drawing cards without putting them back) before applying the standard formulas.
Combinations With Repetition
For completeness: when repetition IS allowed and order doesn't matter β like choosing 3 scoops of ice cream from 5 flavours, where you could pick the same flavour twice β the formula changes to C(n+kβ1, k). For the ice cream example: C(5+3β1, 3) = C(7,3) = 35 possible combinations of 3 scoops from 5 flavours, allowing repeats. This is a genuinely distinct fourth case from the three covered above (permutation without repetition, permutation with repetition, combination without repetition), worth knowing exists even though it's less commonly needed than the other three.
A Worked Committee Example With a Constraint
Problem: A committee of 4 is chosen from 6 men and 5 women. How many committees include exactly 2 men and 2 women?
Choose 2 men from 6: C(6,2) = 15. Choose 2 women from 5: C(5,2) = 10.
Since these two choices are independent and both must happen, multiply: 15 Γ 10 = 150 possible committees
This illustrates a genuinely useful pattern: when a selection problem breaks into independent sub-choices (here, choosing men and choosing women separately), calculate each sub-choice's combination count separately, then multiply β exactly the same multiplication-rule logic used throughout basic probability for independent events.
What does 0! (zero factorial) equal, and why?
Is C(n,k) always equal to C(n,nβk)?
How do these relate to Pascal's Triangle?
Share this article
Written by
Statistics Fundamentals Editorial Team
Written and reviewed by our team of statistics educators. Content is aligned with GCSE, A-Level, AP Statistics, and undergraduate curricula.
About Statistics Fundamentals β