What is a combination?
A combination is a selection of items from a larger set where the order of selection doesn't matter. If you're picking 3 books to take on vacation from a shelf of 10, the trio {Crime and Punishment, Dune, The Hobbit} is the same combination as {Dune, The Hobbit, Crime and Punishment} — same three books, you don't care which order you grabbed them in.
The number of distinct combinations of k items chosen from n items is given by the formula:
C(n, k) = n! / (k! × (n − k)!)
Pronounced "n choose k" and sometimes written as a vertical pair (n on top, k on bottom) inside parentheses. The same number is also called the binomial coefficient — it's the coefficient of xᵏ when you expand (1 + x)ⁿ. The numbers in Pascal's triangle are all binomial coefficients.
How to use the combination calculator
- Enter n — the total number of items you can choose from.
- Enter k — the size of the subset you're choosing. k must be between 0 and n inclusive.
- The result C(n, k) appears instantly with the formula displayed and a thousands-separator-formatted number.
- For very large outputs (more than 30 digits), the calculator switches to scientific notation.
- Tap a worked example to load classic combination problems — poker hands, lottery odds, committee selections.
Combinations vs permutations — the deciding question
Always ask: does the order matter?
- YES, order matters → permutations. Gold-Silver-Bronze ≠ Bronze-Silver-Gold. Use P(n, k).
- NO, order doesn't matter → combinations. {A, B, C} = {C, B, A}. Use C(n, k).
The relationship: C(n, k) = P(n, k) / k!. Combinations are always smaller than permutations by a factor of k! — because each combination corresponds to k! different orderings, all of which collapse into the same combination. C(5, 3) = 10; P(5, 3) = 60 = 10 × 3! = 10 × 6.
Worked examples
Example 1 — Pick 3 books from 5
You have 5 books and want to pick 3 to take on a trip. How many different sets of 3 are possible?
C(5, 3) = 5! / (3! × 2!) = 120 / 12 = 10. Just 10 distinct trios — the order you grab them doesn't matter, only which 3 you end up with.
Example 2 — 5-card poker hands
From a standard 52-card deck, how many different 5-card hands are possible?
C(52, 5) = 2,598,960. About 2.6 million distinct hands. The order you're dealt the cards doesn't matter (a royal flush is a royal flush regardless of which order the cards came out). All of poker probability builds on this number.
Example 3 — UK Lotto: 6 of 49
The UK Lotto requires you to pick 6 numbers from 1-49. How many tickets are needed to cover every combination?
C(49, 6) = 13,983,816. Nearly 14 million combinations. At £2 per ticket, buying every combination would cost about £28 million — far more than the typical jackpot. The "you can guarantee a win by buying every ticket" strategy only works on much smaller lotteries.
Example 4 — Committee selection
You need to pick a 3-person committee from 10 candidates. How many different committees can you form?
C(10, 3) = 120. The order doesn't matter — Alice, Bob, and Carol form the same committee whether you list them in any order. (If you were assigning specific roles like Chair, Vice-Chair, Treasurer, you'd want permutations: P(10, 3) = 720.)
Example 5 — Powerball white balls
The US Powerball draws 5 white balls from 1-69, plus a separate red ball from 1-26. The white-ball portion alone:
C(69, 5) = 11,238,513. About 11.2 million white-ball combinations. Multiply by 26 red-ball options = 292,201,338 total tickets. The "1 in 292 million" odds you hear quoted for Powerball jackpot wins comes directly from this multiplication.
The symmetry property: C(n, k) = C(n, n−k)
An elegant fact: choosing k items to KEEP from n is the same as choosing (n−k) items to DISCARD. Every selection has a complementary selection of the same kind, so the count must be the same.
- C(10, 3) = C(10, 7) = 120
- C(52, 5) = C(52, 47) = 2,598,960
- C(100, 1) = C(100, 99) = 100
The calculator exploits this internally — when computing C(100, 99), it actually computes C(100, 1) = 100, which is far faster (1 multiplication vs 99). This is why the tool can handle n up to 1000 without slowing down.
Pascal's triangle — combinations on display
Pascal's triangle is a visual layout of every C(n, k):
1 ← C(0, 0)
1 1 ← C(1, 0), C(1, 1)
1 2 1 ← C(2, 0), C(2, 1), C(2, 2)
1 3 3 1 ← C(3, k)
1 4 6 4 1 ← C(4, k)
1 5 10 10 5 1 ← C(5, k)
1 6 15 20 15 6 1 ← C(6, k)
Each row n contains C(n, 0), C(n, 1), ..., C(n, n). Each entry equals the sum of the two entries directly above it (the "Pascal's rule": C(n+1, k+1) = C(n, k) + C(n, k+1)). The triangle is symmetric (C(n, k) = C(n, n−k)) and the row sums are powers of 2 (the sum of row n equals 2ⁿ).
Combinations with repetition
The basic C(n, k) formula assumes WITHOUT repetition — each item appears in your subset at most once. If items can repeat (like choosing 3 ice cream scoops from 5 flavors where you can pick chocolate twice), the formula changes:
C with repetition = C(n + k − 1, k)
Choosing 3 scoops from 5 flavors (repeats allowed): C(5 + 3 − 1, 3) = C(7, 3) = 35.
This calculator uses the no-repetition formula. For with-repetition problems, compute C(n + k − 1, k) using the same calculator with adjusted n.
Where combinations show up
Lottery odds
Every "pick X numbers from Y" lottery is a combination problem. Mega Millions: pick 5 from 70 (C(70, 5) = 12.1M) plus 1 from 25 = 302.5M total combinations. The math is what determines the headline jackpot odds.
Poker probability
Royal flush: 4 ways out of 2,598,960 hands = 1 in 649,740. Straight flush: 36 / 2.6M = 1 in 72,193. Every hand probability is "favorable combinations / total combinations."
Sports brackets
NCAA March Madness Round of 64 → 32: choosing which 32 teams advance from any 64 = C(64, 32) ≈ 1.83 × 10¹⁸ possibilities (but only 2³² = 4.3B if order in the bracket doesn't matter). Every bracket-pool participant is sampling one of these.
Combinatorial chemistry
Drug screening: from a library of 1000 candidate molecules, how many 5-molecule cocktails could you test? C(1000, 5) = 8.25 × 10¹². This is why brute-force combinatorial drug discovery requires careful pruning — the search space is enormous.
Committee and team formation
Workplace teams, jury selection, study groups — anywhere you select a subset of people for a role-undifferentiated task is a combination problem.
Statistics and probability
Binomial distributions, hypergeometric distributions, sampling without replacement — all use combinations as their counting building block.
Special cases worth knowing
- C(n, 0) = 1 — there's exactly one way to choose nothing (the empty set).
- C(n, n) = 1 — exactly one way to choose all items.
- C(n, 1) = n — choose just one of n items, n ways.
- C(n, n−1) = n — by symmetry with C(n, 1).
- C(2k, k) = the central binomial coefficient — peak of row 2k in Pascal's triangle, often the largest value in the row.
Common mistakes
- Confusing C with P. The single most common error in combinatorics. Always ask "does the order matter?" If yes, use permutations.
- Forgetting the (n−k)! in the denominator. The full formula has n! / (k! × (n−k)!) — three factorials, not two. Easy to drop one when scribbling on paper.
- Thinking C(n, k) and P(n, k) are interchangeable for "small" k. They're never the same (except trivially when k = 0 or k = 1). Always check what the question is asking.
- Using the no-repetition formula when items can repeat. A vending machine with 5 buttons where you press 3 (repeats allowed) gives 5³ = 125 outcomes (ordered with repetition), or C(7, 3) = 35 (unordered with repetition), NOT C(5, 3) = 10.
- Confusing 'combination lock' with combinatorial combinations. A combination lock requires the right SEQUENCE of numbers — that's a permutation, not a combination. A 3-digit lock with 40 positions has 40³ = 64,000 sequences (with repetition), not C(40, 3).
What the calculator gives you, summarized
- Exact C(n, k) — computed via BigInt for precision up to n = 1000.
- Thousands-separator formatting — for results small enough to display normally, with commas (US-style) for readability.
- Scientific approximation — for results with more than ~30 digits, displayed as m × 10ᵉ.
- Formula display — n! / (k! × (n−k)!) shown with your numbers plugged in.
- Worked examples — poker hands, UK Lotto, Powerball white balls, and committee picks all loadable with one tap.
- Combinations-vs-permutations callout — the most-confused topic in combinatorics, called out inline.
Two inputs (n and k), one BigInt-precise output. The math is just division of factorials, but the answers explain everything from poker odds to bracket pools to lottery probabilities.