Combination Calculator (nCr)
Use this tool to calculate how many ways you can choose r items from n items, where order does not matter.
Tip: valid inputs are non-negative integers, with r ≤ n. For browser performance, this calculator supports n up to 10,000.
What is nCr?
In mathematics, nCr means the number of combinations of r items selected from n total items. It is also called the binomial coefficient. Combinations are used when order does not matter. For example, choosing 3 books out of 10 is the same group no matter what order you list them in.
Here, the exclamation point means factorial. For instance, 5! = 5 × 4 × 3 × 2 × 1 = 120. So if you compute 10C3, the result is 120. That means there are 120 unique groups of 3 items from 10.
Difference Between nCr and nPr
A common confusion is mixing up combinations and permutations:
- nCr (combinations): order does not matter.
- nPr (permutations): order does matter.
If you are selecting a committee, use nCr. If you are assigning ranked positions (first, second, third), use nPr.
| Scenario | Use | Reason |
|---|---|---|
| Pick 5 students for a team | nCr | The same 5 people form the same team in any order |
| Award gold, silver, bronze | nPr | Placement order changes the outcome |
| Choose 6 cards from a deck | nCr | Card arrangement is not relevant |
How to Use This nCr Calculator
Step-by-step
- Enter the total number of items in n.
- Enter how many you want to choose in r.
- Click Calculate nCr.
- The calculator returns the exact integer result, even for very large values.
Example
Suppose n = 52 and r = 5. This models choosing a 5-card hand from a standard deck. The result is 2,598,960 possible hands.
Why nCr Matters in Real Life
Combinations are not just textbook math. They appear in many practical settings:
- Probability: card games, lotteries, and risk analysis.
- Data science: feature selection and model building choices.
- Operations: selecting subsets of tasks, routes, or resources.
- Biology: counting possible gene or sample selections.
- Finance: portfolio subset analysis and scenario planning.
Common Input Mistakes (and Fixes)
- Using decimals: nCr needs integers only. Use whole numbers.
- Setting r > n: you cannot choose more items than exist.
- Negative numbers: invalid for standard combination counting.
- Confusing n and r: remember n = total, r = selected.
FAQ
Can I use large values?
Yes. This calculator uses exact integer arithmetic with BigInt, so results are precise and not rounded. To keep the page responsive in a browser tab, n is capped at 10,000.
Why does nCr equal nC(n-r)?
Choosing r items to include is equivalent to choosing n-r items to leave out. Both count the same set of outcomes, so the values are identical.
What does a result of 1 mean?
It means there is only one way to make that choice, such as nC0 (choose nothing) or nCn (choose everything).
Final Thoughts
If you work with probability, statistics, algorithms, or even everyday decision-making, understanding nCr gives you a reliable way to count possibilities. Use the calculator above for quick results, and use the formula when you need to show your work.