Combinations & Permutations Calculator
Combinations & Permutations Calculator. Free online calculator with formula, examples and step-by-step guide.
Combinations & Permutations Calculator
This calculator determines the number of ways to select and arrange elements from a set, distinguishing between permutations (order matters) and combinations (order does not matter).
Formulas
The fundamental formulas are:
- Permutations P(n,r): P(n,r) = n! / (n−r)!
- Combinations C(n,r): C(n,r) = n! / (r! × (n−r)!)
Where n is the total number of elements and r is the number of elements selected. The factorial n! = n × (n−1) × ... × 2 × 1.
Example 1: permutations
Problem: In how many ways can you arrange 3 books from a shelf of 8?
- Calculation:
- P(8,3) = 8! / (8−3)! = 8! / 5! = 8 × 7 × 6 = 336.
Answer: 336 different arrangements.
Example 2: combinations
Problem: In how many ways can you choose 3 people from a group of 8?
- Calculation:
- C(8,3) = 8! / (3! × 5!) = (8 × 7 × 6) / (3 × 2 × 1) = 56.
Answer: 56 different groups.
Common uses
- Computing probabilities in games of chance and lotteries.
- Designing experiments and statistical sampling.
- Analyzing possibilities in optimization problems.
- Solving probability problems in education.
- Computing possible passwords in computer security.
- Planning schedules and resource assignments.
Common mistakes
- Using combinations when order matters (should be permutation).
- Using permutations when order does not matter (should be combination).
- Computing factorials of very large numbers without simplification.
- Not verifying that r ≤ n (you cannot select more elements than available).
Pro tip
The key question is: does order matter? If yes, use permutations. If no, use combinations. For example, in a lottery order does not matter (combination), but in a horse race it does (permutation).
If the order of selection matters (like a password), use permutations. If only which elements are selected matters (like a team), use combinations.
P(n,n) = n! (all possible arrangements). C(n,n) = 1 (there is only one way to select all elements).
n! is the product of all positive integers from 1 to n. For example, 5! = 5×4×3×2×1 = 120. By definition, 0! = 1.
These formulas are without repetition. With repetition, the formulas change: combinations with repetition = C(n+r−1, r).