Combinations Calculator (nCr)
Enter n (total items) and r (items to choose) to estimate the number of combinations, also written C(n, r) or 'n choose r.' The exact formula is n! / (r!(n−r)!). Because this calculator's formula engine cannot compute full factorials for arbitrary inputs, it uses a power-based approximation for the numerator — see the content below for the exact manual calculation method and worked examples.
Advertisement
Calculator
See your Combinations Calculator (nCr) results
Enter your email to unlock results — free forever.
No spam, ever. Unsubscribe at any time.
Advertisement
Formula
C(n, r) = n! / (r! × (n−r)!)
The combination formula counts unordered selections of r items from n distinct items. The exact formula is n! divided by the product r! × (n−r)!. The denominator r! removes the ordering within each selection (since order does not matter), and (n−r)! cancels the factorial terms common to both numerator and denominator. For example, C(10, 3) = 10! / (3! × 7!) = (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120. The calculator's approximation uses nʳ / r! as an upper bound, which is exact only when n − r terms fully cancel; for accurate results with larger inputs, use the manual method shown in the examples.
How to use the Combinations Calculator (nCr)
- 1
Enter your n (total items)
- 2
Enter your r (items chosen)
- 3
Read your results instantly
Results update in real time as you type.
Advertisement
Combinations vs. permutations
The key question in counting problems is whether order matters. A permutation counts arrangements where order matters — choosing a president, vice president, and secretary from a club of 10 people gives a different result than choosing a 3-person committee, because the roles are distinct.
A combination counts selections where order does not matter. Choosing 3 people for a committee from 10 is a combination: the group {Alice, Bob, Carol} is the same committee regardless of the order in which names are listed.
The relationship between them is C(n, r) = P(n, r) / r!. Every combination corresponds to r! permutations (the r! different orderings of the same selection), so dividing P(n, r) by r! gives the number of unordered groups.
C(10, 3) = P(10, 3) / 3! = 720 / 6 = 120. There are 120 ways to choose a 3-person committee from 10 people.
Manual calculation for exact results
For exact combinations, cancel factorial terms before multiplying. C(n, r) = [n × (n−1) × … × (n−r+1)] / r!. This version only requires multiplying r numbers in the numerator and dividing by r!, avoiding the need to compute n! in full.
Example: C(10, 3) = (10 × 9 × 8) / (3 × 2 × 1) = 720 / 6 = 120. Example: C(52, 5) = (52 × 51 × 50 × 49 × 48) / (5 × 4 × 3 × 2 × 1) = 311,875,200 / 120 = 2,598,960. That is the number of possible 5-card hands from a standard deck.
Always simplify before multiplying by canceling common factors between numerator and denominator. For C(52, 5), notice that 50/5 = 10, 48/4 = 12, reducing the calculation significantly.
Advertisement
Pascal's triangle and the binomial theorem
Combinations are the entries in Pascal's triangle: the number in row n, position r is C(n, r). Each entry equals the sum of the two entries directly above it, reflecting the identity C(n, r) = C(n−1, r−1) + C(n−1, r). This identity says that a new element either is or is not included in the selection.
The binomial theorem states: (a + b)ⁿ = Σ C(n, k) aⁿ⁻ᵏ bᵏ for k from 0 to n. The coefficients in this expansion are exactly the combinations. For (a+b)³ = a³ + 3a²b + 3ab² + b³, the coefficients 1, 3, 3, 1 match row 3 of Pascal's triangle: C(3,0), C(3,1), C(3,2), C(3,3).
Combinations also appear in probability: the chance of getting exactly k heads in n fair coin flips is C(n, k) / 2ⁿ.
Tips & Insights
Always check whether order matters
Before applying the combination formula, ask: does swapping the order of selected items create a different outcome? If yes, use permutations. If no, use combinations. 'Choose 3 toppings for a pizza' is a combination; 'arrange 3 books on a shelf' is a permutation.
Use the smaller of r and n−r
C(n, r) = C(n, n−r), so always compute using the smaller value to reduce arithmetic. C(10, 7) = C(10, 3) = 120. This symmetry cuts the number of multiplications roughly in half for large n with large r.
Sanity-check with small cases
C(n, 0) = 1 (there is exactly one way to choose nothing), C(n, 1) = n (choosing one item from n has n outcomes), and C(n, n) = 1 (there is one way to choose everything). These boundary values let you verify your setup quickly.
Worked Examples
Lottery odds
C(49, 6) = (49×48×47×46×45×44)/(6!) = 13,983,816. Your odds of matching all 6 numbers are about 1 in 14 million.
Committee selection
C(10, 3) = (10×9×8)/(3×2×1) = 120. There are 120 distinct 3-person committees that can be formed from 10 members.
Advertisement
Frequently Asked Questions
What is the difference between C(n, r) and P(n, r)?
C(n, r) counts unordered selections (groups), while P(n, r) counts ordered selections (arrangements). P(n, r) = C(n, r) × r!, because each unordered group can be arranged in r! ways.
Why is C(n, r) equal to C(n, n−r)?
Choosing r items to include is equivalent to choosing n−r items to exclude. Every selection of r items corresponds uniquely to a selection of the remaining n−r items, so the counts must be equal.
What is 'n choose 0'?
C(n, 0) = 1 for any n ≥ 0. There is exactly one way to choose nothing from a set — the empty selection.
How do combinations relate to probability?
If all outcomes are equally likely, the probability of an event is (favorable outcomes)/(total outcomes). Combinations count both: C(52, 5) total 5-card hands, C(4, 1)×C(48, 4) hands with exactly one ace. Dividing gives the probability.
Can r be larger than n?
No. You cannot choose more items than exist in the set. C(n, r) = 0 when r > n (by convention, since no such selection is possible). The formula confirms this: (n−r)! in the denominator includes negative integers when r > n, which are undefined.
Advertisement