Permutation and Combination Calculator
Count the ways to pick or arrange things, with every step shown. Work out nPr and nCr with or without repeats, arrange the letters of any word, seat people round a table, and find huge factorials exactly. You can also list every arrangement and see the chance of one outcome.
Example: 10 runners, prizes for 1st, 2nd and 3rd. Whole numbers only; 1,000 and 1e6 work too.
Separate with commas, spaces or new lines. A single word like ABCDE becomes its letters. If you type items, n is how many you typed.
Letters that repeat are counted for you.
For example 3 red, 2 blue and 1 green ball: type 3, 2, 1.
Exact up to 50,000! (213,237 digits). Bigger, up to 1,000,000,000!, is shown in scientific notation.
How your answer is worked out
Your numbers: fill the spots one by one, then decide if the order counts.
- 1
Count the choices
10 items3 spots to fillorder matters
- 2
Fill each spot
10 × 9 × 81 fewer each time= 720
- 3
Keep the order
ABC and CBAcount separately10P3 = 720
- 4
Your answer
720 wayschance of one:1 in 720
Read more: the formulas, worked examples, which one to use and tables
A permutation counts arrangements where the order matters (1st, 2nd and 3rd place, a PIN, seats in a row). A combination counts groups where only who is in it matters (a team, a lottery ticket, pizza toppings). Both start the same way: fill one spot at a time, with one fewer choice each time. For a combination you then divide by the number of orders each group can be put in.
The formula
n! = n × (n − 1) × … × 2 × 1, and 0! = 1
Permutations, no repeats: nPr = n! ÷ (n − r)!
Combinations, no repeats: nCr = n! ÷ (r! × (n − r)!) = nPr ÷ r!
Permutations with repeats: n^r
Combinations with repeats: (n + r − 1)Cr = (n + r − 1)! ÷ (r! × (n − 1)!)
Letters of a word (or items with repeats): n! ÷ (k1! × k2! × …), where k1, k2 … are how many times each letter appears
Round a circle: (n − 1)!, or nPr ÷ r for r of n seats; halve it if a flipped circle is the same
Chance of one exact outcome = 1 ÷ number of ways
Worked example
Permutations (the default): 10 runners, prizes for 1st, 2nd and 3rd. n = 10 and r = 3. 10P3 = 10! ÷ 7! = 10 × 9 × 8 = 720. There are 10 choices for 1st, then 9 left for 2nd, then 8 for 3rd.
Combinations: if the 3 just win the same prize, the order no longer matters. Each group of 3 can be put in 3! = 3 × 2 × 1 = 6 orders, so 10C3 = 720 ÷ 6 = 120.
With repeats: a 3-digit code from 10 digits is 103 = 10 × 10 × 10 = 1,000. Choosing 3 scoops from 10 flavours with repeats allowed is (10 + 3 − 1)C3 = 12C3 = (12 × 11 × 10) ÷ 6 = 1,320 ÷ 6 = 220.
Letters of a word: MISSISSIPPI has 11 letters: I × 4, S × 4, P × 2 and M × 1. 11! = 39,916,800 and 4! × 4! × 2! = 24 × 24 × 2 = 1,152, so there are 39,916,800 ÷ 1,152 = 34,650 arrangements. Using only 4 of its letters gives 176 different 4-letter arrangements, made from 21 different selections.
Round a circle: 6 people at a round table: 6! = 720 in a line, and each circle is counted 6 times (once for each turn), so 720 ÷ 6 = 5! = 120. As beads on a necklace, where flipping it over gives the same thing, it is 120 ÷ 2 = 60.
Factorial: 10! = 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 3,628,800, which has 7 digits and ends in 2 zeros.
Which one do I need?
| Question | Order matters? | Repeats? | Use |
|---|---|---|---|
| 1st, 2nd, 3rd from 10 runners | Yes | No | 10P3 = 720 |
| A team of 3 from 10 people | No | No | 10C3 = 120 |
| A 4-digit PIN | Yes | Yes | 104 = 10,000 |
| 3 scoops from 10 flavours | No | Yes | 12C3 = 220 |
| A 6 from 49 lottery ticket | No | No | 49C6 = 13,983,816 |
| A 5-card poker hand | No | No | 52C5 = 2,598,960 |
| Arranging the letters of BANANA | Yes | Letters repeat | 6! ÷ (3! × 2!) = 60 |
| 6 people at a round table | Yes (round) | No | 5! = 120 |
Handy values
| n | n! | nC2 | nC3 |
|---|---|---|---|
| 4 | 24 | 6 | 4 |
| 5 | 120 | 10 | 10 |
| 6 | 720 | 15 | 20 |
| 8 | 40,320 | 28 | 56 |
| 10 | 3,628,800 | 45 | 120 |
| 12 | 479,001,600 | 66 | 220 |
Notes
- nCr = nC(n − r): choosing 3 to take is the same as choosing the 7 to leave, so 10C3 = 10C7 = 120.
- Vowels together: treat all the vowels as one block, arrange the block with the other letters, then arrange the vowels inside the block. MISSISSIPPI with its four I's together has 8! ÷ (4! × 2!) = 840 arrangements.
- Lottery "match exactly m": (rCm × (n − r)C(r − m)) ÷ nCr. For 6 from 49, matching exactly 3 is (20 × 12,341) ÷ 13,983,816 ≈ 1.765%.
Answers are exact whole numbers while the work needs up to 50,000 multiplications (for example 50,000! with all 213,237 digits, or 100,000C40,000). Beyond that the answer comes from Stirling's formula for log n! and is shown in scientific notation with only the significant figures that can be trusted (fewer as n gets huge). Lists show the first 2,000 arrangements.
Common questions
What is the difference between a permutation and a combination?
In a permutation the order matters, so ABC and CBA count as two different results. In a combination only the group matters, so they count once. Picking 3 from 10 gives 10P3 = 720 ordered results but only 10C3 = 120 groups, because each group of 3 can be put in 3! = 6 orders, and 720 ÷ 6 = 120.
How do you work out nPr and nCr?
nPr = n! ÷ (n − r)!, which is the same as multiplying r numbers counting down from n. So 10P3 = 10 × 9 × 8 = 720. nCr = n! ÷ (r! × (n − r)!), which is nPr divided by r!. So 10C3 = 720 ÷ 6 = 120.
How many ways can the letters of MISSISSIPPI be arranged?
MISSISSIPPI has 11 letters: four I, four S, two P and one M. If every letter were different there would be 11! = 39,916,800 orders. Swapping identical letters changes nothing, so divide by 4! × 4! × 2! = 1,152. That gives 39,916,800 ÷ 1,152 = 34,650 different arrangements.
What is the formula for circular permutations?
n different things around a circle can be arranged in (n − 1)! ways, because turning the whole circle does not make a new arrangement. Six people at a round table gives 5! = 120. If flipping the circle over also counts as the same, as with beads on a necklace, divide by 2 again: 60.
What does "with repetition" mean?
It means the same item can be picked more than once, like digits in a PIN. With order mattering the count is nʳ, so a 4-digit PIN has 10⁴ = 10,000 options. With order not mattering it is (n + r − 1)Cr, so choosing 3 scoops from 10 flavours, repeats allowed, gives 12C3 = 220.
What are the odds of winning a 6 from 49 lottery?
The draw is a combination, because the order of the balls does not matter. There are 49C6 = 13,983,816 possible tickets, so one ticket has a 1 in 13,983,816 chance of matching all six. Matching exactly three is far easier: 20 × 12,341 = 246,820 winning draws, about 1.765%.
Related calculators
Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.