Combinations (nCr)
Count the number of unordered selections of r items from a set of n distinct items. Order does not matter, so the set {A, B, C} is the same selection as {C, B, A}. Also called the binomial coefficient and read as 'n choose r'.
C(n, r) = n! / (r! × (n − r)!)
Permutations (nPr)
Count the number of ordered arrangements of r items from a set of n distinct items. Order matters, so (A, B, C) and (C, B, A) are different permutations. P(n, r) is always at least as large as C(n, r) because each combination corresponds to r! permutations.
P(n, r) = n! / (n − r)!
How It Works
Combinations and permutations both count ways to pick r items from a set of n distinct items, but they differ on whether order matters. Combinations (nCr) count unordered selections — {A, B} and {B, A} count once. Permutations (nPr) count ordered arrangements — (A, B) and (B, A) are separate. The two are linked by P(n, r) = C(n, r) × r!, because every unordered selection of r items can be arranged in r! distinct orders. Both functions require r ≤ n and assume the n items are distinct and selected without replacement.
Example Problem
From a group of 10 people, how many ways can you (a) form a 3-person committee and (b) award gold, silver, and bronze medals?
- Identify n and r: there are n = 10 people and r = 3 positions to fill.
- Decide whether order matters. A committee is unordered (combinations); medal positions are ordered (permutations).
- Apply the permutations formula for the medal case: P(10, 3) = 10! / (10 − 3)! = 10 × 9 × 8.
- Multiply the descending product: 10 × 9 = 90, then 90 × 8 = 720, so P(10, 3) = 720 medal arrangements.
- Apply the combinations formula for the committee: C(10, 3) = P(10, 3) / 3! = 720 / (3 × 2 × 1) = 720 / 6.
- Divide to finish: 720 / 6 = 120, so C(10, 3) = 120 distinct 3-person committees.
Therefore there are 120 committees but 720 medal arrangements — exactly 6 times more, because each committee can be ordered in 3! = 6 ways.
Key Concepts
The distinction between nPr and nCr is exactly the factor of r!. Permutations count ordered arrangements (n! / (n − r)!), combinations count unordered selections (n! / (r! × (n − r)!)), and dividing nPr by r! collapses the r! orderings of each selection into one. Combinations are symmetric: C(n, r) = C(n, n − r), because choosing the r items to include is the same problem as choosing the n − r items to leave out. The numbers C(n, r) are exactly the entries of Pascal's triangle, where each entry is the sum of the two entries above it, reflecting the identity C(n, r) = C(n − 1, r − 1) + C(n − 1, r). Both functions assume the items are distinct and selected without replacement.
Applications
- Lottery odds: the odds of matching r winning numbers drawn from n possible numbers are 1 in C(n, r), since draw order does not matter
- Poker and card games: the number of distinct 5-card hands from a 52-card deck is C(52, 5) = 2,598,960
- Password strength: the number of r-character passwords drawn from an alphabet of n unique characters (no repeats) is P(n, r)
- Committee selection: choosing r people from a group of n for an unranked committee is C(n, r); awarding r ranked positions is P(n, r)
- Tournament scheduling: pairing r teams from a pool of n into a single round-robin or knockout bracket uses C(n, r) for pairings and P(n, r) for ordered seedings
- Binomial probability: the coefficient C(n, k) is the multiplier in the binomial distribution P(X = k) = C(n, k) × p^k × (1 − p)^(n − k)
Common Mistakes
- Using nPr when order does not matter (or nCr when it does) — always ask 'does swapping two items make a different outcome?' If yes, use permutations; if no, use combinations
- Off-by-one errors with inclusive vs. exclusive endpoints — nPr multiplies r consecutive integers ending at n, e.g. P(10, 3) = 10 × 9 × 8 (three factors), not 10 × 9 × 8 × 7
- Treating r > n as zero instead of an error — choosing more items than the set contains is undefined, not 'zero ways'. This calculator returns no result for r > n
- Forgetting that 0! = 1, which makes C(n, 0) = 1 and C(n, n) = 1 (there is exactly one way to choose nothing, and one way to choose everything)
- Confusing 'with replacement' counting (multisets) with the standard nCr / nPr, which assume each item is picked at most once
Frequently Asked Questions
What is the difference between a combination and a permutation?
Combinations count unordered selections — {A, B, C} is the same as {C, B, A} — while permutations count ordered arrangements — (A, B, C) and (C, B, A) are different. Permutations are always at least as large as combinations because each unordered selection of r items can be arranged in r! distinct orders.
How do you calculate nCr?
Use C(n, r) = n! / (r! × (n − r)!). For example, C(10, 3) = 10! / (3! × 7!) = 3,628,800 / (6 × 5,040) = 120. For efficiency, compute as nPr / r! to avoid building the full factorial: C(10, 3) = (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120.
How do you calculate nPr?
Use P(n, r) = n! / (n − r)!, which simplifies to the descending product of r terms ending at n. For example, P(10, 3) = 10 × 9 × 8 = 720. You can also read it as 'the number of ways to fill r ordered slots when you have n distinct choices for the first slot, n − 1 for the second, and so on.'
Is nCr the same as the binomial coefficient?
Yes. C(n, r) is exactly the binomial coefficient that appears in the binomial theorem and in Pascal's triangle. It is written as C(n, r), nCr, or the two-row notation with n above r in parentheses, and it counts the number of ways to choose r unordered items from n distinct items.
What does 'n choose r' mean?
'n choose r' is the spoken name for C(n, r) — the number of ways to choose r items from n distinct items without regard to order. It is the same value as the binomial coefficient and appears in combinatorics, probability, and algebra.
When do I use combinations vs. permutations?
Ask whether the order of the selected items matters in the outcome you are counting. If swapping two of the chosen items produces a different outcome (medal placements, password characters, ranked seedings), use permutations. If it produces the same outcome (committees, lottery picks, poker hands), use combinations.
Why is C(n, 0) equal to 1?
There is exactly one way to choose nothing from a set: pick no items. Algebraically, C(n, 0) = n! / (0! × n!) = 1 because 0! = 1 by definition. The same logic gives C(n, n) = 1 — there is exactly one way to choose every item.
Why is C(n, r) symmetric in r and n − r?
Choosing which r items to include in a selection is equivalent to choosing which n − r items to leave out. Both decisions describe the same partition of the set into a chosen group and an unchosen group, so the counts are identical: C(n, r) = C(n, n − r).
Reference: Standard combinatorics definitions of permutations and combinations, with n and r non-negative integers and r ≤ n. The canonical case C(10, 3) = 120 and P(10, 3) = 720 has been verified against Wolfram Alpha.
Combinations & Permutations Formulas
Both formulas count ways to pick r items from a set of n distinct items. The difference is whether the order of the picked items matters.
Where:
- n is the total number of distinct items
- r is the number of items to choose (with r ≤ n)
- n! is the factorial of n (n × (n − 1) × … × 1)
- C(n, r) counts unordered selections (combinations)
- P(n, r) counts ordered arrangements (permutations)
The two are linked by P(n, r) = C(n, r) × r!, since each unordered selection can be arranged in r! distinct orders.
Choose 3 of 5 items — C(5, 3) = 10 unordered selections, P(5, 3) = 60 ordered arrangements.
Worked Examples
Committee Selection
How many 3-person committees can be formed from 10 people?
Order does not matter for a committee, so this is a combinations problem.
- C(10, 3) = 10! / (3! × 7!)
- Cancel the 7! to leave C(10, 3) = (10 × 9 × 8) / (3 × 2 × 1)
- Numerator: 10 × 9 × 8 = 720
- Denominator: 3 × 2 × 1 = 6
- Divide: 720 / 6 = 120
C(10, 3) = 120 distinct committees
Medal Arrangements
How many ways can 3 medals (gold, silver, bronze) be awarded to 10 finalists?
Each medal is distinct, so order matters — use permutations.
- P(10, 3) = 10! / 7!
- Cancel the 7! to leave P(10, 3) = 10 × 9 × 8
- Multiply left to right: 10 × 9 = 90
- Then 90 × 8 = 720
P(10, 3) = 720 medal arrangements
Card Games
How many 5-card poker hands are there in a 52-card deck?
A poker hand is unordered — the deal sequence does not change which hand you hold.
- C(52, 5) = 52! / (5! × 47!)
- Cancel the 47!: C(52, 5) = (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1)
- Numerator: 52 × 51 × 50 × 49 × 48 = 311,875,200
- Denominator: 5! = 120
- Divide: 311,875,200 / 120 = 2,598,960
C(52, 5) = 2,598,960 distinct poker hands
Related Calculators
- Factorial Calculator — compute n! for any non-negative integer up to 170
- Statistics Calculator — calculate mean, median, standard deviation, and more
- Quadratic Equation Calculator — solve ax² + bx + c = 0 for real and complex roots
- Logarithm Calculator — compute logarithms for any base
- Z-Score Probability Calculator — convert z-scores to probabilities and percentiles
- Percent Error Calculator — calculate measurement accuracy and percent error
Related Sites
- CameraDOF — Depth of field calculator for photographers
- Percent Off Calculator — Discount and sale price calculator
- Hourly Salaries — Hourly wage to annual salary converter
- InfantChart — Baby and child growth percentile charts
- Dollars Per Hour — Weekly paycheck calculator with overtime
- BOGO Discount — Buy-one-get-one discount calculator