A combination is a selection where only membership counts, not order: the lottery numbers 3, 17, 22 are the same ticket as 22, 3, 17. The number of ways to choose r objects from n distinct ones is the binomial coefficient C(n, r), read “n choose r”. It powers lottery odds, poker hand counts, committee selections and the binomial distribution.
Choose “with repetition” when the same object may be picked more than once, such as scoops of ice cream from a set of flavours or coins of given denominations. That count is C(n + r − 1, r), the “stars and bars” formula.
Results are computed exactly with whole-number arithmetic, so even 100 choose 50 is shown digit for digit; very large counts switch to scientific notation. You can type your own objects (names, colours, players) and the calculator will list every combination, up to 300 of them, which is handy for checking homework or building a schedule. The number of permutations and the odds of guessing one particular selection are shown as well.
How to use the Combination Calculator
- Number of objects to choose from (n): Ignored when you type the objects themselves below.
- Number chosen (r)
- Type of selection
- Objects to list (optional, comma-separated): If you type names here, n is taken from how many you entered and the list below uses them.
- List the selections
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
The count is built by multiplying (n − r + 1)(n − r + 2)…n and dividing by 1·2·…·r step by step, which keeps every intermediate value a whole number. Listing generates selections in lexicographic order and stops after 300.
Worked example
How many ways can 5 balls be drawn from 12 numbered balls? C(12, 5) = 12! ÷ (5! × 7!) = (12 × 11 × 10 × 9 × 8) ÷ 120 = 95,040 ÷ 120 = 792. If order mattered there would be 95,040 permutations; each combination corresponds to 5! = 120 of them. With repetition allowed the count would be C(16, 5) = 4,368.
Common combination counts
| Situation | Formula | Count |
|---|---|---|
| Pairs from 10 people | C(10, 2) | 45 |
| Poker hands | C(52, 5) | 2,598,960 |
| 6/49 lottery | C(49, 6) | 13,983,816 |
| Powerball white balls | C(69, 5) | 11,238,513 |
| 3 scoops from 5 flavours (repeats allowed) | C(7, 3) | 35 |
Formula
C(n, r) = n! ÷ (r! × (n − r)!)
With repetition: C(n + r − 1, r) = (n + r − 1)! ÷ (r! × (n − 1)!)
Relationship to permutations: P(n, r) = C(n, r) × r!
Worked example
Inputs: Number of objects to choose from (n): 49; Number chosen (r): 6; Type of selection: Combinations – order does not matter, no repeats; Objects to list (optional, comma-separated): ; List the selections: Yes – show up to 300.
Results: Number of combinations = 13,983,816; Combinations without repetition C(n, r) = 13,983,816; Combinations with repetition = 25,827,165; Permutations P(n, r) (if order mattered) = 10,068,347,520; Chance of guessing one particular selection = 1 in 13,983,816 (7.151 × 10^-6%); Orderings of each selection (r!) = 720.
Key terms
- Combination
- A selection of items where order does not matter.
- Binomial coefficient
- C(n, r) = n!/(r!(n − r)!), the number of r-item combinations of n objects.
- Factorial
- n! = 1 × 2 × … × n, with 0! = 1.
- With repetition
- Each object may be chosen more than once.
Frequently asked questions
How many 6/49 lottery combinations are there?
C(49, 6) = 13,983,816, so one ticket has a 1 in 13,983,816 chance of the jackpot.
What is the difference between combinations and permutations?
Combinations ignore order; permutations count every ordering. P(n, r) = C(n, r) × r!, so there are 720 times as many 6-number permutations as combinations.
What is 5 choose 2?
10: the pairs AB, AC, AD, AE, BC, BD, BE, CD, CE, DE.
What is C(n, 0)?
1. There is exactly one way to choose nothing, and likewise C(n, n) = 1.
When do I use combinations with repetition?
When an item can be chosen more than once and order does not matter, e.g. 3 scoops from 5 flavours: C(7, 3) = 35.
How many poker hands are there?
C(52, 5) = 2,598,960 five-card hands.
Why is C(n, r) equal to C(n, n − r)?
Choosing which r items to take is the same as choosing which n − r to leave behind.