Combination Calculator
Calculate C(n,r) — the number of ways to choose r items from a set of n when order doesn't matter.
Combination Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser — no data is sent to any server.
Formula: C(n,r) = n! / (r!(n-r)!)
Worked example — C(12,4) = 495 possible committees
Formula
C(n,r) = n! / (r!(n-r)!)
Combinations count the number of unordered subsets of size r that can be selected from a set of n distinct items. It equals the number of ordered arrangements P(n,r) = n!/(n-r)! divided by r! to remove duplicate orderings of the same group.
Worked Examples
Example 1: Choosing a committee
Problem:How many ways can a 4-person committee be formed from a group of 12 people?
Solution:C(12,4) = 12! / (4! × 8!) = (12×11×10×9) / (4×3×2×1) = 11,880 / 24 = 495.
Result:C(12,4) = 495 possible committees
Example 2: Poker hand probability setup
Problem:How many different 5-card hands can be dealt from a standard 52-card deck?
Solution:C(52,5) = 52! / (5! × 47!) = (52×51×50×49×48) / 120 = 311,875,200 / 120 = 2,598,960.
Result:C(52,5) = 2,598,960 possible hands
Frequently Asked Questions
What is a combination in mathematics?
A combination is a selection of r items from a larger set of n items where the order of selection does not matter. C(n,r), read 'n choose r', counts how many distinct unordered subsets of size r can be formed from n items. Choosing {A, B, C} is the same combination as choosing {C, B, A} — the group is identical either way.
What is the difference between a combination and a permutation?
A combination ignores order (choosing 3 pizza toppings from 10 — the order you name them doesn't create a different topping set), while a permutation counts order as significant (assigning 1st, 2nd, and 3rd place medals from 10 racers — the same 3 people in a different order is a different outcome). Because permutations count every ordering separately, P(n,r) is always C(n,r) × r! — larger than the corresponding combination whenever r > 1.
How is the combination formula derived?
Start with the number of ordered arrangements of r items from n, which is P(n,r) = n!/(n-r)!. Since each unordered group of r items can be arranged in r! different orders, dividing by r! removes the duplicate orderings: C(n,r) = n! / (r! × (n-r)!). This division is exactly why the combination count is always smaller than or equal to the permutation count.
Why is C(n,r) always equal to C(n, n-r)?
Choosing r items to include from a set of n is mathematically the same as choosing n-r items to leave out — every selection of r items to keep uniquely corresponds to a selection of n-r items to exclude. This symmetry, C(n,r) = C(n,n-r), is why Pascal's Triangle is symmetric left-to-right, and it lets you compute C(20,18) just as easily as C(20,2) by using the smaller of r and n-r.
What real-world problems use combinations?
Combinations are used to calculate lottery odds (choosing 6 numbers from 49 with order irrelevant), poker hand probabilities (choosing 5 cards from a 52-card deck), committee formation (selecting 4 people from a department of 15 with no distinct roles), and quality-control sampling (choosing which 10 units from a batch of 200 to inspect).
How large can n get before factorials become impractical to compute directly?
Factorials grow extremely fast — 20! is already over 2.4 quintillion, and 170! exceeds the range of standard double-precision floating point. In practice, combination calculators avoid computing the full factorials separately and instead cancel common terms in the numerator and denominator (or use logarithms) to keep intermediate values manageable even for large n and r.
What does C(n,0) and C(n,n) equal, and why?
C(n,0) = 1 and C(n,n) = 1 for any n. There is exactly one way to choose zero items (choose nothing) and exactly one way to choose all n items (choose everything) — both are degenerate but valid combinations, and both appear as the first and last entries of every row of Pascal's Triangle.
How is C(n,r) connected to Pascal's Triangle and the binomial theorem?
Every entry in Pascal's Triangle is a combination value — the r-th entry (from 0) in row n equals C(n,r). These same values are the coefficients in the binomial expansion of (x+y)ⁿ, which is why C(n,r) is also called a binomial coefficient. This connects combinatorics directly to algebra: expanding (x+y)⁵ produces the coefficients 1, 5, 10, 10, 5, 1 — exactly row 5 of Pascal's Triangle.
What is the difference between combinations with and without repetition?
The standard C(n,r) = n!/(r!(n−r)!) assumes each item can be chosen at most once, as when dealing cards from a deck. If items may be reused — scooping 3 ice cream flavours from 5 and allowing repeats — you instead count multisets with C(n+r−1, r). For n = 5 and r = 3 that gives C(7,3) = 35 rather than the 10 unrepeated selections.
How do you turn a combination count into a probability?
When every unordered selection is equally likely, the combination count is the size of the sample space, so probability = favourable combinations ÷ total combinations. A random 5-card hand can be any of C(52,5) = 2,598,960 hands; the hands made entirely of hearts number C(13,5) = 1,287, giving 1,287/2,598,960 ≈ 0.000495, or about one hand in 2,020. Selections split across two groups like this follow the hypergeometric distribution, which multiplies one combination from each pool.
References
Reviewed for accuracy by Manoj Kumar, Mathematics Educator · Editorial policy
Related Calculators
🧮Linear Combination Calculator
Calculate linear combination with inputs, formulas, and instant results.
🧮Annulus Area Calculator
Calculate annulus area with inputs, formulas, and instant results.
🧮Area Calculator
Calculate area with inputs, formulas, and instant results.
🧮Area of a Rectangle Calculator
Calculate the area, perimeter, and diagonal of a rectangle. Find missing sides from known area. Convert between metric and imperial area units.
🧮Area of Crescent Calculator
Calculate area of crescent with inputs, formulas, and instant results.
🧮Center of Mass Calculator
Calculate center of mass with inputs, formulas, and instant results.
🧮Centroid Calculator
Calculate centroid with inputs, formulas, and instant results.
🧮Chord Length Calculator
Calculate chord length with inputs, formulas, and instant results.