Combination (nCr) Calculator
This calculator works out C(n,r), commonly known as nCr or n choose r, the number of ways you can select r items from a set of n items when the order of selection does not matter. It is the standard combinatorics tool used for questions like how many lottery combinations, poker hands, or committees are possible from a larger group. Enter any whole number for n (the total number of items) and r (how many you are choosing), or pick a ready-made example from the quick reference list, such as a Lotto draw of 6 from 40, a poker hand of 5 from 52, or a committee of 4 from 20. The result updates instantly and shows C(n,r) as the headline figure, alongside nPr (the number of ordered arrangements) and r! (the divisor that turns permutations into combinations) for comparison. Below the results you get full step-by-step working showing the formula applied to your numbers, a calculation details table breaking down n!, r!, and (n-r)!, and a symmetry check confirming that C(n,r) always equals C(n, n-r). Calculations use exact integer arithmetic, so results are precise even for large values of n rather than rounded approximations. Use this tool whenever you need to count selections rather than arrangements, whether for maths homework, probability problems, or working out odds in games and lotteries.
1. Inputs
2. Quick Reference
Step-by-step working
Calculation Details
Symmetry Check
What is a Combination?
A combination is a selection of items from a larger set where order does not matter. If you are choosing a 3-person committee from 10 candidates, it does not matter whether you pick Alice first or last -- the committee is the same. C(10,3) = 120 tells you there are 120 distinct committees possible.
Combinations are written as C(n,r), nCr, or nCr. The notation "n choose r" is also standard. In Pascal's Triangle, C(n,r) appears as the (r+1)th element of the (n+1)th row.
The Combination Formula
The combination formula is:
C(n,r) = n! / (r! x (n-r)!)
Where n! ("n factorial") means n x (n-1) x (n-2) x ... x 1. For example, 5! = 5 x 4 x 3 x 2 x 1 = 120.
A practical shortcut: instead of computing full factorials, write out only r terms in the numerator starting from n, then divide by r!. For C(10,3):
(10 x 9 x 8) / (3 x 2 x 1) = 720 / 6 = 120
Worked Example: Default Values
With n = 10 and r = 3:
- Numerator: 10 x 9 x 8 = 720
- Denominator: 3! = 3 x 2 x 1 = 6
- C(10,3) = 720 / 6 = 120
There are 120 ways to choose any 3 items from a set of 10 when the order of selection does not matter.
Combinations vs Permutations
| Concept | Formula | C(10,3) example | When to use |
|---|---|---|---|
| Combination (nCr) | n! / (r! x (n-r)!) | 120 | Order does not matter (teams, committees, hands) |
| Permutation (nPr) | n! / (n-r)! | 720 | Order matters (rankings, arrangements, sequences) |
| Relationship | nCr = nPr / r! | 720 / 6 = 120 | Divide permutations by the number of orderings of r items |
Common Applications
- Lottery odds: New Zealand Lotto draws 6 numbers from 40. There are C(40,6) = 3,838,380 possible combinations.
- Poker: A 5-card hand from a 52-card deck has C(52,5) = 2,598,960 possible hands.
- Teams and committees: Selecting 4 people from a group of 20 gives C(20,4) = 4,845 possible teams.
- Probability: The probability of a specific combination is 1 / C(n,r) when each outcome is equally likely.
- Binomial theorem: The binomial coefficient C(n,r) is the coefficient of xr in the expansion of (1 + x)n.
Special Cases
- C(n,0) = 1: There is exactly one way to choose nothing.
- C(n,1) = n: Choosing one item from n gives n possibilities.
- C(n,n) = 1: There is exactly one way to choose all items.
- C(n,r) = C(n, n-r): Choosing r to include is the same as choosing (n-r) to exclude.
Related Calculators
- Maths and Stats Calculators: full hub for maths tools.
- Permutation Calculator (nPr): ordered arrangements from n items.
- Permutations and Combinations Calculator: both in one tool.
- Factorial Calculator: compute n! for any whole number.
- Probability Calculator: use combinations in probability problems.
Method: Standard combinatorics formula C(n,r) = n! / (r! x (n-r)!). Factorials are computed iteratively using JavaScript BigInt for exact integer arithmetic at any practical value of n. The calculator handles values up to n = 170 before results exceed JavaScript's safe integer range; for larger values BigInt is used throughout.
This calculator computes exact integer results using the standard combination formula. Results are exact for all inputs shown. For very large n (above a few hundred), the number of digits in the result grows rapidly.