This combination calculator, provided by Hesapstan, calculates how many ways r items can be chosen from n distinct items when order does not matter. It shows the result together with the formula, substitution, simplified solution step, permutation comparison and, when practical, a limited preview of example combinations.
What does a combination calculator find?
A combination calculator finds the number of ways to choose r items from n distinct items. In a combination, the order of the selected items does not matter.
For example, if you choose 2 letters from A, B and C, AB and BA are the same combination. The calculator counts the selected group, not the order in which the items are written.
A combination answers “which items were selected?” A permutation answers “in which order were they arranged?”
What does this tool calculate?
This tool calculates the standard combination without repetition: C(n,r), also read as n choose r. The value n is the total number of distinct items, and r is the number of items to choose.
- Result: the exact number of selections where order does not matter.
- Formula: C(n,r) = n! / (r!(n−r)!).
- Substitution: the entered n and r values placed into the formula.
- Simplified step: a clearer multiplication/division step leading to the result.
- Permutation comparison: what the answer would be if order mattered for the same n and r.
- Example combinations: automatic labels such as A, B and C are shown when the preview is practical.
What do n and r mean?
In C(n,r), n is the total number of distinct items and r is the number of items you want to choose. The value r cannot be greater than n.
- n: the total number of distinct items.
- r: the number of items to choose.
- The inputs must satisfy 0 ≤ r ≤ n.
- This calculator supports n values up to 200.
- Both n and r must be whole numbers; fractional values are not valid.
For example, if you choose a 3-person team from 10 students, n = 10 and r = 3. If the order of the team members does not matter, it is a combination question.
How does the combination formula work?
The combination formula is C(n,r) = n! / (r!(n−r)!). It removes the different orderings of the same selected group so that each group is counted only once.
The factorial symbol means multiplying a whole number by all positive whole numbers below it. For example, 5! = 5 × 4 × 3 × 2 × 1.
C(n,r) equals C(n,n−r). Choosing 3 people from 10 is equivalent in count to deciding which 7 people are not chosen.
Example calculation: C(5,3)
C(5,3) shows how many ways 3 items can be chosen from 5 distinct items when order does not matter.
- Write the formula: C(n,r) = n! / (r!(n−r)!).
- Substitute the values: C(5,3) = 5! / (3! × 2!).
- Use the shortened step: (5 × 4 × 3) / (3 × 2 × 1).
- Result: 10.
So there are 10 ways to choose 3 items from 5. If the same three items are selected in a different order, it is still the same combination.
Combination vs permutation
In a combination, order does not matter; in a permutation, order matters. If the same items are arranged in a different order, permutation counts them separately while combination does not.
For example, choosing AB and BA from A, B and C gives the same combination but two different permutations.
- Combination question: how many 3-person teams can be chosen from 8 people?
- Permutation question: how many first-second-third ordered arrangements can be made from 8 people?
For the same n and r, the permutation value is usually larger because it counts different orders of the same selected items.
How should the example combinations be read?
The calculator may show example combinations using automatic labels such as A, B and C. This preview helps you see what the result means, but it is intentionally limited.
For n = 5 and r = 3, the preview may show ABC, ABD, ABE, ACD, ACE, ADE, BCD, BCE, BDE and CDE. ABC and BAC are not separate combinations because the selected items are the same.
Listing every combination can be very long and may slow the browser. The calculator never displays more than the first 300 example combinations, even when the exact result is larger.
How are boundary cases handled?
Some boundary cases in combinations have a direct result of 1. Choosing nothing or choosing everything can each be done in exactly one way.
- C(0,0) = 1.
- C(n,0) = 1.
- C(n,n) = 1.
- r > n is invalid.
- n and r cannot be negative.
- Fractional n or r values are invalid.
These cases are common in school math, probability examples and programming tasks.
When is this calculator useful?
A combination calculator is useful when you need to count selections, teams, subsets or possible groups where order does not matter.
- Choosing students or people for a group.
- Selecting a fixed number of options from a product list.
- Counting possible question selections from a question pool.
- Understanding the total number of possible selections before solving a probability problem.
- Comparing the effect of order by looking at the permutation comparison.
The calculator does not directly calculate probability. For probability, the number of favorable selections and the total number of possible selections must be compared separately.
Common mistakes
The most common mistake is using a combination when order actually matters. If order matters, the correct calculation is a permutation, not a combination.
- Treating AB and BA as different combinations.
- Entering r greater than n.
- Trying to solve combinations with repetition using this tool.
- Reading the combination result as a probability result.
- Expecting all combinations to be listed for large values.
- Entering fractional or negative item counts.
Limitations of this calculator
This calculator focuses on standard combinations without repetition. It does not cover every topic in combinatorics or every real-world selection scenario.
- It does not calculate combinations with repetition.
- It does not build probability scenarios.
- It does not apply lottery-specific rules.
- It does not expand binomials.
- It does not handle multiple groups with separate constraints.
- It does not generate an unlimited list of combinations.
- n is limited to 200.
- The example preview is limited to 300 items.
For supported inputs, the numeric result is the exact standard combination count. The example preview may be limited, but the result itself represents the full count.
Frequently Asked Questions
How do you calculate combinations?
Use the formula C(n,r) = n! / (r!(n−r)!). Here n is the total number of items and r is the number of items selected.
Does order matter in combinations?
No. In combinations, order does not matter. The same selected items in a different order are still counted as one selection.
What is the difference between combination and permutation?
A combination counts selections; a permutation counts ordered arrangements. Use permutation when order matters and combination when it does not.
Why is C(n,0) equal to 1?
There is exactly one way to choose nothing from n items. That is why C(n,0) equals 1.
Does this calculator handle combinations with repetition?
No. It calculates only standard combinations without repetition. Combinations with repetition use a different formula.
Why are not all example combinations displayed?
Large lists can be very long and may slow the browser. The calculator shows at most the first 300 example combinations.