Combination & Permutation Calculator
Calculate the number of combinations (nCr) and permutations (nPr) for any set of items. This calculator helps you solve counting problems in probability, statistics, and combinatorics. Enter the total number of items n and the number of items to choose r, and get instant results with detailed step-by-step explanations.
What Are Combinations and Permutations?
Combinations and permutations are two fundamental concepts in combinatorics — the branch of mathematics that deals with counting, arrangement, and combination of objects.
Combinations (nCr)
A combination is a selection of items from a set where the order does not matter. For example, choosing 3 toppings for a pizza from 10 available toppings — the order you choose them doesn't change the pizza. The number of combinations is denoted as C(n, r) or nCr.
Formula: C(n, r) = n! / (r! · (n − r)!)
Where n is the total number of items, r is the number chosen, and ! denotes factorial.
Permutations (nPr)
A permutation is an arrangement of items where the order matters. For example, assigning gold, silver, and bronze medals to 3 winners from a race of 10 runners — the order (who gets which medal) matters. The number of permutations is denoted as P(n, r) or nPr.
Formula: P(n, r) = n! / (n − r)!
Every combination corresponds to r! permutations, so P(n, r) = C(n, r) · r!.
Key Differences
| Feature | Combinations (nCr) | Permutations (nPr) |
|---|---|---|
| Order matters? | ❌ No | ✅ Yes |
| Formula | n! / (r! · (n−r)!) | n! / (n−r)! |
| Example | Choosing lottery numbers | Race podium positions |
| Always ≥? | C(n,r) ≤ P(n,r) | P(n,r) = C(n,r) × r! |
Real-World Applications
- Lottery & Gambling: Calculate odds of winning by counting possible combinations.
- Sports: Determine number of possible team lineups or tournament brackets.
- Cryptography: Count possible password or key combinations.
- Genetics: Calculate possible gene combinations in offspring.
- Computer Science: Analyze algorithm complexity and combinatorial problems.
Why Use This Calculator?
- Instant Results: Get nCr and nPr values immediately.
- Step-by-Step: See the factorial breakdown for complete understanding.
- Visual Comparison: Charts help you compare combinations vs. permutations.
- Quick Examples: Pre-loaded examples let you test common scenarios.
- Free & Private: No registration, no data storage.
❓ Combination & Permutation Calculator FAQ
What is the difference between combinations and permutations?
Combinations count selections where order does not matter (e.g., choosing a pizza topping). Permutations count arrangements where order matters (e.g., assigning 1st, 2nd, 3rd place).
What is the formula for combinations (nCr)?
The formula is C(n, r) = n! / (r! · (n − r)!). For example, C(5, 2) = 5! / (2! · 3!) = 10.
What is the formula for permutations (nPr)?
The formula is P(n, r) = n! / (n − r)!. For example, P(5, 2) = 5! / 3! = 20.
When should I use combinations vs. permutations?
Use combinations when the order of selection doesn't matter (e.g., choosing a committee). Use permutations when order matters (e.g., assigning roles or positions).
What is a factorial?
A factorial (denoted by !) is the product of all positive integers up to a given number. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By definition, 0! = 1.
What is the relationship between nCr and nPr?
P(n, r) = C(n, r) × r!. This means permutations are always larger than combinations for r > 1, because each combination can be arranged in r! different orders.
How do I calculate C(52, 5) for a poker hand?
Enter n = 52 and r = 5. The calculator shows there are 2,598,960 possible 5-card poker hands.
What is the maximum n value this calculator can handle?
This calculator can handle n up to 10,000 using optimized algorithms. However, very large factorials will be displayed in scientific notation.
Can I use this calculator for probability problems?
Yes, combinations and permutations are essential for calculating probabilities. For example, the probability of a specific poker hand is C(52, 5) / total possible hands.
Is this calculator free?
Yes, this calculator is completely free to use. No registration or personal data storage is required. All calculations are performed in your browser.