The Combination Calculator on FreeToolZones counts how many ways you can choose r items from n items when the order of choosing does not matter, using exact integer arithmetic for n up to 1000. Combinations answer questions such as: how many 5-card hands are there in poker, how many committees of 3 can be formed from 10 people, and how many lottery tickets cover all the numbers? In each case, the same set chosen in a different order counts once, not many times. That single distinction, order does not matter, is what separates combinations from permutations, and it makes combination counts much smaller than the corresponding permutation counts.
The formula is C(n, r) equals n factorial divided by the product of r factorial and n minus r factorial. The division by r factorial removes the orderings: each set of r items can be ordered in r factorial ways, and all of those orderings are the same combination. For C(10, 3), the formula gives 10 factorial divided by the product of 6 and 5040, which is 3628800 divided by 30240, which is 120. There are 120 ways to choose 3 items from 10, but 720 ways to arrange 3 items chosen from 10, because each combination of 3 can be arranged in 6 orders, and 120 times 6 is 720.
What Is the Combination Calculator?
The Combination Calculator takes two whole numbers, n for the total items and r for the items chosen, and returns C(n, r), the binomial coefficient, read as n choose r. It requires n and r to be 0 or greater, r no greater than n, and n no greater than 1000. The computation uses exact integer arithmetic with an efficient product formula: it multiplies and divides step by step, using the smaller of r and n minus r, so intermediate values stay manageable and the result is exact. The display shows the result as a full integer, the number of digits, the formula, and a sentence stating how many ways there are to choose r items from n.
The symmetry C(n, r) equals C(n, n minus r) is built into the computation and is worth understanding. Choosing 3 items from 10 leaves 7 unchosen, and choosing which 7 to leave out determines which 3 you keep, so the counts must match: C(10, 3) equals C(10, 7), and both are 120. The tool exploits this by computing with the smaller of the two values, which is faster and keeps intermediate numbers smaller. You can verify the symmetry by entering n as 10 and r as 3, then r as 7, and confirming the same result.
Edge cases follow the standard conventions. C(n, 0) is 1, because there is exactly one way to choose nothing: the empty set. C(n, n) is 1, because there is exactly one way to choose everything. C(0, 0) is 1. These conventions make the formula work consistently, relying on 0 factorial being 1. The tool enforces r no greater than n with a clear message, because choosing more items than exist is impossible, and it enforces the n limit of 1000 so results stay manageable in the browser.
How to Use the Combination Calculator
- Enter the total number of items n in the n field. The tool starts with 10 as an example.
- Enter the number of items chosen r in the r field. The tool starts with 3 as an example.
- Press Calculate, or change either field, because the result updates automatically as you type.
- Read the large display, which shows C(n, r) and the full integer result, then check the number of digits, the formula, and the explanatory sentence.
With the defaults, C(10, 3) is 120, with 3 digits. Try C(5, 2) to get 10: the pairs from 5 items are 10. Try C(52, 5) to get 2598960, the number of 5-card poker hands from a standard deck. Try C(20, 2) to get 190, the number of pairs from 20 items, which is also the number of handshakes if 20 people each shake hands once with every other person. Try C(12, 6) to get 924. Try C(10, 0) to get 1, and C(10, 10) to get 1, confirming the edge cases.
If r is greater than n, the tool reports that r cannot be greater than n. If either input is negative, decimal, or missing, it reports the requirement that n and r be whole numbers 0 or greater. If n exceeds 1000, it reports the limit. These messages prevent the common error of entering the numbers in the wrong order: if you meant to choose 10 from 3, which is impossible, the tool tells you, rather than returning a confusing result. Swap n and r if you entered them backwards.
Key Features of the Combination Calculator
- Exact results: Binomial coefficients are computed with exact integer arithmetic, so large results show every digit correctly.
- Order-independent counting: Implements the combination definition, where different orders of the same set count once.
- Symmetry optimization: Uses the smaller of r and n minus r internally, keeping computation efficient for large n.
- Digit count: Shows the number of digits in the result, giving an immediate sense of the size of the count.
- Formula display: Shows C(n, r) equals n factorial divided by r factorial times n minus r factorial, so the method is visible.
- Plain-language result: States the count as a sentence about choosing items, which helps learners connect the number to the problem.
- Live updates: Results recalculate as you type, making it easy to explore how C(n, r) changes with n and r.
Combination counts grow quickly with n and peak when r is near half of n. For n equal to 20, C(20, 10) is 184756, far larger than C(20, 2), which is 190. That peak reflects the fact that middle-sized subsets are the most numerous: there are many ways to choose half the items, but few ways to choose almost none or almost all. The binomial coefficients for a fixed n form a row of Pascal’s triangle, symmetric around the centre, and their sum is 2 to the power of n, the total number of subsets of all sizes. For n equal to 10, the coefficients sum to 1024.
Practical Use Cases and Worked Examples
Example 1: Committees and teams
How many committees of 3 can be formed from 10 people? The answer is C(10, 3), which is 120. The order in which committee members are named does not create a different committee, so combinations, not permutations, apply. How many teams of 5 can be chosen from 12 players? C(12, 5) is 792. How many ways can you choose 2 captains from 8 players? C(8, 2) is 28. In each case, verify by the formula: C(8, 2) is 8 factorial divided by the product of 2 factorial and 6 factorial, which is 40320 divided by the product of 2 and 720, which is 40320 divided by 1440, which is 28.
Example 2: Card hands and lotteries
The number of 5-card hands from a 52-card deck is C(52, 5), which is 2598960. Enter n as 52 and r as 5 to confirm. The number of 6-number lottery tickets from 49 numbers is C(49, 6), which is 13983816. The probability of a specific ticket winning is 1 over that number, about 0.0000000715. The number of 3-card hands from 52 cards is C(52, 3), which is 22100. Card and lottery problems are the classic combination applications, because the hand or ticket is a set, and the order of dealing or drawing does not change it.
Example 3: Handshakes and pairs
If 20 people each shake hands once with every other person, the number of handshakes is C(20, 2), which is 190. Each handshake involves a pair, and the pair Anna and Ben is the same handshake as Ben and Anna, so order does not matter. The formula C(n, 2) simplifies to n times n minus 1 divided by 2: for n equal to 20, that is 20 times 19 divided by 2, which is 190. The same count gives the number of games in a round-robin tournament, the number of edges in a complete graph, and the number of pairwise comparisons in a test.
Example 4: Binomial probabilities
The probability of exactly 5 heads in 10 coin flips is C(10, 5) times one half to the power of 10. C(10, 5) is 252, and 252 over 1024 is about 0.246094. The combination counts the sequences with exactly 5 heads: each sequence is a choice of which 5 of the 10 flips are heads. The Probability Calculator performs the full binomial calculation, but the Combination Calculator gives you the coefficient, which is the counting heart of the formula. For exactly 3 heads in 8 flips, C(8, 3) is 56, and the probability is 56 over 256, which is 0.21875.
Example 5: Subsets and menu choices
A menu offers 8 dishes, and you choose 3. The number of possible meals is C(8, 3), which is 56. A pizza shop offers 10 toppings, and you choose 4. The number of topping combinations is C(10, 4), which is 210. A test has 12 questions, and you answer 8. The number of ways to choose which questions to answer is C(12, 8), which equals C(12, 4), which is 495. The symmetry is visible here: choosing 8 to answer is the same as choosing 4 to skip. The tool returns 495 for both r values.
Example 6: Large n and the 1000 limit
Enter n as 100 and r as 50 to see a 30-digit result: C(100, 50) is 100891344545564193334812497256. The digit count, 30, is shown alongside. Enter n as 1000 and r as 2 to get 499500, a manageable number despite the large n, because choosing 2 is a simple quadratic count. Enter n as 1000 and r as 500 to see a very large result with hundreds of digits, still computed exactly. The 1000 limit keeps such computations feasible in the browser while covering every practical counting problem and most textbook problems.
Tips and Best Practices
First, ask the order question before choosing a tool: if rearranging the chosen items creates a different outcome, use permutations; if it creates the same outcome, use combinations. Committees, hands, and subsets are combinations. Passwords, rankings, and race finishes are permutations. Second, use the symmetry to simplify: C(n, r) with r near n is easier to think about as C(n, n minus r). Third, verify small cases by listing: C(4, 2) is 6, and the pairs from A, B, C, D are AB, AC, AD, BC, BD, CD, which is indeed 6.
Fourth, remember that combinations count selections without repetition: each item can be chosen at most once. Problems allowing repetition, such as choosing 3 scoops from 5 flavours with repeats allowed, follow a different formula and are not computed by this tool. Fifth, for probability work, divide the favourable combination count by the total combination count, ensuring both counts use the same n and r structure. Sixth, check the digit count as a sanity check: if you expected a small count and see dozens of digits, n or r was probably mistyped. Finally, keep n and r in the correct fields: n is the total, r is the chosen count, and r must not exceed n.
Limitations
The Combination Calculator computes C(n, r) for whole numbers with n from 0 to 1000 and r from 0 to n. It does not compute combinations with repetition, permutations, or multinomial coefficients. It does not list the combinations themselves, only the count: listing millions of sets would be impractical, and the count is what most problems need. It does not compute probabilities directly, although the count can be combined with a total count to form a probability.
Inputs must be whole numbers. The result is shown as a full integer, which may be very long for n near 1000 and r near half of n. The tool does not show the step-by-step product or the factorial values used, although the formula is displayed. It does not handle non-integer or negative inputs, and it does not compute the gamma-function generalization of the binomial coefficient.
Frequently Asked Questions
What is a combination?
It is a selection of items where order does not matter. Choosing A, B, and C is the same combination as choosing C, B, and A. The count of combinations is given by the binomial coefficient C(n, r).
What is C(10, 3)?
It is 120. There are 120 ways to choose 3 items from 10 when order does not matter.
What is the difference between combinations and permutations?
In combinations, order does not matter, so each set counts once. In permutations, order matters, so each ordering counts separately. C(10, 3) is 120, while P(10, 3) is 720, because each set of 3 can be ordered in 6 ways.
Why does C(n, r) equal C(n, n minus r)?
Because choosing r items to keep is the same as choosing n minus r items to leave out. Both choices determine the same selection, so their counts must match.
What is C(n, 0)?
It is 1. There is exactly one way to choose nothing: the empty selection.
What is the largest n supported?
One thousand. The limit keeps results manageable. Values of n up to 1000 cover all practical counting problems.
Related Tools
Continue with the Permutation Calculator for counting where order matters, the Factorial Calculator for the factorials in the formula, the Probability Calculator for binomial probabilities, the Scientific Calculator for dividing counts into probabilities, and the Number Rounding Tool to round probability results. You can also return to the FreeToolZones home page to browse the full tool collection.