The key difference: order matters for permutations but does not matter for combinations. Choosing a 3-digit code cares about order (permutation); choosing 3 lottery numbers does not (combination). Our combination calculator and permutation calculator handle all four scenarios — with and without repetition — in a single interface.
The Formulas
Combination (order doesn't matter): C(n,r) = n! / (r! × (n−r)!)
The combination calculator (nCr) counts selections where the arrangement is irrelevant — useful for lottery odds, poker hands, and committee formation. The permutation calculator (nPr) counts arrangements where position matters — essential for password analysis, race outcomes, and scheduling problems.
With Repetition
| Type | Formula | Example |
|---|---|---|
| Permutation (no repeat) | n! / (n−r)! | Top 3 from 10: 720 |
| Permutation (with repeat) | nr | 3-digit code: 10³ = 1000 |
| Combination (no repeat) | n! / (r!(n−r)!) | 3 from 10: 120 |
| Combination (with repeat) | C(n+r−1, r) | Choose 3 from 10 types: 220 |
Permutations with repetition are the simplest: nr. A 4-digit PIN with digits 0-9 has 10⁴ = 10,000 possibilities. Combinations with repetition use the "stars and bars" formula C(n+r-1, r) — for example, choosing 3 scoops of ice cream from 5 flavors (you can repeat flavors) gives C(5+3-1, 3) = C(7,3) = 35 possibilities. The repetition formulas work for any r value, even when r exceeds n.
Worked Examples
How many ways to choose 3 toppings from 10 available pizza toppings (order doesn't matter, no repetition)? C(10,3) = 10! / (3! × 7!) = 3,628,800 / (6 × 5,040) = 120 ways.
How many ways to award gold, silver, and bronze medals to 10 athletes (order matters, no repetition)? P(10,3) = 10! / 7! = 10 × 9 × 8 = 720 ways. Notice this is 6 times larger than C(10,3) = 120, because for each group of 3 athletes there are 3! = 6 ways to arrange them on the podium.
The Factorial Function
The factorial n! = n × (n−1) × ... × 2 × 1 is the building block of all combinatorial formulas. 0! is defined as 1. Factorials grow extremely fast — 10! = 3,628,800, 20! ≈ 2.43 × 10¹⁸, and 70! exceeds 10¹⁰⁰. Our factorial calculator provides step-by-step expansion for small n and handles large values up to n = 170.
Why Combinations and Permutations Matter
These counting principles are fundamental to probability theory. The binomial coefficient C(n,k) appears in the binomial distribution formula. Lottery odds are purely combinatorial calculations. Poker hand probabilities rely on combinations. In computer science, permutations are essential for algorithm analysis and cryptography.
Common Mistakes
- Using permutation when combination is needed: If order doesn't matter (like choosing a committee), use nCr, not nPr.
- Forgetting about repetition: A combination lock is actually a permutation with repetition — order matters and digits can repeat.
- Applying to non-discrete problems: Combinations count discrete selections, not continuous partitions.
- Confusing C(n,r) with C(n,n-r): Choosing r items to include is the same as choosing n-r to exclude, so C(10,3) = C(10,7) = 120.