This calculator works out how many possible combinations or permutations exist for a given set of items. You enter the total number of items (n) and how many you choose (r), pick whether order matters, and whether repetition is allowed, and you get the exact count instantly. It handles the four classic counting scenarios: combinations and permutations, each with or without repetition.
Formula
The calculator uses four standard formulas depending on your choices:
- Combinations without repetition (order doesn’t matter, no repeats): C(n, r) = n! / [r! × (n − r)!]
- Combinations with repetition (order doesn’t matter, repeats allowed): C(n + r − 1, r) = (n + r − 1)! / [r! × (n − 1)!]
- Permutations without repetition (order matters, no repeats): P(n, r) = n! / (n − r)!
- Permutations with repetition (order matters, repeats allowed): nr
Where:
- n = total number of items you can choose from
- r = number of items you actually pick
- ! = factorial (multiply all whole numbers from that number down to 1, so 5! = 5×4×3×2×1 = 120)
Worked Example
Let’s use the default values: n = 10, r = 3, combinations without repetition.
- Start with the formula: C(10, 3) = 10! / [3! × (10 − 3)!]
- Compute the factorials: 10! = 3,628,800; 3! = 6; 7! = 5,040
- Plug them in: C(10, 3) = 3,628,800 / (6 × 5,040) = 3,628,800 / 30,240
- Divide: 3,628,800 ÷ 30,240 = 120
So with 10 items, choosing 3 where order doesn’t matter and you can’t repeat, there are 120 possible combinations. The calculator shows 120 as the headline result.
How to Choose the Right Mode
Before you click calculate, ask yourself two questions:
- Does the order of the selected items matter? If picking {A, B, C} and {C, B, A} count as the same outcome, use combinations. If they are different outcomes, use permutations. For example, choosing 3 toppings for a pizza is a combination (pepperoni, mushroom, onion is the same as onion, mushroom, pepperoni). Assigning 3 different jobs to 3 people is a permutation (Alice gets job 1 vs. Alice gets job 2 are different).
- Can the same item be chosen more than once? If you draw a card and put it back before drawing again, repetition is allowed. If you draw without replacement, it’s not. A PIN code allows repetition (you can have 1111), while a lottery draw does not (the same ball can’t come out twice).
Once you answer those, you’ll know exactly which formula applies.
Common Problems and Misconceptions
One of the most frequent mistakes is confusing combinations with permutations. People often say “combination” when they really mean “permutation.” For example, the “combination lock” on a school locker is actually a permutation lock because 1-2-3 is different from 3-2-1. If you use the wrong mode, your answer will be off by a factor of r! (the number of ways to order the chosen items).
Another common error is forgetting to check whether repetition is allowed. The four formulas give very different results. For n = 10, r = 3:
- Combinations without repetition: 120
- Combinations with repetition: 220
- Permutations without repetition: 720
- Permutations with repetition: 1,000
Notice how much bigger the “with repetition” numbers are. If you’re counting possible passwords, PINs, or codes, repetition is almost always allowed, and the count is simply nr.
A third issue: people sometimes try to use these formulas when n is huge (like 109) and r is also large. Factorials grow incredibly fast, and most calculators will overflow or take a long time. This calculator caps n and r at 1000 to keep results readable, but for real-world problems with huge numbers, you’d use logarithms or approximations.
Real-World Applications
These counting formulas show up in many everyday situations:
- Lotteries: The number of possible ticket combinations is C(n, 6) for a 6-number draw from n total numbers. For a typical 6/49 lottery, that’s C(49, 6) = 13,983,816.
- Passwords and PINs: A 4-digit PIN with digits 0-9 and repetition allowed has 104 = 10,000 possibilities.
- Card games: The number of possible 5-card poker hands from a 52-card deck is C(52, 5) = 2,598,960.
- Team selection: Choosing 5 players from a squad of 12 (order doesn’t matter) gives C(12, 5) = 792 possible teams.
- Menu combinations: If a restaurant has 8 toppings and you can pick any 3 (no repeats), there are C(8, 3) = 56 possible topping combos.
For the pizza topping example, if you could double up on a topping (repetition allowed), it would be C(8+3−1, 3) = C(10, 3) = 120.
Limits of the Calculator
This calculator is designed for counting possibilities, not for probability. To get a probability, you’d divide the number of favorable outcomes by the total number of outcomes. For example, the chance of winning a 6/49 lottery is 1 / 13,983,816 ≈ 0.00000715%. This calculator gives you the denominator, but you’d do the division yourself.
Also note that the calculator assumes all items are distinct. If you have identical items (like 3 red balls and 2 blue balls), the count changes because swapping identical items doesn’t create a new arrangement. That’s a more advanced topic called “combinations with identical items” and isn’t covered here.
Finally, the calculator treats n and r as whole numbers. If you enter a decimal, it will be rounded to the nearest integer. For most counting problems, that’s fine, but be aware.
Frequently Asked Questions
What’s the difference between combinations and permutations? The key is order. Permutations count arrangements where order matters (ABC is different from BCA). Combinations count selections where order doesn’t matter (ABC is the same as BCA). For example, picking 3 winners for gold, silver, bronze is a permutation; picking 3 finalists is a combination.
When do I use nr instead of the other formulas? Use nr when order matters AND repetition is allowed. This is typical for passwords, PINs, license plates, and any code where you can reuse a character. For example, a 3-letter code from 26 letters with repetition allowed gives 263 = 17,576 possibilities.
Why is the combination with repetition formula C(n+r−1, r)? It’s a clever trick. If you have n types of items and you choose r of them (with repetition), you can think of it as arranging r stars and n−1 bars in a line. The bars separate the item types, and the stars represent your choices. The total number of arrangements is C(n+r−1, r). For example, choosing 3 donuts from 5 flavors is C(5+3−1, 3) = C(7, 3) = 35.
Can I use this calculator for probability? Not directly, but you can use the result as the total number of outcomes. If you want the probability of a specific outcome, divide 1 by the total. For example, the probability of a specific 5-card poker hand is 1 / 2,598,960 ≈ 0.0000385%. For more complex probabilities, you’d need to count favorable outcomes separately.
What if r is larger than n? For combinations and permutations without repetition, if r > n, the result is 0 because you can’t choose more items than you have. The calculator will show 0. For with-repetition cases, r can be larger than n (like rolling a die 10 times), and the formula still works fine.
Why do factorials grow so fast? Factorials multiply by every integer down to 1, so they explode: 10! is already 3.6 million, 20! is about 2.4 quintillion. This is why the number of possibilities becomes astronomically large quickly. For n=50 and r=5, combinations are over 2 million, and for n=100, r=10, it’s over 1.7×1013.
Related
Formula used
in n | Total items (n) | - | 10 | 0 | 1000 in r | Chosen items (r) | - | 3 | 0 | 1000 sel type | Counting type | Combinations (order doesn't matter)=comb, Permutations (order matters)=perm sel rep | Repetition allowed? | No=0, Yes=1 out result | Number of possibilities | - | if(type=="comb" && rep==0, ncr(n,r), if(type=="comb" && rep==1, ncr(n+r-1,r), if(type=="perm" && rep==0, npr(n,r), n^r))) | 0 out n_fact | n! | - | fact(n) | 0 out r_fact | r! | - | fact(r) | 0
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
- Final Exam Calculator: Weighted Grade & Score Needed101.7 %
- Coefficient of Variation (CV) Formula and Calculator19.56 %
- How to Calculate the Empirical Rule (68-95-99.7)85.00
- Class Width Calculator for Frequency Tables8