Permutation and Combination Calculator
Calculate permutations (nPr) and combinations (nCr) to find the number of ways to choose or arrange items. Free combinatorics calculator.
Enter Values
Fill in the fields and press Calculate to see instant results.
Introduction to Permutations and Combinations
The Permutation and Combination Calculator is an advanced combinatorics tool that determines exactly how many ways you can arrange or choose items from a set.
While the math involves incredibly large numbers and factorials, the core concept is simple: how many possibilities exist? This free online calculator takes your total pool of items (n) and the amount you want to select (r), and instantly computes the results for permutations and combinations, with or without repetition.
When to Use This Calculator
Combinatorics is the mathematical backbone of probability, cryptography, and logistics. Use this tool when:
- Creating Passwords: Determining how many possible unique passwords exist if a system requires exactly 8 alphanumeric characters.
- Lottery Odds: Calculating your exact chances of winning the Powerball by finding the combination of 5 winning numbers out of a pool of 69.
- Event Planning: Figuring out how many different ways you can seat 10 specific guests at a round table of 5 chairs.
- Tournament Brackets: Discovering how many unique match-ups are possible in a round-robin sports tournament.
Formula Explanations
The formulas rely heavily on factorials (denoted by an exclamation point, e.g., 5! = 5 × 4 × 3 × 2 × 1).
Permutation (No Repetition) - Order Matters
Use when picking a President, VP, and Secretary from a group of 10 people.
Combination (No Repetition) - Order Does NOT Matter
Use when picking a 3-person committee from a group of 10 people.
Variable Definitions
- n: The total number of unique items available to choose from.
- r: The number of items being chosen or arranged.
- ! (Factorial): The product of an integer and all the integers below it.
Mnemonic: Permutations are for Passwords (order matters). Combinations are for Coin collections (order doesn't matter).
Step-by-Step Calculation Guide
Define VariablesIdentify n (total) and r (chosen).
Factorial of nCalculate n! (this number gets huge very fast).
Factorial of (n-r)Subtract r from n, and calculate the factorial of that result.
Divide for PermutationDivide n! by (n-r)!
Adjust for CombinationTake the Permutation result and divide it by r! to remove duplicate arrangements.
Worked Examples
Let's explore common scenarios to see how drastically the numbers change based on the rules.
Example 1: The Race (Permutations)
Given Inputs
| Input | Value |
|---|---|
| Scenario | 8 horses in a race. How many ways can they finish 1st, 2nd, and 3rd? |
| n (Total Horses) | 8 |
| r (Medals) | 3 |
| Rule | Order matters. No repetition. |
Calculation Steps
- n!= 8! = 40,320
- (n - r)!= (8 - 3)! = 5! = 120
- Calculate= 40,320 / 120 = 336
Results
Possible Outcomes
336
Example 2: The Committee (Combinations)
Given Inputs
| Input | Value |
|---|---|
| Scenario | Choosing 3 people for a generic committee from a group of 8. |
| n (Total People) | 8 |
| r (Committee Size) | 3 |
| Rule | Order DOES NOT matter. No repetition. |
Calculation Steps
- Permutation Base= 336 (from Example 1)
- r!= 3! = 3 * 2 * 1 = 6
- Divide out duplicates= 336 / 6 = 56
Results
Possible Committees
56
Example 3: The Lottery
Given Inputs
| Input | Value |
|---|---|
| Scenario | Choosing 6 winning numbers from a pool of 49. Order doesn't matter. |
| n | 49 |
| r | 6 |
Calculation Steps
- n!= 49! (A massive number)
- Denominator= 6! * (49-6)!
- Simplify= (49*48*47*46*45*44) / (6*5*4*3*2*1)
Results
Possible Tickets
13,983,816
Probability of Winning
1 in 13.98 Million
Example 4: A Digital Password (With Repetition)
Given Inputs
| Input | Value |
|---|---|
| Scenario | A 4-digit PIN code using numbers 0-9. Repetition is allowed. |
| n | 10 (digits 0 through 9) |
| r | 4 (length of PIN) |
Calculation Steps
- Rule Change= Because repetition is allowed, the formula is simply n^r.
- Calculate= 10^4 = 10 * 10 * 10 * 10
Results
Possible PINs
10,000
Common Mistakes
Avoid these combinatorics errors:
- The "Combination Lock" Paradox: The standard combination lock on a gym locker is misnamed. Because the order of the numbers matters (1-2-3 will not open a lock programmed for 3-2-1), it should actually be called a Permutation Lock.
- Confusing n and r: 'n' must always be the larger number (or equal to 'r') when repetition is not allowed. You cannot choose 10 items if you only have 5 items in the pool.
Tips and Best Practices
- 0! Equals 1: In mathematics, the factorial of zero (0!) is defined as 1. If you choose exactly 'n' items from a pool of 'n' items (so r=n), the denominator formula (n-n)! becomes 0!. Because it equals 1, the math works out perfectly instead of creating a divide-by-zero error.
- Watch for Overflows: Factorials grow exponentially faster than almost any other mathematical function. 70! is larger than the number of atoms in the observable universe. Most standard calculators will crash or return an "Overflow" error when calculating anything above 170!. Use this online calculator to handle the large-number math behind the scenes.
Conclusion
The Permutation and Combination Calculator effortlessly navigates the astronomical numbers inherent in combinatorics. By clearly defining whether order matters and whether repetition is allowed, you can use this free tool to instantly uncover the exact number of possibilities in any given scenario, from cryptographic security to game design.
Frequently Asked Questions
What is the main difference between a permutation and a combination?
In permutations, the order of items matters (e.g., a phone password). In combinations, the order does not matter (e.g., a hand of cards).
What does 'n' and 'r' stand for?
In both formulas (nPr and nCr), 'n' represents the total number of items available, and 'r' represents the number of items being chosen.
What is a factorial (!)?
A factorial (represented by an exclamation mark) is the product of an integer and all the integers below it. For example, 4! = 4 × 3 × 2 × 1 = 24.
When should I allow repetition?
Allow repetition when an item can be chosen multiple times. For example, a 3-digit combination lock allows repetition (e.g., 9-9-9), so it uses permutations with repetition.
Can 'r' be greater than 'n'?
If repetition is not allowed, 'r' cannot be greater than 'n' because you cannot choose more items than you have.
Related Calculators
People Also Calculate
People Also Calculate
Calculators visitors commonly use alongside this one.