🔢 Combination & Permutation Calculator
Calculate combinations (nCr), permutations (nPr), and factorials
Calculate Combination (nCr)
Calculate Permutation (nPr)
Calculate Factorial (n!)
Result
Calculation Steps
Understanding Combinations & Permutations
Combination (nCr) - Order Doesn't Matter
Combinations count the number of ways to select r items from n items where the order doesn't matter.
Example: Choosing 3 people from 10 for a committee: C(10,3) = 120 ways
Permutation (nPr) - Order Matters
Permutations count the number of ways to arrange r items from n items where order matters.
Example: Arranging 3 people from 10 in a line: P(10,3) = 720 ways
Factorial (n!)
The factorial of n is the product of all positive integers from 1 to n.
Example: 5! = 5 × 4 × 3 × 2 × 1 = 120
Special case: 0! = 1 (by definition)
Key Differences
Use Combinations when: Order doesn't matter (selecting a team, choosing lottery numbers)
Use Permutations when: Order matters (arranging books, password combinations, race positions)
Note: nPr is always greater than or equal to nCr because there are more ways to arrange items when order matters.
Properties
• C(n,0) = C(n,n) = 1
• C(n,r) = C(n, n-r)
• P(n,n) = n!
• P(n,r) = C(n,r) × r!
Frequently Asked Questions
When should I use combinations vs permutations?
▼Use combinations when order doesn't matter (selecting a team, choosing lottery numbers). Use permutations when order matters (arranging books on a shelf, password sequences, race positions). For example, choosing 3 people from 10 for a committee is a combination, but arranging those 3 people in specific positions is a permutation.
Why is nPr always greater than or equal to nCr?
▼Permutations count more arrangements because order matters. For the same n and r, there are r! (r factorial) ways to arrange each combination. That's why P(n,r) = C(n,r) × r!. For example, C(5,3) = 10 combinations, but P(5,3) = 60 permutations because each combination can be arranged in 3! = 6 ways.
What is the maximum value I can calculate?
▼JavaScript can accurately calculate factorials up to about 170! before reaching infinity. For combinations and permutations, the calculator uses optimized algorithms to handle larger values by canceling terms before multiplication. Very large results are displayed in scientific notation (e.g., 1.23 × 10^15).
What does C(n,0) or C(n,n) equal?
▼Both equal 1. C(n,0) = 1 because there's exactly one way to choose nothing from n items (choose none). C(n,n) = 1 because there's exactly one way to choose all n items from n items (choose all). This is a fundamental property of combinations.
How do I calculate probability using combinations?
▼Probability = (favorable outcomes) / (total outcomes). For example, the probability of drawing 2 aces from a 52-card deck: favorable = C(4,2) = 6 ways to choose 2 aces from 4; total = C(52,2) = 1,326 ways to choose any 2 cards. Probability = 6/1,326 ≈ 0.45%.
What are real-world applications of combinations and permutations?
▼Combinations: lottery odds, poker hands, committee selection, quality control sampling. Permutations: password security (calculating possible passwords), scheduling (arranging tasks), seating arrangements, race results, DNA sequencing. Both are fundamental in probability, statistics, cryptography, and computer science.