Possible Combinations Calculator - nCr Counts and Enumerated Sets
Use this free possible combinations calculator to enter n and r, read the nCr count, list every combination, switch to combinations with repetition C'(n,r).
Possible Combinations Calculator
Results
Enumerated combinations (first 300):
What Is a Possible Combinations Calculator?
A possible combinations calculator is a combinatorics tool that takes a source set of n distinct objects and a sample size r, then reports the number of ways to choose r objects from the source while ignoring the order of the picks. It returns the standard n choose r count C(n, r), can switch to the combinations with repetition count C'(n, r) when the same item is allowed to appear more than once, and lists the actual combinations as readable sets.
- • Counting k-letter codes from an alphabet: Compute how many 5-letter codes can be built from the 26 letters of the English alphabet and see the enumerated sets in the same panel.
- • Listing combinations for lottery and prize draws: Generate every 6-number combination from a fixed pool so a game designer can see the full set instead of trusting the count alone.
- • Choosing teams, committees, or project groups: Pick r people from a class, department, or club and list every possible group in alphabetical order for scheduling or fair selection.
- • Building samples in statistics homework: Count equally likely outcomes for sample spaces, hypergeometric distributions, and combinatorics problems.
The result panel always shows three numbers side by side. The combinations (no repetition) row is the standard n choose r count, the combinations (with repetition) row is the same count when the same item can be picked more than once, and the listed combinations row tells you how many of those sets are actually rendered in the enumerated list below.
Readers who already know the n choose r count and want to attach a success probability p to each set can move to the Binomial Distribution Calculator and read the binomial probability for the same n and r.
How the Possible Combinations Calculator Works
The calculator applies the two textbook combination formulas and prints both counts so a reader can see the difference without toggling anything. The n choose r count uses the factorial definition, while the combinations with repetition count uses the stars-and-bars identity C'(n, r) = C(n + r - 1, r).
- n (total objects): Number of distinct items in the source set.
- r (sample size): Number of items chosen in each combination. Must be a non-negative integer.
- C(n, r) - n choose r: Number of ways to pick r items from n items without repetition and without regard to order.
- C'(n, r) - combinations with repetition: Number of ways to pick r items from n types when the same item can be chosen more than once. Equals C(n + r - 1, r).
Both formulas rely on factorials, so the calculator computes C(n, r) using the iterative product C(n, r) = n x (n - 1) x ... x (n - r + 1) / r!. That avoids the overflow of computing large factorials directly and stays inside the safe-integer range for n up to 60 with r up to 10. The with-repetition case is built on top of the same routine: C'(n, r) is rewritten as C(n + r - 1, r), so the calculator reuses the no-repetition function with the new arguments.
Worked example: 26 letters, 5-letter codes, no repetition
n = 26, r = 5, allow repetition = No.
C(26, 5) = 26! / (5! x 21!) = 26 x 25 x 24 x 23 x 22 / 120 = 7,311,600 / 120 = 65,780. C'(26, 5) = C(30, 5) = 142,506.
Combinations (no repetition) = 65,780. Combinations (with repetition) = 142,506. Listed combinations = first 300 of 65,780.
Without repetition the first few sets read ABCDE, ABCDF, ABCDG. With repetition the list starts with AAAAA, AAAAB, AAAAC because the same letter can appear more than once.
According to Wikipedia, "Combination", C(n, k) = n! / (k!(n - k)!) counts the number of ways to choose k elements from a set of n elements with order ignored.
Readers who need the order-sensitive version of the same problem can open the Permutation and Combination Calculator and use the permutation formula P(n, r) = n! / (n - r)! next to the combination count.
Key Concepts Behind Combination Counting
Four short definitions keep the two formulas honest. They are written so a reader who has never opened a combinatorics textbook can still understand which formula to reach for.
n choose r (binomial coefficient)
Written C(n, r) or nCr, this is the number of ways to choose r items from a set of n distinct items, with order ignored.
Factorials n! and the role of r! and (n - r)!
A factorial n! is the product 1 x 2 x ... x n, with 0! defined as 1. Dividing by r! x (n - r)! removes the duplicate sets that come from re-ordering the same r picks.
Combinations with repetition C'(n, r)
When the same item is allowed to appear more than once, the count is C'(n, r) = C(n + r - 1, r). The stars-and-bars identity turns multiset selection into a standard n choose r count on a larger virtual set.
Order ignored vs. order matters
Combinations treat ABC and CBA as the same set. Permutations treat them as different. The combination formulas drop the r! in the denominator; the permutation formulas keep it.
Readers who want to convert the n choose r count into an event probability can open the Probability Calculator and enter the same n and r there to read equally likely outcomes for an experiment.
How to Use the Possible Combinations Calculator
Type n, type r, choose whether the same item can repeat, and read the result panel. The list updates as you type, so you can copy a row straight into a homework answer without retyping the values.
- 1 Enter the total number of objects n: Type the size of the source set in the Total number of objects n box. Use 26 for the English alphabet, 6 for a die, 10 for the digits 0-9, or any integer from 1 to 60.
- 2 Enter the sample size r: Type the number of items in each combination. The calculator accepts r = 0 (the empty selection) up to r = 10 to keep the list readable.
- 3 Decide whether repetition is allowed: Leave the dropdown on No for the standard C(n, r) case. Switch to Yes for the combinations with repetition C'(n, r) case.
- 4 Optionally supply custom labels: Paste a comma- or newline-separated list such as red,green,blue to use real names in the enumerated combinations.
- 5 Read the three result rows: The first row is C(n, r) without repetition. The second is C'(n, r) with repetition. The third is the number of sets rendered in the enumerated list.
- 6 Copy the enumerated list: The list updates in real time. Scan for the set you need, or copy the first 300 rows for a worksheet.
A reader is preparing a probability problem about 5-letter codes. They enter n = 26 and r = 5, leave repetition off, and read 65,780 combinations without repetition. They paste the first 30 rows into a spreadsheet to double-check a homework answer, then flip the dropdown to Yes and read 142,506 combinations with repetition.
Readers who want to test whether the frequencies they get from enumerating combinations match an expected distribution can move to the Chi-Square Calculator and run a goodness-of-fit test on the same counts.
Benefits of Using the Possible Combinations Calculator
A short list of what the tool does well, and what it is not designed to do, helps you put the result in the right place in your day.
- • Two combination counts in one panel: The result panel always shows the no-repetition and with-repetition counts side by side, so you can compare them without toggling the dropdown.
- • Enumerated list of every combination: Beyond the count, the calculator prints the actual sets in lexicographic order, which is what most homework, lottery, and team-selection problems need next to the count.
- • Custom labels for real source sets: Paste the real names of the items (red, green, blue, 1, 2, 3) and the enumerated list will use those names instead of the default A, B, C, ...
- • Safe handling of large counts: The combination routine uses an iterative product instead of factorial calls, so it stays inside the safe-integer range for n up to 60 and r up to 10.
- • Worked example with the alphabet: The 26-letter, 5-letter case sits in the worked example so a reader can verify the formula by hand before trusting the panel.
Readers who want to compare a single combination count against the rest of a distribution can pair the n choose r output with the Z-Score Calculator and read how unusual that count is in standard-deviation units.
Factors That Affect the Combination Count
The combination count depends on n, r, and the repetition setting. A few related inputs and overflow limits change the experience without changing the count itself.
Size of the source set n
Larger n grows the no-repetition count quickly because C(n, r) scales roughly as n to the r divided by r!.
Sample size r
Increasing r raises both counts. The with-repetition case is more sensitive because C'(n, r) = C(n + r - 1, r) compounds the growth.
Repetition toggle
Switching from No to Yes changes the count from C(n, r) to C(n + r - 1, r). The with-repetition count is always greater than or equal to the no-repetition count.
Custom label list
Custom labels change which names appear in the enumerated list but do not change the count. A list of length n is required for the result to use real names.
Enumerated-list cap of 300 rows
The result panel renders the first 300 sets in lexicographic order and reports the true count beside them so the page stays responsive.
- • The enumerated list is capped at 300 rows to keep the page responsive. The full count is still shown in the result panel.
- • The calculator does not model weighted, ordered, or restricted combinations. Use the permutation calculator for order-sensitive counts.
- • Counts above about 1e15 are reported as '> 1e15' rather than a precise integer because the iterative product runs out of safe-integer headroom.
According to Wikipedia, "Combination" - Number of combinations with repetition, the combinations with repetition count uses the stars-and-bars identity and equals C(n + k - 1, k).
Readers who use the combination count as the denominator of a probability fraction can pass the count and the favorable count into the Probability Fraction Calculator to read a simplified odds ratio.
Frequently Asked Questions
Q: How do I calculate possible combinations?
A: Use the combinations formula C(n, r) = n! / (r! (n - r)!) where n is the total number of objects and r is the sample size. This calculator does the factorial math for you, lists every combination of r items from the source set, and switches to C'(n, r) = C(n + r - 1, r) when the same item is allowed to repeat.
Q: What is the formula for combinations with repetition?
A: Combinations with repetition count using C'(n, r) = (n + r - 1)! / (r! (n - 1)!). It is the same as C(n + r - 1, r). This counts multiset selections of r items from n types when the same item can appear more than once in a single set.
Q: What is the difference between combinations and permutations?
A: Combinations count sets where order is ignored, so ABC and CBA are the same selection. Permutations count ordered arrangements, so ABC and CBA are different selections. The combination formula divides by r!; the permutation formula does not.
Q: How many possible combinations of 5 letters are there?
A: From the 26 letters of the English alphabet, C(26, 5) = 65,780 combinations without repetition and C'(26, 5) = 142,506 combinations with repetition. The number rises quickly if you change the alphabet size or the sample size.
Q: What does n choose r mean?
A: n choose r, written C(n, r) or nCr, is the number of ways to choose r items from a set of n distinct items, ignoring the order of selection. It is calculated with C(n, r) = n! / (r! (n - r)!) and is the same quantity the result panel reports in its no-repetition row.
Q: How are lottery number combinations calculated?
A: Pick-3 and Pick-4 games are ordered digit draws, not combination draws, so each ticket is one of 10^3 = 1,000 or 10^4 = 10,000 sequences with digits allowed to repeat. Pick-6 style games use C(49, 6) = 13,983,816 because the six numbers are unordered and cannot repeat. Use the permutation formula on ordered draws and C(n, r) on unordered draws.