Choosing some from many — and whether the order counts
Half of counting is one question: does the order of the picks matter? A committee of 3 chosen from 10 people is the same committee whichever order the names were drawn in — that is a combination. A podium of gold, silver and bronze from the same 10 people changes completely when the order changes — that is a permutation. Lottery tickets, poker hands, passwords and podium finishes are all this one distinction wearing different clothes, and confusing the two counts is the most common counting error there is: for the same n and r the permutation count is always the larger, by a factor of exactly r!. This page reports both counts, plus both again when the same item may be picked repeatedly, and shows the factorials underneath so every figure can be rebuilt by hand. It is the counting engine behind the random number generator, whose possible-sets figure for drawing 6 numbers from 1–100 is C(100, 6) from this page: 1,192,052,400.
The formulas, with every term defined
C(n, r) = n! ÷ (r! × (n − r)!) · P(n, r) = n! ÷ (n − r)!With repetition: C(n + r − 1, r) and nr · n! = n × (n − 1) × … × 2 × 1, and 0! = 1
Read it in words. n is the number of items available and r is the number picked. The factorial n! is what you get by multiplying a whole number by every whole number below it down to 1 — 5! = 5 × 4 × 3 × 2 × 1 = 120 — and it counts the orders a set can be arranged in, which is why it sits underneath both formulas. The permutation count P(n, r) fills r ordered slots: n choices for the first slot, n − 1 for the second, and so on — that falling product is exactly n! with the tail (n − r)! divided away. The combination count then divides the permutations by r!, because every unordered set of r items was counted once for each of its r! arrangements, and a combination wants it counted once. The repetition pair relaxes the one rule the first pair enforces: combinations with repetition, C(n + r − 1, r), allow the same item into the pick more than once while still ignoring order, and permutations with repetition, nr, give every one of the r slots all n choices again — the count behind PINs and codes.
Worked example: choosing 3 from 10
The defaults above enter n = 10 and r = 3. The factorials are 10! = 3,628,800, 3! = 6 and (10 − 3)! = 7! = 5,040. Combinations: C(10, 3) = 3,628,800 ÷ (6 × 5,040) = 3,628,800 ÷ 30,240 = 120. Permutations: P(10, 3) = 3,628,800 ÷ 5,040 = 720. The shortcut shows why both are right: filling 3 ordered slots gives 10 × 9 × 8 = 720 directly, and dividing by the 3! = 6 orders each trio can be arranged in gives 720 ÷ 6 = 120. With repetition the counts open up: combinations become C(10 + 3 − 1, 3) = C(12, 3) = 220, and permutations become 103 = 1,000 — the familiar count of three-digit codes from 000 to 999. All four figures appear in the result above, with the 720 ÷ 6 = 120 check printed as its own row, as the chart near the top draws the four counts side by side.
Four counts across familiar situations
| Situation (n items, pick r) | Combinations | Permutations | Comb. with repetition | Perm. with repetition |
|---|---|---|---|---|
| Pick 2 from 5 — a pair from a small group | 10 | 20 | 15 | 25 |
| Pick 3 from 10 — worked example | 120 | 720 | 220 | 1,000 |
| Pick 4 from 10 — a 4-digit choice of digits | 210 | 5,040 | 715 | 10,000 |
| Pick 3 from 20 — a panel from a class | 1,140 | 6,840 | 1,540 | 8,000 |
| Pick 6 from 49 — a lottery ticket | 13,983,816 | 10,068,347,520 | 25,827,165 | 13,841,287,201 |
| Pick 5 from 52 — a poker hand | 2,598,960 | 311,875,200 | 3,819,816 | 380,204,032 |
Read the table by the question each row answers. The lottery row is why the jackpot is hard: a ticket matches one specific set of 6 among 13,983,816 combinations — and notice the permutation column, over ten billion, which is the game it would be if the draw order also had to match. The poker row counts hands, not deals: 2,598,960 different five-card hands exist, however they were dealt. The 4-from-10 row is a PIN in disguise — 10,000 codes when digits may repeat and order matters, falling to 5,040 permutations when no digit may repeat, and just 210 combinations when order is ignored as well. One symmetry is worth carrying away: C(n, r) always equals C(n, n − r), because choosing the 3 who are picked is the same act as choosing the 7 who are left — C(10, 7) is also 120, and this page returns it. The powers in the last column are the same growth the exponent calculator works with; counting and powers are the same subject seen from two sides.
Reading a count honestly — the limits
Three cautions belong with any result here. A count is not yet a probability: 13,983,816 lottery combinations become odds of 1 in 13,983,816 only because every combination is equally likely to be drawn — the moment outcomes are not equally likely (loaded dice, a biased draw, a password a human chose), the count stays true but the probability built on it needs the weights, not just the totals. Repetition has two meanings in the wild: this page uses the standard textbook pair — combinations with repetition C(n + r − 1, r) and permutations with repetition nr — but some fields state the repetition rules differently for sampling problems, so check which model a textbook or exam is using before quoting a figure. And the counts are exact, which is why n stops at 200: every result here is a whole number computed digit for digit with no rounding, and factorials grow so fast that 200! already has 375 digits — beyond the cap the arithmetic still works, but the answer stops being something a person can read, which is the honest limit of a counting page.
Frequently asked questions
What is the difference between a combination and a permutation?
Whether order matters. Choosing a 3-person committee from 10 people is a combination — the same three people are the same committee in any order — and there are 120 such committees. Awarding gold, silver and bronze to 3 of the same 10 people is a permutation, because swapping the gold and bronze winners changes the result — and there are 720 such podiums. The permutation count is always the combination count multiplied by r! (here 3! = 6, and 120 × 6 = 720), because every set can be arranged that many ways.
Why does the combination formula divide by r!?
Because the permutation count lists every set once for each arrangement it can be put in. Three picked items can be arranged 3! = 6 ways, so the 720 ordered picks contain each unordered trio exactly 6 times: 720 ÷ 6 = 120 trios. Dividing by r! removes exactly that over-counting — no more, no less — which is why the divisor is the factorial of the number picked, not of the number available.
What is C(10, 7)? It looks harder than C(10, 3).
It is the same number: 120. Choosing the 7 who stay is the identical act to choosing the 3 who go, so C(n, r) always equals C(n, n − r). The page uses the smaller of r and n − r in its own working for speed, and the symmetry is a free check on any hand calculation: if C(10, 7) and C(10, 3) come out different, one of the two workings is wrong.
How many combinations are there in a 6-from-49 lottery?
C(49, 6) = 13,983,816 — every ticket is one of those sets, which is where the familiar 1-in-13,983,816 jackpot odds come from (before any split of the prize or bonus-ball rules). The permutation count for the same draw, 10,068,347,520, shows the game it is not: if the six numbers also had to arrive in the drawn order, there would be 720 times as many outcomes, because 6! = 720.
What if the same item can be picked more than once?
Use the repetition columns. A 4-digit PIN is the everyday case: digits may repeat and order matters, so the count is permutations with repetition, 10 to the power of 4 = 10,000 codes. Forbid the repeats and it falls to P(10, 4) = 5,040; ignore the order as well and it is C(10, 4) = 210 combinations, or 715 combinations with repetition, C(13, 4), when repeats are allowed but order still does not matter. The four counts answer four different rules — the first job is deciding which rules your situation actually has.

