Permutation & Combination Calculator
Calculate combinations (nCr = n! / [r!(n-r)!]) and permutations (nPr = n! / (n-r)!) with or without repetitions, arbitrary precision BigInt factorials, and interactive Pascal's triangle visualizers.
Combinatorics Settings
Step-by-Step Combinatorics Derivation & Factorial Cancellation
How to Calculate Permutations and Combinations
To find combinations nCr (order does NOT matter), calculate n! / [r!(n − r)!]. To find permutations nPr (order DOES matter), calculate n! / (n − r)!. The relationship is nPr = nCr × r!.
Permutations vs. Combinations: When Does Order Matter?
In combinatorics, the crucial question before solving any counting problem is whether the arrangement sequence changes the outcome:
Choosing a group: {A, B, C} is identical to {C, B, A}. Examples: card hands, lottery tickets, pizza toppings, committees.
Sequencing items: (A, B, C) is different from (C, B, A). Examples: race podiums, ATM PIN passwords, batting orders, seating arrangements.
The Mathematical Formulas & Factorial Mechanics
| Type | Formula | Example (n=5, r=3) |
|---|---|---|
| Permutations (No Repetition) | n! / (n − r)! | 5! / 2! = 60 |
| Combinations (No Repetition) | n! / [r! (n − r)!] | 5! / (3! × 2!) = 10 |
| Permutations (With Repetition) | nʳ | 5³ = 125 |
| Combinations (With Repetition) | (n + r − 1)! / [r! (n − 1)!] | 7! / (3! × 4!) = 35 |
Real-World Applications of Combinatorics
Lottery & Gaming Probability
Casino card games (Blackjack, Poker) and state lotteries use combinations ($nCr$) to calculate exact house odds and expected return values.
Cybersecurity & Passwords
Password entropy calculations use permutations with repetition ($94^12 \approx 4.7 \times 10^23$) to determine resistance against brute-force attacks.
Genetics & DNA Codons
Molecular biology uses 4 nucleotide bases (A, T, C, G) in triplets ($4^3 = 64$ codons) to encode all 20 essential amino acids.
Step-by-Step Worked Numerical Solutions
Problem: In how many ways can a 4-person committee be chosen from a department of 10 people?
Common Pitfalls & Mistakes
Using nPr for Committees
Unless committee members have specific distinct titles (President, VP, Secretary), you must use combinations ($nCr$).
Assuming 0! = 0
0! is defined as 1; setting 0! = 0 results in catastrophic division by zero errors.
Allowing r > n without Repetition
Without repetition, you cannot choose more items than exist in the set (e.g. 5 C 7 = 0).
Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.
Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.