Combination Calculator
Calculate nCr (combinations without order) or combinations with repetition.
What Is a Combination?
A combination is a way to choose items from a larger set where order does not matter. If you pick 3 books from a shelf of 10, the group {A, B, C} is the same as {C, B, A}; that is one combination, not six different outcomes.
The standard formula is: C(n, r) = n! / (r!(n-r)!), often written as nCr. It tells you how many unique groups of size r can be made from n items.
Combination vs. Permutation
Use combinations when order is irrelevant
- Choosing committee members
- Selecting lottery numbers
- Picking toppings for a pizza (if arrangement doesn’t matter)
Use permutations when order matters
- Assigning gold, silver, and bronze medals
- Creating rank-ordered finish results
- Forming unique passcodes with no repeated positions
How to Use This Calculator
- Choose a calculation type: Without repetition or With repetition.
- Enter n as the total available items (or item types).
- Enter r as the number of selections to make.
- Click Calculate to see the exact integer result.
The calculator also displays which formula was used and the digit length of the output, which is useful for very large values.
Combinations With Repetition (nHr)
In many practical problems, you can choose the same item more than once. For example, choosing 4 donuts from 8 flavors where repeats are allowed. In that case, the count is: C(n + r - 1, r).
This is often called the “stars and bars” model in combinatorics. It converts a repetition problem into a standard combination formula by adding separators between item types.
Worked Examples
Example 1: Standard nCr
How many ways can you choose 3 students from 10?
C(10, 3) = 120
Example 2: With repetition
How many ways can you choose 4 scoops from 6 flavors, allowing repeats?
C(6 + 4 - 1, 4) = C(9, 4) = 126
Common Input Mistakes to Avoid
- Using decimals (like 5.5): combinations require whole numbers.
- Using negative values: n and r must be non-negative.
- For standard nCr, entering r greater than n: this is invalid in non-repetition mode.
- Confusing permutation formulas with combination formulas.
Where Combination Calculations Are Used
Statistics and probability
Binomial probability models rely on combinations to count favorable outcomes, especially in yes/no event scenarios.
Data science and machine learning
Feature subset selection, model search spaces, and experimental configurations often involve combinatorial counts.
Games, puzzles, and lotteries
Card hands, team selections, and number-draw games all use combinations to evaluate odds and strategy.
Quick FAQ
Can n or r be zero?
Yes. In standard combinations, C(n, 0) = 1, because there is exactly one way to choose nothing.
Why are some results extremely large?
Combination counts grow very quickly. Even modest values like C(100, 50) produce enormous integers with many digits.
Is the result exact?
Yes. This tool uses integer arithmetic for exact results, not floating-point approximations.