Combinations Calculator C(n,k) — n choose k
The combinations formula C(n,k) — also written "n choose k" or nCk — counts how many distinct subsets of size k can be formed from a set of n elements when order does not matter: selecting {A,B,C} is the same as {C,B,A}. The formula is C(n,k) = n! / (k! × (n−k)!). Classic applications: Powerball jackpot odds use C(69,5) × 26 = 292,201,338; poker has C(52,5) = 2,598,960 possible 5-card hands; Pascal's triangle entries are exactly the C(n,k) values.
C(n,k) = n! / (k! × (n−k)!) counts the number of ways to choose k items from n when order doesn't matter. Key values: C(5,2) = 10, C(52,5) = 2,598,960 (poker hands), C(69,5) = 11,238,513 (Powerball white balls). To compute without large factorials: C(n,k) = n×(n-1)×...×(n-k+1) / k!
When to use this calculator
- Lottery odds: Powerball jackpot = C(69,5) × 26 = 292,201,338 combinations (1 in 292 million).
- Poker probabilities: C(52,5) = 2,598,960 possible 5-card hands from a standard deck.
- Team selection: how many ways to pick 5 players from a 20-person squad — C(20,5) = 15,504.
- Binomial theorem coefficients: (a+b)^n expansion uses C(n,0), C(n,1), ..., C(n,n) as coefficients.
- Statistics: number of possible samples of size k from a population of n (hypergeometric distribution).
- Genetics: counting allele combinations in Mendelian dihybrid crosses.
Example: Powerball white-ball combinations
- n = 69 white balls, k = 5 to draw
- C(69,5) = 69! / (5! × 64!)
- = (69 × 68 × 67 × 66 × 65) / (5 × 4 × 3 × 2 × 1)
- = 1,348,621,560 / 120 = 11,238,513
- Multiply by 26 Powerballs → 11,238,513 × 26 = 292,201,338 total combinations
How it works
2 min readCombinations answer: "In how many ways can I choose k items from n items when order doesn't matter?" The result {A,B,C} is the same combination as {C,B,A} — unlike permutations where order creates different outcomes.
The Formula
C(n,k) = n! / (k! × (n−k)!)
Where n! = n × (n−1) × ... × 1, and 0! = 1 by convention.
Step-by-step C(5,2):
For large n, avoid computing n! entirely. Use the direct form:
C(n,k) = n × (n−1) × ... × (n−k+1) / k!
Example: C(100,3) = (100 × 99 × 98) / (3 × 2 × 1) = 970,200 / 6 = 161,700
Reference Table — Common C(n,k) Values
| n \ k | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| 2 | 1 | 2 | 1 | — | — | — | — |
| 3 | 1 | 3 | 3 | 1 | — | — | — |
| 4 | 1 | 4 | 6 | 4 | 1 | — | — |
| 5 | 1 | 5 | 10 | 10 | 5 | 1 | — |
| 6 | 1 | 6 | 15 | 20 | 15 | 6 | 1 |
| 10 | 1 | 10 | 45 | 120 | 210 | 252 | 210 |
| 20 | 1 | 20 | 190 | 1,140 | 4,845 | 15,504 | 38,760 |
| 52 | 1 | 52 | 1,326 | 22,100 | 270,725 | 2,598,960 | — |
| 69 | 1 | 69 | 2,346 | 52,394 | 864,501 | 11,238,513 | — |
This table is Pascal's Triangle: each value is the sum of the two above it. Row n sums to 2ⁿ.
Real-World Examples
1. Powerball (US lottery): Choose 5 white balls from 69, plus 1 red Powerball from 26.
C(69,5) × 26 = 11,238,513 × 26 = 292,201,338 total combinations.
Jackpot odds: 1 in 292,201,338 (≈ 0.00000034%).
2. Mega Millions: Choose 5 from 70, plus 1 Mega Ball from 25.
C(70,5) × 25 = 12,103,014 × 25 = 302,575,350 combinations.
3. Poker — 5-card hand from 52 cards:
C(52,5) = 2,598,960 total hands.
Royal flush: 4 (odds: 1/649,740). Straight flush: 36 (1/72,193).
Four of a kind: 624 (1/4,165). Full house: 3,744 (1/694).
Flush: 5,108 (1/509). Straight: 10,200 (1/255).
4. NCAA bracket: C(64,32) ≈ 1.83 × 10^18 — far more than perfect brackets possible.
Key Properties
Combinations vs. Permutations
| Combinations C(n,k) | Permutations P(n,k) | |
|---|---|---|
| Order matters? | No | Yes |
| Formula | n!/(k!(n-k)!) | n!/(n-k)! |
| C(5,2) vs P(5,2) | 10 | 20 |
| Example | Choosing a committee | Ranking contestants |
Always: P(n,k) = k! × C(n,k)
Common Mistakes
1. Using permutations when order doesn't matter (overcount by factor k!).
2. Computing n! directly for large n — 20! already has 19 digits. Use the direct formula.
3. Ignoring symmetry: C(52,49) = C(52,3) = 22,100 (much easier to compute).
4. Combinations with repetition: If items can repeat, use CR(n,k) = C(n+k−1, k) instead.
Frequently asked questions
What is the difference between combinations and permutations?
Combinations count ways to choose items when order doesn't matter: {A,B} = {B,A}. Permutations count arrangements where order does matter: AB ≠ BA. For 5 items choosing 2: C(5,2) = 10 combinations vs P(5,2) = 20 permutations. The ratio is always k! — for k=2 that's 2, for k=3 it's 6. Use combinations for selecting a subset; permutations for ranking or ordering.
What are the Powerball odds and how are they calculated?
Powerball: pick 5 white balls from 69, plus 1 red Powerball from 26. Jackpot combinations = C(69,5) × 26 = 11,238,513 × 26 = 292,201,338. Jackpot odds: 1 in 292,201,338 (≈ 0.00000034%). Match 5 white balls only (no Powerball): 1 in 11,688,053.52. Match 4+PB: 1 in 913,129.
How do I calculate n choose k for large numbers without overflow?
Use the multiplicative form: C(n,k) = n × (n−1) × ... × (n−k+1) / k!. Compute iteratively: start with result=1, for j from 0 to k−1: result = result × (n−j) / (j+1). This avoids large intermediate values. Example: C(100,3) = (100×99×98)/(3×2×1) = 970,200/6 = 161,700. Also apply symmetry: C(n,k) = C(n,n−k) — always compute using the smaller of k and n−k.
What is Pascal's triangle and how does it relate to C(n,k)?
Pascal's triangle is a number arrangement where each entry equals the sum of the two above it. Every entry in row n, position k is exactly C(n,k). The construction rule C(n,k) = C(n−1,k−1) + C(n−1,k) is called Pascal's identity. Row n sums to 2ⁿ: for n=4, C(4,0)+C(4,1)+C(4,2)+C(4,3)+C(4,4) = 1+4+6+4+1 = 16 = 2⁴.
How many possible poker hands are there for each hand type?
Total 5-card hands from a 52-card deck: C(52,5) = 2,598,960. Royal flush: 4 (1 in 649,740). Straight flush: 36 (1 in 72,193). Four of a kind: 624 (1 in 4,165). Full house: 3,744 (1 in 694). Flush: 5,108 (1 in 509). Straight: 10,200 (1 in 255). Three of a kind: 54,912. Two pair: 123,552. One pair: 1,098,240. High card: 1,302,540.
How are combinations used in the binomial theorem?
The binomial theorem states (a+b)^n = Σ C(n,k) × a^(n−k) × b^k for k from 0 to n. The C(n,k) values are the binomial coefficients — the weights of each term. Example: (x+y)^4 = x⁴ + 4x³y + 6x²y² + 4xy³ + y⁴, where coefficients 1,4,6,4,1 are C(4,0) through C(4,4) — row 4 of Pascal's triangle.
What are combinations with repetition and when do I use them?
When the same item can be chosen multiple times, use CR(n,k) = C(n+k−1, k). Example: choosing 3 ice cream flavors from 5 with repetition allowed = C(7,3) = 35. Without repetition it would be C(5,3) = 10. Use with repetition for distributing identical objects into distinct boxes, or any selection where items can repeat.
How does C(n,k) appear in the binomial probability distribution?
In the binomial distribution, C(n,k) counts the number of sequences with exactly k successes in n independent trials: P(X=k) = C(n,k) × p^k × (1−p)^(n−k). Example: probability of exactly 3 heads in 5 fair coin flips = C(5,3) × 0.5³ × 0.5² = 10 × 0.125 × 0.25 = 31.25%.
How many ways can you choose 3 people from a group of 10 for a committee?
C(10,3) = (10×9×8)/(3×2×1) = 720/6 = 120 committees. If instead you were assigning roles (president, secretary, treasurer) where order matters, it becomes a permutation: P(10,3) = 10×9×8 = 720 arrangements. The ratio 720/120 = 6 = 3! confirms P(n,k) = k! × C(n,k).