Combinations Calculator
Combinations Calculator. Free online calculator with formula, examples and step-by-step guide.
Combinations Calculator: Count Possibilities with nCr and nPr
The Combinations calculator computes combinations (nCr), permutations (nPr), and factorials for any positive integers. From calculating poker hand probabilities to analyzing lottery odds, from scheduling tournament matches to counting DNA sequence possibilities, combinatorics is the mathematics of counting without having to enumerate every option. This calculator makes it simple to find exactly how many ways you can select, arrange, or combine items.
Combinations and Permutations Formulas
Combinations: nCr = n! / (r! × (n − r)!)
Permutations: nPr = n! / (n − r)!
Factorial: n! = n × (n − 1) × (n − 2) × ... × 1
Where n is the total number of items, r is the number of items chosen or arranged, and ! represents the factorial function. The combination formula includes the r! denominator that removes ordering, while the permutation formula keeps ordering. By convention, 0! = 1, and nCr = 1 when r = 0 or r = n.
The relationship between combinations and permutations is intuitive: each combination of r items can be arranged in r! different ways. Therefore, nPr = nCr × r!. This means permutations are always larger than combinations for the same n and r (except when r = 0 or 1, where they are equal). The factorial function grows remarkably fast: 10! = 3,628,800 but 20! is already over 2.4 quintillion. This rapid growth is why factorials are used to count the astronomical number of possibilities in fields from cryptography to statistical mechanics.
Worked Examples
Example 1: Poker Hand Probability
How many different 5-card poker hands can be dealt from a standard 52-card deck? What is the probability of being dealt a royal flush?
Total 5-card hands (52C5): 52! / (5! × 47!) = (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1) = 311,875,200 / 120 = 2,598,960
There are exactly 4 possible royal flushes (one per suit). The probability is therefore 4 / 2,598,960 = 1 in 649,740, or approximately 0.000154%.
This means if you play 100 hands of poker per week, you would expect to see a royal flush roughly once every 125 years. The large number of combinations explains why poker is a game of probability and skill rather than pure luck.
Example 2: Committee Selection and Arrangement
A club has 12 members and needs to select a committee of 4 people. From those 4, one will be chair, one vice-chair, one secretary, and one treasurer. How many different committees are possible? How many different ways can the roles be assigned?
Different committees (combinations, order irrelevant): 12C4 = 12! / (4! × 8!) = (12 × 11 × 10 × 9) / (4 × 3 × 2 × 1) = 11,880 / 24 = 495
Different role assignments (permutations, order matters): 12P4 = 12! / 8! = 12 × 11 × 10 × 9 = 11,880
There are 495 possible committees, but 11,880 ways to assign the specific officer roles. The ratio 11,880 / 495 = 24 = 4!, confirming that each committee of 4 can have its roles arranged in 4! = 24 different ways. This distinction between combinations and permutations is crucial in probability calculations.
Common Uses
- Calculating probabilities in card games, dice games, and casino games for odds analysis
- Analyzing lottery odds and expected values for games like Powerball and Mega Millions
- Determining the number of possible test question subsets for exam design
- Counting possible outcomes in quality control sampling plans for manufacturing
- Computing binomial probabilities in statistics for success-failure experiments
- Solving optimization problems in scheduling, routing, and resource allocation
Common Mistakes
- Using combinations when order matters (should use permutations) — for passwords, rankings, and arrangements, permutations nPr is correct, not combinations nCr
- Confusing nCr with rCn — nCr is defined only for r less than or equal to n; rCn where r > n is zero because you cannot choose more items than available
- Treating identical items as distinct — the combination formula assumes all n items are distinguishable; if items are identical, different counting methods are required
- Forgetting that 0! = 1 — this convention is essential for the formulas to work correctly when r = 0 or r = n, giving nC0 = nCn = 1
Pro Tip
When calculating combinations mentally, use the "cancellation trick" to avoid huge numbers. Instead of computing 52! fully (a number with 68 digits), compute nCr as the product of r terms divided by r! using cancellation. For 52C5, calculate (52/1) x (51/2) x (50/3) x (49/4) x (48/5). Each step cancels the denominator into the numerator. After the first step you get 52; after the second, 52 x 51 / 2 = 1,326; after the third, 1,326 x 50 / 3 = 22,100; after the fourth, 22,100 x 49 / 4 = 270,725; and finally 270,725 x 48 / 5 = 2,598,960. This method works for any nCr and keeps intermediate numbers manageable, making it suitable for both mental math and programming without dealing with huge factorials.
Frequently Asked Questions
Combinations (nCr) count selections where order does NOT matter. Permutations (nPr) count selections where order matters. For example, choosing a committee uses combinations; arranging books on a shelf uses permutations.
nCr, read as 'n choose r,' is the number of unique subsets of size r from n distinct items. It is the binomial coefficient in (x + y)^n. For example, 52C5 = 2,598,960 represents the number of possible poker hands.
n! is the product of all integers up to n. nCr = n! / (r! x (n-r)!) uses factorials to count subsets by first counting permutations then dividing by the overcounting factor r!.
Poker probabilities, lottery analysis, committee selection, quality control sampling, DNA sequence analysis, tournament bracket design, and machine learning feature selection.