Permutation & Combination Calculator
- Permutation nPr = n! / (n−r)! = 5! / 2!
- 5P3 = 5 × 4 × 3 = 60
- Combination nCr = n! / [r!(n−r)!] = 5! / [3! × 2!]
- 5C3 = 10
- Permutation with repetition = nʳ = 5^3 = 125
- Combination with repetition = (5+3−1)C3 = 7C3 = 35
| Formula | Result |
|---|---|
| 5P3 | 60 |
| 5C3 | 10 |
| 5^3 (rep.) | 125 |
| (5+3−1)C3 | 35 |
nPr = n!/(n−r)! · nCr = n!/[r!(n−r)!]
Permutations vs Combinations
Counting problems ask how many ways you can arrange or select items from a set. Permutations count ordered arrangements — the sequence matters. Combinations count unordered selections — only the chosen group matters, not the order picked. Choosing a committee of three from ten people is a combination; assigning president, vice-president, and treasurer from the same ten is a permutation because each role is distinct.
The permutation formula nPr = n! / (n − r)! counts ways to arrange r items chosen from n distinct items without repetition. For example, 5P3 = 5! / 2! = (5 × 4 × 3) = 60 — the number of three-letter "codes" from five distinct letters where ABC differs from CBA. The combination formula nCr = n! / [r! × (n − r)!] divides out redundant orderings: 5C3 = 5! / (3! × 2!) = 10. The same ten ways to pick three people appear in 5P3 as sixty ordered triples because 3! = 6 orderings per group.
Factorials grow explosively: 10! = 3,628,800. That is why 10C5 = 252 and 10P3 = 720 are common textbook benchmarks. Larger values like 20C10 are computed with cancellation before multiplying to avoid overflow. This calculator uses exact integer arithmetic for moderate n and shows the factorial cancellation steps so you can follow the algebra.
Repetition variants extend the basic formulas. Permutations with repetition n^r count passwords or PINs where digits may repeat — 10^4 = 10,000 four-digit codes from ten digits. Combinations with repetition (stars and bars) count multisets: choosing r items from n types with unlimited supply uses C(n + r − 1, r). Lottery problems, password strength, seating arrangements, and poker hand counts all reduce to nPr or nCr once you identify whether order matters and whether items can repeat.
Key decision checklist: (1) Does order matter? Yes → permutation; No → combination. (2) Is repetition allowed? Adjust the formula accordingly. (3) Are all items distinct? Identical items require multinomial coefficients. The relationship nPr = nCr × r! always holds because each combination of r items can be arranged in r! orders.
Connect counting to probability via the probability calculator: divide favorable arrangements by total arrangements. For hypergeometric sampling without replacement, combinations appear in both numerator and denominator. Master nPr and nCr and you unlock most introductory combinatorics, discrete probability, and statistical test setup problems.
Sanity-check your mode selection with small examples before trusting large outputs. If you are choosing 3 toppings from 8 menu items, order does not matter — use 8C3 = 56, not 8P3 = 336. If you are assigning gold, silver, and bronze medals to 8 athletes, order among the three medalists matters — use 8P3 = 336. Writing the problem in words before opening the calculator prevents the most common combinatorics mistake in homework and exam settings.
Examples
| Example | Result |
|---|---|
| 5P3 (permutation) | 60 |
| 5C3 (combination) | 10 |
| 10C5 | 252 |
| 10P3 | 720 |
| 6C2 | 15 |
| 8P2 | 56 |
| 7C3 | 35 |
Frequently asked questions
Use permutations when order matters (rankings, passwords with position). Use combinations when order does not matter (committees, lottery sets).
Each group of 3 can be arranged in 3! = 6 orders. Dividing 60 by 6 gives 10 combinations.
No for standard nPr and nCr without repetition. You cannot pick 5 distinct items from 3.