Combinations & Permutations Calculator
Calculate nCr and nPr.
Enter n and r values to calculate combinations and permutations
What Are Combinations and Permutations?
Combinations and permutations are fundamental concepts in combinatoricsβthe mathematics of counting. They answer the question: "In how many ways can we select or arrange items from a set?"
The key distinction is whether order matters:
- Permutations: Order matters (ABC β BAC)
- Combinations: Order doesn't matter (ABC = BAC)
Understanding when to use each is crucial for probability calculations, statistical sampling, and countless real-world applications.
Permutations
Without Repetition
When arranging items from distinct items, where each item can only be used once:
Example: How many ways can 3 runners finish in 1st, 2nd, and 3rd place from a race of 10 runners?
With Repetition
When items can be repeated:
Example: How many 4-digit PINs are possible using digits 0-9?
Combinations
Without Repetition
When selecting items from distinct items, where order doesn't matter:
This is called "n choose r" and is denoted .
Example: How many ways can you choose 3 team members from 10 candidates?
With Repetition
When items can be selected multiple times:
Example: How many ways can you choose 5 donuts from 3 flavors (chocolate, glazed, strawberry)?
The Relationship
Notice that:
This makes sense: to get permutations from combinations, multiply by the number of ways to arrange the selected items.
Practical Applications
Lottery Probability
Most lotteries use combinations since the order of drawn numbers doesn't matter. If a lottery draws 6 numbers from 49:
So your odds of matching all 6 are about 1 in 14 million.
Card Games
A poker hand is 5 cards from a 52-card deck:
Password Security
If passwords must be exactly 8 characters using 62 possible characters (a-z, A-Z, 0-9):
Sampling Theory
In statistics, combinations underlie sample size calculations and probability distributions like the hypergeometric distribution.
Committee Selection
Choosing a committee of 5 from 20 people: ways.
But choosing a president, vice president, and secretary from 20: ways.
Factorial Growth
Factorials grow extraordinarily fast:
| n | n! |
|---|---|
| 5 | 120 |
| 10 | 3,628,800 |
| 15 | 1,307,674,368,000 |
| 20 | 2,432,902,008,176,640,000 |
This rapid growth explains why brute-force solutions to combinatorial problems quickly become computationally infeasible.
Common Formulas Summary
| Scenario | Formula |
|---|---|
| Permutations (no repetition) | |
| Permutations (with repetition) | |
| Combinations (no repetition) | |
| Combinations (with repetition) |
Connection to Probability
Combinations are essential for calculating probabilities. The binomial probability formula uses combinations:
Similarly, the hypergeometric distribution relies heavily on combinations for sampling without replacement.
Related Calculations
- Binomial Probability Calculator β Uses combinations for probability
- Hypergeometric Distribution Calculator β Sampling without replacement
- Expected Value Calculator β Probability-weighted outcomes
- Random Number Generator β Generate random selections
Summary
Combinations and permutations form the foundation of counting theory and probability. The choice between them depends on whether order matters in your specific problem. Permutations count arrangements where sequence is significant; combinations count selections where it isn't. Mastering these concepts unlocks the ability to calculate probabilities and enumerate possibilities across countless applications.