Combinations Calculator — Free nCr and Permutations
Calculate combinations (nCr) and permutations (nPr) for any n and r. Find how many ways items can be chosen or arranged, instantly and accurately.
Combinations Calculator (nCr)
Calculate the number of ways to choose items where order does not matter.
About this calculator
Combinations Calculator
Comprehensive Guide to Combinations Calculator
The Combinations Calculator computes the number of unique subsets that can be selected from a larger collection when the order of selection does not matter. Unlike permutations—where sequence and position define uniqueness (such as PIN codes or race podiums)—combinations treat identical groupings with different arrangements as identical. For example, selecting a committee consisting of Alice, Bob, and Charlie is the exact same combination as selecting Charlie, Alice, and Bob.
Expressed mathematically as $\binom{n}{r}$, $C(n, r)$, or $nCr$, combinations form the mathematical cornerstone of discrete probability, binomial distributions, statistical mechanics, genetic inheritance modeling, and card gaming theory.
How to Use the Combinations Calculator
- Enter Total Number of Items ($n$): Input the total pool size of distinct elements available for selection ($n \ge 0$).
- Enter Number of Items to Choose ($r$): Input the sample subset size to be selected ($0 \le r \le n$ for non-repetition).
- Select Repetition Mode: Choose whether elements can be chosen more than once (Without Repetition vs. With Repetition / Multichoose).
- Evaluate Results: Review the computed total combinations, factorial expansions, intermediate cancelation steps, and corresponding permutation counts ($nPr$).
- Inspect Binomial Properties: View the corresponding binomial coefficient in Pascal's Triangle and related probability statistics.
The Calculator Formulas
Combinatorial formulas evaluate selection counts under both non-repetition and repetition-allowed constraints:
1. Combinations Without Repetition (Standard nCr):
C(n, r) = (n choose r) = n! / [ r! × (n - r)! ]
Where:
- n! is the factorial of the total items (n × (n-1) × ... × 1)
- r! accounts for the r! redundant orderings of the chosen subset
- (n - r)! cancels unselected items
2. Combinations With Repetition (Multichoose / Stars & Bars):
C_rep(n, r) = ((n choose r)) = (n + r - 1)! / [ r! × (n - 1)! ] = C(n + r - 1, r)
3. Permutations Without Repetition (nPr - Order Matters):
P(n, r) = n! / (n - r)! = r! × C(n, r)
4. Permutations With Repetition:
P_rep(n, r) = n^r
5. Pascal's Symmetry Identity:
C(n, r) = C(n, n - r)
6. Pascal's Recursive Identity:
C(n, r) = C(n - 1, r - 1) + C(n - 1, r)
Practical Examples
Example 1: Selecting a Project Steering Committee
A company department with 12 senior engineers needs to form an executive project review board consisting of 4 members. Because all committee members hold equal status, the order of selection is irrelevant.
Parameters: n = 12, r = 4
Formula: C(12, 4) = 12! / [ 4! × (12 - 4)! ] = 12! / [ 4! × 8! ]
Step-by-Step Cancellation:
C(12, 4) = (12 × 11 × 10 × 9) / (4 × 3 × 2 × 1)
C(12, 4) = 11,880 / 24 = 495 distinct committees
Example 2: Multi-Flavor Donut Assortment (With Repetition)
A bakery offers 4 flavors of gourmet donuts (Glazed, Chocolate, Jelly, Maple). A customer purchases a box of 6 donuts, with duplicate flavors permitted.
Parameters: n = 4 flavors, r = 6 donuts selected (Repetition allowed)
Formula: C_rep(4, 6) = C(4 + 6 - 1, 6) = C(9, 6)
By Symmetry: C(9, 6) = C(9, 3) = (9 × 8 × 7) / (3 × 2 × 1)
Calculation: 504 / 6 = 84 distinct flavor assortments
Key Concepts & Essential Terminology
In discrete mathematics and probability theory, combinations quantify the total number of distinct ways to choose a subset of $r$ items from a larger pool of $n$ available items when the order of selection does not matter. Unlike permutations, where sequence and position distinguish outcomes (such as a lock PIN code or race podium finishes), combinations treat sets with identical members as equivalent: the hand ${A, K, Q}$ is the exact same combination as ${Q, A, K}$.
Mathematically designated as $inom{n}{r}$, $C(n, r)$, or $nCr$, combinations form the foundation of binomial expansion, hypergeometric distributions, statistical mechanics, cryptography, genetic lottery dynamics, and card gaming theory.
Fundamental Combinatorial Decision Matrix
| Combinatorial Operation | Order Significant? | Repetition Allowed? | Exact Algebraic Formula | Typical Problem Domain | Real-World Worked Benchmark |
|---|---|---|---|---|---|
| Combinations Without Repetition ($nCr$) | No | No | $inom{n}{r} = rac{n!}{r!(n-r)!}$ | Committee selection, lottery tickets, card games, medical clinical cohorts | Choosing 5 lottery numbers out of 69: $inom{69}{5} = 11,238,513$ |
| Combinations With Repetition (Multichoose) | No | Yes | $left(!inom{n}{r}! | ||
| ight) = inom{n+r-1}{r} = rac{(n+r-1)!}{r!(n-1)!}$ | Purchasing an assortment of $r$ donuts from $n$ flavor bins, particle distributions | Picking 6 donuts from 4 flavors: $inom{4+6-1}{6} = inom{9}{6} = 84$ | |||
| Permutations Without Repetition ($nPr$) | Yes | No | $P(n, r) = rac{n!}{(n-r)!}$ | Race finishes (1st, 2nd, 3rd), officer elections (President, VP, Sec), anagrams | 8 sprinters finishing in Gold, Silver, Bronze: $P(8, 3) = rac{8!}{5!} = 336$ |
| Permutations With Repetition | Yes | Yes | $n^r$ | Computer passwords, phone numbers, bicycle padlocks, license plates | 4-digit numeric ATM PIN using digits 0–9: $10^4 = 10,000$ combinations |
Probability Benchmarks & Card Gaming Combinatorics
| Hand / Event Designation | Total Combinations Formula | Exact Number of Possible Ways | Mathematical Probability | Odds Against Occurrence |
|---|---|---|---|---|
| Total 5-Card Poker Hands | $inom{52}{5}$ | $2,598,960$ | $1.000000$ | $1 ext{ in }1$ (Base Pool) |
| Royal Flush | $4 imes inom{5}{5}$ | $4$ | $0.000001539$ | $649,739 ext{ to }1$ |
| Straight Flush (Excl. Royal) | $4 imes 9$ | $36$ | $0.000013852$ | $72,192 ext{ to }1$ |
| Four of a Kind | $13 imes inom{4}{4} imes inom{48}{1}$ | $624$ | $0.000240096$ | $4,164 ext{ to }1$ |
| Full House (3 of kind + pair) | $13 imes inom{4}{3} imes 12 imes inom{4}{2}$ | $3,744$ | $0.001440576$ | $693.2 ext{ to }1$ |
| Flush (Excl. Straight/Royal) | $inom{4}{1} imes inom{13}{5} - 40$ | $5,108$ | $0.001965402$ | $507.8 ext{ to }1$ |
| Straight (Excl. Straight/Royal) | $10 imes 4^5 - 40$ | $10,200$ | $0.003924647$ | $253.8 ext{ to }1$ |
| Total 13-Card Bridge Hands | $inom{52}{13}$ | $635,013,559,600$ | $1.000000$ | $1 ext{ in }1$ (Base Pool) |
| U.S. Powerball Jackpot | $inom{69}{5} imes inom{26}{1}$ | $292,201,338$ | $0.00000000342$ | $292,201,338 ext{ to }1$ |
| Mega Millions Jackpot | $inom{70}{5} imes inom{25}{1}$ | $302,575,350$ | $0.00000000330$ | $302,575,350 ext{ to }1$ |
Mathematical Axioms & Computational Properties
- Pascal's Identity & Symmetry Axiom: Combinations exhibit perfect bilateral symmetry:
C(n, r) = C(n, n - r)
Selecting $r$ items to include in a group is mathematically equivalent to selecting $n - r$ items to exclude. For example, $inom{100}{98} = inom{100}{2} = rac{100 imes 99}{2} = 4,950$. Furthermore, Pascal's triangle recursive addition identity states:
C(n, r) = C(n - 1, r - 1) + C(n - 1, r)
- Combinatorial Explosion (Factorial Growth): The rate at which combinations scale exceeds polynomial and exponential curves. Selecting 5 elements from 50 yields $2,118,760$ combinations. Increasing the subset to 10 elements explodes the combinations to $10,272,278,170$ ($+484,700%$).
- Cancellation Algorithm in Computation: Naively evaluating $inom{n}{r}$ by computing $n!$ directly triggers 64-bit integer overflow at $n ge 21$. Robust numerical calculators simplify the product sequentially:
C(n, r) = ∏_{i=1}^r (n - r + i) / i
How Combinations Calculation Works
Combinatorics analyzes discrete selections by establishing mathematical mappings between sets, factorial arrangements, and algebraic polynomial expansions:
1. Removing Permutation Redundancy
To derive the combinations formula, start with permutations ($nPr$), which selects $r$ items where order matters:
P(n, r) = n × (n - 1) × ... × (n - r + 1) = n! / (n - r)!
Because any specific group of $r$ distinct items can be arranged in exactly $r!$ distinct sequential permutations, dividing $P(n, r)$ by $r!$ eliminates order sensitivity:
C(n, r) = P(n, r) / r! = n! / [ r! × (n - r)! ]
2. Stars and Bars Proof for Repetition
To calculate combinations when repetition is allowed, imagine distributing $r$ indistinguishable stars (items chosen) across $n$ distinct bins (categories). The bins are separated by $n - 1$ bars. The total number of symbols is $r + (n - 1)$. Choosing the positions for the $r$ stars among the $r + n - 1$ total positions yields:
C_rep(n, r) = (n + r - 1 choose r) = (n + r - 1)! / [ r! × (n - 1)! ]
3. The Binomial Theorem Connection
Combinations are fundamentally known as binomial coefficients because they represent the algebraic coefficients in the expansion of $(x + y)^n$:
(x + y)ⁿ = Σ_{k=0}ⁿ C(n, k) × x^(n - k) × y^k
Row $n$ of Pascal's Triangle corresponds directly to the sequence of combinations $inom{n}{0}, inom{n}{1}, dots, inom{n}{n}$, whose sum always equals $2^n$ (the total number of subsets in the power set of an $n$-element set).
Common Combinations Calculator Mistakes to Avoid
- Confusing Combinations with Permutations: Using combinations when the order of elements changes the outcome (such as locker combinations, race placements, or officer roles).
- Direct Factorial Overflow in Software: Computing $inom{30}{5}$ by calculating $30!$ first, which exceeds the maximum limits of standard 64-bit integers and causes calculation crashes.
- Misapplying Repetition Rules: Using the standard $nCr$ formula when items can be selected repeatedly, which undercounts the true total space.
- Entering $r > n$ in Standard Combinations: Attempting to choose more items than exist in the pool without enabling repetition, which is mathematically impossible and yields 0.
- Ignoring Indistinguishable Duplicates: Treating non-unique items as distinct elements (e.g., anagram permutations of words with duplicate letters like "BOOK"), which requires dividing by the duplicate item factorials.
Frequently Asked Questions
What is the difference between a combination and a permutation?
In a combination, order does not matter (the set {1, 2, 3} is identical to {3, 2, 1}). In a permutation, order matters (123 is a different arrangement than 321). Combinations produce fewer outcomes than permutations for the same n and r.
Why is a bicycle 'combination lock' technically misnamed?
A bicycle or padlock combination lock is mathematically a permutation lock, because the sequence of numbers matters (e.g., entering 4-8-2 will not unlock a lock set to 2-4-8).
What does C(n, 0) and C(n, n) equal?
Both C(n, 0) and C(n, n) always equal 1. There is exactly one way to choose 0 items from a set (the empty set), and exactly one way to choose all n items.
How are combinations used in lottery odds?
Lotteries select r numbers from a pool of n numbers where drawing order does not matter. The total possible ticket combinations are calculated as C(n, r). For Powerball, choosing 5 from 69 gives C(69, 5) = 11,238,513 combinations, multiplied by 26 Powerball numbers to give 292,201,338 to 1 odds.
What is the relationship between Pascal's Triangle and combinations?
Every entry in Pascal's Triangle is a combination value. Row n and column r corresponds exactly to C(n, r). This geometric arrangement also proves that C(n, r) = C(n, n-r) due to bilateral symmetry.
What is combinations with repetition (multichoose)?
Combinations with repetition allows you to select items from n categories where elements can be picked multiple times. The formula is C(n + r - 1, r), proven via the mathematical stars and bars method.
Conclusion
The Combinations Calculator simplifies complex combinatorial counting, enabling rapid evaluation of subset possibilities for statistical analysis, lottery modeling, and algorithmic design. By understanding order sensitivity and repetition rules, users can solve discrete mathematical challenges with confidence.
Related Calculators
Sources & References
Technical & General Calculation Disclaimer
This calculation tool applies standard mathematical, scientific, or engineering formulas. While designed for precision, output values are estimates and should be independently verified for commercial, structural, or safety-critical applications.
Comments
Loading comments…
Related Math Calculators
Explore more tools to continue your analysis
Permutations Calculator
Calculate nPr permutations (order important).
Factorial Calculator
Calculate the factorial of a number.
Random Number Generator
Generate a random number within a range.
Standard Deviation Calculator
Calculate SD and variance for a dataset.
Confidence Interval Calculator
Compute confidence intervals for sample means.
Sample Size Calculator
Determine required sample size for surveys.
Average Calculator
Calculate the average of a set of numbers.
Percentage Calculator
Calculate percentages, increases, and discounts.