Calculate combinations C(n, r): the number of ways to choose r items from n when order does not matter. Covers n up to 20.
Inputs
Combinations (nCr)
C(n,\, r) = \binom{n}{r}
nr
Results
Number of unordered ways to choose r items from n: n! / (r!·(n − r)!).
C(n, j)0
Definition
A combination counts the number of ways to choose items from a set of distinct items when the order of selection does not matter. Choosing {A, B} is the same outcome as {B, A}.
The formula is:
C(n,r)=(rn)=r!(n−r)!n!
This is also called the binomial coefficient and read as " choose ."
Worked example
How many 5-card hands can be dealt from a standard 52-card deck?
C(52,5)=5!47!52!=2,598,960
Nearly 2.6 million distinct hands from just 52 cards. The calculator above handles , but the formula itself extends to any .
3 medalists (gold / silver / bronze) from 10 athletes
$P(10, 3)$
Different medals → different outcomes
6-number lottery from 1–49
$C(49, 6)$
Only which numbers, not drawn order
6-digit PIN, no repeated digit
$P(10, 6)$
Sequence determines the PIN
The relationship: . A combination is a permutation with the orderings of the selected group divided out.
Symmetry property
C(n,r)=C(n,n−r)
Choosing 3 items from 10 is equivalent to choosing which 7 items to leave out. This symmetry is useful for reducing computation: if $r > n/2$, use instead.
Pascal's Triangle
Combinations follow a simple recurrence:
C(n,r)=C(n−1,r−1)+C(n−1,r)
This identity builds Pascal's triangle, where each entry is the sum of the two entries directly above it. Row of Pascal's triangle lists .
Common applications
Lottery analysis: counting possible ticket combinations
Team selection: choosing players from a squad
Genetics: counting genotype possibilities from allele pools
Quality control: selecting a sample from a batch for inspection
Card games: counting hand possibilities in poker, bridge, etc.
Practical notes
Special cases. $C(n, 0) = C(n, n) = 1$ for any . There is exactly one way to choose nothing, and one way to choose everything.
is undefined. You cannot choose more items than exist; the calculator reports an error for this case.
With repetition. The formula above assumes without replacement. The multiset coefficient handles the with-repetition case, but that is a separate calculation.
Frequently Asked Questions (FAQ)
What is a combination?
A combination C(n, r) is the number of ways to select r items from a set of n distinct items when the order of selection does not matter. Choosing {A, B} is the same as choosing {B, A}. The formula is C(n, r) = n! / (r! × (n − r)!), also written as the binomial coefficient "n choose r".
When should I use a combination instead of a permutation?
Use a combination when only the selected group matters, not the sequence: choosing lottery numbers, selecting team members, picking pizza toppings. Use a permutation when the arrangement matters: awarding medals, assigning seats, setting a PIN. For the same n and r, C(n, r) = P(n, r) / r!.
What is the formula for C(n, r)?
C(n, r) = n! / (r! × (n − r)!). The r! in the denominator divides out all orderings of the r selected items, since those are considered identical. Example: C(5, 2) = 120 / (2 × 6) = 10. There are 10 ways to choose 2 items from 5 without regard to order.