Permutations & Combinations Calculator - nPr and nCr
Math Calculators
Calculate permutations P(n,r) and combinations C(n,r) with step-by-step factorial work. Supports large values with BigInt arithmetic.
P(10,3) - Permutations
720
Order matters
C(10,3) - Combinations
120
Order doesn't matter
Formulas
P(10,3) = 10! / (10-3)! = 10! / 7!
C(10,3) = 10! / (3! × 7!) = P(10,3) / 3!
Steps
- nPr numerator: 10 × 9 × 8 = 720
- r! = 3! = 6
- nCr = 720 ÷ 6 = 120
| Item | Value |
|---|---|
| P(10,3) | 720 |
| C(10,3) | 120 |
How to use this tool
- Enter n and r. n is the total number of items; r is the number to choose or arrange. Both must be non-negative integers with r ≤ n.
- Read the results. Both nPr (permutations) and nCr (combinations) are calculated with step-by-step work shown.
Permutations vs. combinations
Permutations P(n, r) count ordered arrangements: picking a president, vice president, and secretary from 10 candidates is a permutation because the roles are distinct. Combinations C(n, r) count unordered selections: choosing 3 players from 10 for a team is a combination because the order of selection doesn't matter.
Formulas
P(n, r) = n! / (n − r)!: multiply n down to (n − r + 1).
C(n, r) = n! / (r! × (n − r)!): also written as the binomial coefficient "n choose r".
Example: poker hands
A standard 5-card hand dealt from a 52-card deck: C(52, 5) = 2,598,960. Since the cards in a hand are unordered, combinations are used, not permutations.
Real-world problems guide
| Scenario | Ordered? | Use |
|---|---|---|
| Selecting a committee of 3 from 10 people | No | C(10, 3) = 120 |
| Arranging 4 books on a shelf from 8 choices | Yes | P(8, 4) = 1,680 |
| 4-digit PIN from digits 0–9 (no repeats) | Yes | P(10, 4) = 5,040 |
| Lottery: pick 6 numbers from 49 | No | C(49, 6) = 13,983,816 |
| How many ways to rank 1st, 2nd, 3rd from 20 runners? | Yes | P(20, 3) = 6,840 |
Combinations with repetition
When repetition is allowed (you can choose the same item more than once) and order doesn't matter, the count is the "multiset coefficient": C(n + r − 1, r). For example, choosing 3 flavors from 5 options with repetition allowed = C(5 + 3 − 1, 3) = C(7, 3) = 35. This covers scenarios like choosing 3 scoops of ice cream where you can pick the same flavor multiple times.
Why n! grows so fast
Factorial growth is faster than exponential growth. 10! = 3,628,800. 20! ≈ 2.4 × 10¹⁸ - larger than the number of seconds in the age of the universe. 52! (the number of ways to shuffle a standard deck of cards) ≈ 8 × 10⁶⁷ - more than the number of atoms in the observable universe. This is why brute-force search of large combinatorial spaces is computationally infeasible.
Frequently asked questions
What is the difference between permutations and combinations?
Permutations count ordered arrangements - the order of selection matters. Combinations count unordered selections - the order does not matter. For example, choosing 2 letters from {A, B, C}: AB and BA are different permutations but the same combination.
What is the permutation formula?
P(n, r) = n! / (n − r)!. This counts the number of ways to arrange r items chosen from n distinct items.
What is the combination formula?
C(n, r) = n! / (r! × (n − r)!). Also written as "n choose r". This counts the number of ways to choose r items from n items without regard to order.
What does r = 0 mean?
Both P(n, 0) and C(n, 0) equal 1. There is exactly one way to arrange or choose nothing.
Related tools
- Probability CalculatorTurn favorable and total outcome counts into event probabilities.
- Dice ProbabilityApply counting ideas to exact sums and target odds for common dice notation.
- Birthday ParadoxSee combinations create unexpectedly high collision odds in a group.
- Poker OddsApply combinations to five-card hand counts and category probabilities.