What Is a Combination?
A combination counts the number of ways you can select a group of items from a larger set when the order of selection does not matter. Choosing apples, bananas, and cherries is the same combination as choosing cherries, apples, and bananas. This is written as \(C(n, r)\), "n choose r", or the binomial coefficient. This calculator works for any whole numbers and applies universally — it is pure mathematics with no country-specific assumptions.
How to Use This Calculator
Enter the total number of available items as n and the number you want to choose as r. The tool returns the number of distinct combinations, and as a bonus the number of permutations \(P(n, r)\) where order does matter. If r is greater than n, the result is zero because you cannot choose more items than exist.
The Formula Explained
The combination formula is $$C(n, r) = \binom{n}{r} = \frac{n!}{r!\,(n - r)!}$$ where "!" denotes the factorial. The numerator \(n!\) counts all orderings of the full set, dividing by \((n - r)!\) removes the items you didn't pick, and dividing by \(r!\) removes the duplicate orderings of the items you did pick — leaving only unique groups. To avoid huge factorials, this calculator multiplies the ratio term-by-term for numerical stability.
Worked Example
How many 5-card poker hands come from a 52-card deck? Here \(n = 52\) and \(r = 5\). $$C(52, 5) = \frac{52!}{5!\,(47!)} = \frac{52\cdot51\cdot50\cdot49\cdot48}{5\cdot4\cdot3\cdot2\cdot1} = \frac{311{,}875{,}200}{120} = 2{,}598{,}960$$ possible hands.
FAQ
What's the difference between a combination and a permutation? A permutation counts ordered arrangements; a combination ignores order. Permutations are always greater than or equal to combinations.
What is \(C(n, 0)\)? It equals 1 — there is exactly one way to choose nothing (the empty set).
Why does \(C(n, r) = C(n, n - r)\)? Choosing which r items to include is equivalent to choosing which n − r items to leave out, so the counts match.