What Is a Combination (nCr)? Formula & Binomial Coefficient Meaning
In mathematics and combinatorics, a combination counts the total number of distinct unordered subsets of size r you can draw from a larger pool of n distinct objects. Because selection order is ignored, choosing athletes {Alice, Bob, Carol} to serve on an equal three-person committee counts as the exact same single outcome regardless of who gets picked first, second, or third.
Mirror Symmetry Property: C(n, r) = C(n, n − r)
With Repetition (Stars & Bars): C_rep(n, r) = C(n + r − 1, r)
Two-Pool / Hypergeometric Intersection: Joint = C(n₁, r₁) × C(n₂, r₂)
In formal notation, combinations are universally written as the binomial coefficient (n choose r) or calculator notation nCr because those exact numbers appear as the coefficients in expanding (x + y)^n. Using arbitrary-precision BigInt integer math, our Combination Calculator computes exact counts cleanly for huge pools such as 5-card poker decks (C(52, 5) = 2,598,960), national lotteries (C(49, 6) = 13,983,816), or high-order binomial trials up to n = 2,000 without floating-point overflow.
Why C(n, r) Equals P(n, r) ÷ r! & Mirror Symmetry C(n, r) = C(n, n − r)
To understand the combination formula intuitively, begin with ordered permutations P(n, r) = n × (n − 1) × ... × (n − r + 1). For any fixed trio {A, B, C}, listing all possible orders creates 3! = 6 separate arrangements (ABC, ACB, BAC, BCA, CAB, CBA). Every unique team of size r is overcounted exactly r! times inside P(n, r)! Dividing P(n, r) by r! removes that internal ordering redundancy and gives the exact unordered count C(n, r).
Furthermore, choosing r items to include inside your basket simultaneously specifies the exact n − r items to leave behind. That duality yields one of the cleanest shortcuts in combinatorics: C(n, r) = C(n, n − r). Notice how evaluating C(100, 98) by hand becomes effortless once flipped to C(100, 2) = (100 × 99) ÷ 2 = 4,950!
| Common Scenario | Expression | Exact Count | Ordered Count P(n, r) |
Single-Pick Odds |
|---|---|---|---|---|
| 3-Person Committee From 10 | C(10, 3) | 120 | 720 | 1 in 120 (0.833%) |
| Standard 5-Card Poker Hand | C(52, 5) | 2,598,960 | 311,875,200 | 1 in 2,598,960 |
| 13-Card Bridge Hand | C(52, 13) | 635,013,559,600 | 3.954 × 10^21 | ~1.57 × 10^-12 |
| Classic 6/49 Lottery Jackpot | C(49, 6) | 13,983,816 | 10,068,347,520 | 1 in 13.98M |
Combinations With Repetition: The Stars & Bars Theorem
What happens when you pick r items without caring about order, and you are allowed to pick the same category multiple times? Suppose an ice-cream shop carries n = 4 flavors (Vanilla, Chocolate, Strawberry, Mint) and you order a r = 3 scoop cup. Neither order nor flavor uniqueness applies here: three scoops of Chocolate equals one valid combination!
Using Mode 2 (With Repetition: Stars & Bars), we model every possible multiset order using r stars (* representing the scoops chosen) separated by n − 1 vertical divider bars (| separating the n flavor bins). That produces a string of exactly n + r − 1 total slots. Choosing which r slots hold stars immediately locks in all n bin counts, proving the classic theorem:
Pascal's Triangle, Power Sets (2^n) & Cumulative Subsets
Every row of Pascal's Triangle lists all combinations C(n, 0), C(n, 1), ..., C(n, n) horizontally. Each interior entry equals the sum of the two entries directly above it, capturing Pascal's recursion identity C(n, r) = C(n − 1, r − 1) + C(n − 1, r). Crucially, summing an entire row always equals 2^n (the total size of the Power Set), because every single one of the n elements can independently either stay in or stay out of a subset!
In real engineering, audit sampling, and hypothesis testing, you often want "at most r" (k <= r) or "at least r" (k >= r) combinations rather than just exact k = r. Mode 3 (Cumulative Row) evaluates exact partial sums across Pascal's row cleanly up to n = 300 alongside exact percentages of the full 2^n subset space.
Multi-Pool Selection & Hypergeometric Sampling (C(n₁, r₁) × C(n₂, r₂))
Many committee, card-game, and defect-inspection questions pull items from two separate pools at once. If a department has n₁ = 8 engineers and n₂ = 6 designers and must form a 5-person task force containing exactly r₁ = 3 engineers and r₂ = 2 designers, the Fundamental Counting Principle multiplies the two independent choices cleanly: C(8, 3) × C(6, 2) = 56 × 15 = 840 valid committees.
Better yet, dividing that joint count 840 by all unrestricted 5-person groups C(8 + 6, 3 + 2) = C(14, 5) = 2,002 computes the exact Hypergeometric Probability (sampling without replacement from a finite binary pool): 840 ÷ 2,002 = 41.958%! Using Mode 4 handles lottery secondary-prize odds ("match 4 of 6 winning numbers and 2 of 43 non-winning numbers") in one calculation.
2 Worked Examples
Example 1: Standard 5-Card Poker Hand vs. Stars & Bars Ice Cream
Part A (5-Card Poker Hand in Mode 1): How many distinct 5-card hands can be dealt from a standard 52-card deck (n = 52, r = 5)?
- Write the binomial formula:
C(52, 5) = 52! ÷ (5! × 47!). - Cancel
47!in numerator and denominator: Numerator leaves52 × 51 × 50 × 49 × 48 = 311,875,200ordered 5-card sequences (P(52, 5)). - Divide by hand-order permutations
5! = 120:311,875,200 ÷ 120 = 2,598,960distinct poker hands! Any single specific 5-card hand has probability1 ÷ 2,598,960 ≈ 0.0000385%.
Part B (Ice Cream Repeats in Mode 2): Choose r = 3 scoops from n = 4 flavors with duplicates allowed. Stars & Bars gives n + r − 1 = 4 + 3 − 1 = 6 positions, so C(6, 3) = (6 × 5 × 4) ÷ 6 = 20 unordered cups (5 times larger than no-repeat C(4, 3) = 4).
Example 2: Cross-Functional Team Split & Cumulative Risk Committees
Part A (Two-Pool Hypergeometric Split in Mode 4): An R&D lab employs 8 engineers and 6 designers (14 total staff) and selects a 5-member launch team at random. What are the exact combinations and chance of landing 3 engineers and 2 designers?
- Engineer combinations:
C(8, 3) = (8 × 7 × 6) ÷ 6 = 56ways. - Designer combinations:
C(6, 2) = (6 × 5) ÷ 2 = 15ways. - Multiply joint committees:
56 × 15 = 840valid split teams. - Compare to unrestricted space: Total 5-person teams equal
C(14, 5) = 2,002, yielding exact Hypergeometric probability840 ÷ 2,002 = 41.958%.
Part B (Cumulative Subsets in Mode 3): Out of 10 server modules (2^10 = 1,024 total subsets including empty), how many subsets activate at least 3 modules? Summing k < 3 gives C(10,0) + C(10,1) + C(10,2) = 1 + 10 + 45 = 56, so subtracting from 1,024 immediately yields 968 active sets (94.53% of all possible configurations).
Combination Formulas in Excel, Google Sheets & Python
Compute exact binomial coefficients, repetition combinations, and hypergeometric odds in Excel, Sheets, or Python:
Excel / Sheets With Repetition: =COMBINA(n, r)
Excel / Sheets Hypergeometric Prob: =HYPGEOM.DIST(r1, r1+r2, n1, n1+n2, FALSE)
Python 3.8+ Exact Integer nCr: math.comb(n, r)
Python Stars & Bars (With Repeat): math.comb(n + r - 1, r)
5 Common Combination Mistakes to Avoid
- Using
nCrWhen Order Actually Counts: Podium medals, lock codes, and batting orders requirenPrpermutations, whereas committees, lottery tickets, and card hands requirenCr. - Using
C(n, r)Instead ofC(n + r − 1, r)for Repeated Categories: Buying 5 donuts from 3 flavors allows duplicate choices (Stars & Bars =C(7, 5) = 21), whereas standardC(3, 5)would wrongly evaluate to0! - Miswriting
C(n + r − 1, r)asC(n + r − 1, n): Remember there aren − 1divider bars, notnbars; therefore the two valid mirror forms areC(n + r − 1, r)andC(n + r − 1, n − 1). - Computing Full Factorials on Large Inputs: Expanding
52!and47!first creates huge intermediate numbers; canceling the larger tail factorial first leaves just5factors (52×51×50×49×48). - Forgetting Empty Subset
C(n, 0) = 1in Subset Sums: When checking how many non-empty groups exist fromnitems, subtract1from the power set (2^n − 1) unless choosing zero items is permitted.
Related Combinatorics & Probability Tools
Explore counting symmetries and statistical testing inside our Math & Statistics hub:
- Permutation Calculator (nPr): compute ordered arrangements, repetition powers
n^r, word anagrams, and circular rings. - Probability Calculator: solve exact Binomial distributions (which multiply
C(n, k)byp^k q^(n-k)), Bayes' Theorem, and event unions. - Sample Size Calculator & Confidence Interval Calculator: size surveys and bound proportions after sampling.
- Z-Score Calculator: check Normal approximations to Binomial trials when
np >= 10.
Inspect our BigInt mathematical accuracy standards inside the Editorial & Mathematical Accuracy Policy.
Frequently Asked Questions
What is the formula for combinations nCr?
C(n, r) = n! / [r! * (n - r)!]. Equivalently, divide ordered permutations P(n, r) by r! to remove order redundancy across each subset.
How do you remember when to use nCr vs nPr?
Ask whether rearranging your selected items creates a new outcome. If yes (passwords, race rankings, captain vs co-captain), use Permutations nPr. If rearranging makes no difference (committees, lottery numbers, poker hands), use Combinations nCr.
What is the formula for combinations with repetition (Stars and Bars)?
When choosing r items from n categories with repeats allowed and no order, use C(n + r - 1, r). The formula models r chosen items as stars separated by n - 1 divider bars.
Why does C(n, r) always equal C(n, n - r)?
Selecting r items to include in a group automatically leaves behind a unique complementary set of n - r excluded items. Therefore the count of size-r subsets equals the count of size-(n - r) subsets.
What is the total number of subsets of a set with n elements?
Summing C(n, k) across all k from 0 to n yields the power set count 2^n. If you exclude the empty set (0 items chosen), non-empty combinations sum to 2^n - 1.
How do you calculate two-group committee combinations like 3 from 8 and 2 from 6?
Calculate each subgroup separately and multiply: C(8, 3) * C(6, 2) = 56 * 15 = 840. Dividing 840 by unrestricted C(14, 5) = 2,002 yields the exact Hypergeometric probability of 41.96%.
Mathematical References & Standards
- Wikipedia: Combination: Unordered Subsets, Repetition & Counting Identities (Core definition of nCr, symmetry identities, and poker/lottery combinations)
- Wikipedia: Binomial Coefficient: Recursive Properties, Bounds & Series (Formal properties of C(n, k) including row sums summing to 2^n)
- Wikipedia: Pascal's Triangle: Additive Construction & Identities (Derivation of Pascal's rule C(n, r) = C(n-1, r-1) + C(n-1, r))
- Wikipedia: Stars and Bars (Combinatorics): Multisets & Integer Compositions (Proof of C(n + r - 1, r) for unordered selections with replacement)
- Wikipedia: Hypergeometric Distribution: Multi-Pool Without-Replacement Sampling (Exact finite-population probability formula C(K, k) * C(N-K, n-k) / C(N, n))