Combination and Permutation Calculator
Calculate nCr and nPr with step-by-step factorial breakdowns. Understand when order matters.
Combination and Permutation Calculator tool
Example
Input: n = 52 cards, r = 5 (five-card poker hands)
Result: 52C5 = 2,598,960 combinations; 52P5 = 311,875,200 permutations
52P5 = 52 x 51 x 50 x 49 x 48 = 311,875,200 ordered hands; dividing by 5! = 120 removes the order: 311,875,200 / 120 = 2,598,960.
Common Combinations and Permutations
| Situation | n and r | Combinations (nCr) | Permutations (nPr) |
|---|---|---|---|
| Pick 2 of 5 people | n = 5, r = 2 | 10 | 20 |
| Top 3 of 10 runners | n = 10, r = 3 | 120 | 720 |
| Two-card hands | n = 52, r = 2 | 1,326 | 2,652 |
| Five-card poker hands | n = 52, r = 5 | 2,598,960 | 311,875,200 |
| 6 of 49 lottery | n = 49, r = 6 | 13,983,816 | 10,068,347,520 |
| 5 of 69 (Powerball white balls) | n = 69, r = 5 | 11,238,513 | 1,348,621,560 |
| 3-letter codes, no repeats | n = 26, r = 3 | 2,600 | 15,600 |
Exact values from this calculator. Use combinations when order does not matter.
- Enter the total number of items (n) in the set you are choosing from.
- Enter the number of items (r) you are selecting or arranging.
- See permutations (order matters) and combinations (order does not matter) calculated together, plus both counts with repetition allowed.
- Review the results along with the step-by-step factorial expansion and cancellation for nPr and nCr.
- Compare the nCr and nPr values side by side to understand the impact of ordering on the count.
When Order Matters: nCr vs nPr
A combination counts how many ways you can choose r items from n when order does not matter. A permutation counts the ways when order does matter. Choosing 3 people from 10 gives 120 combinations but 720 permutations, because each group of 3 can be lined up in 6 orders. Enter n and r, and this calculator gives both, with the factorial steps written out.
The key question is whether swapping two picks makes a different result. Picking a committee, a hand of cards or lottery numbers is a combination, since the same members in another order are the same group. Awarding gold, silver and bronze is a permutation, since the order changes the outcome. That is why lottery odds use combinations. A 6-from-49 draw has 13,983,816 possible tickets.
The calculator also covers choices where repeats are allowed. Permutations with repetition are n^r. A 4-digit PIN has 10^4 = 10,000 possibilities, because each digit can be anything. Combinations with repetition count selections like 3 scoops of ice cream from 5 flavors, where you may pick a flavor twice. There are 35 such choices.
The step lines show how each answer is built. For 10P3 the tool multiplies 10 x 9 x 8 = 720. For 10C3 it divides that by 3!, which is 6, to get 120. The math is exact for any n up to 170. Answers longer than 20 digits are shown in scientific form with their digit count, since 170! alone has 307 digits. If r is larger than n, the plain versions are undefined, but the versions with repetition still work.
To turn a count into a chance, such as 1 in 13,983,816, use the Probability Calculator.
Formula / How It Works
Sources
Frequently Asked Questions
Related Tools
Probability Calculator
Calculate basic, conditional, and Bayesian probability with odds, an independence check, and a Bayes breakdown.
Statistics and DataNormal Distribution Calculator
Calculate z-scores, percentiles, and probabilities with a bell curve that shades the area below your value.
Statistics and DataRandom Number Generator
Generate random numbers within a range with options for count, uniqueness, and sorting.
Math and NumbersPercentage Calculator
Calculate percentages, percentage change, difference, increase, and decrease instantly.
Math and Numbers