Permutations and Combinations Calculator (nPr, nCr, With Working)
nPr and nCr with the factorials written out, plus the counts when repetition is allowed.
Inputs
- 10C3 — order doesn't matter
- 120
- Permutation working
- 10P3 = 10! ÷ (10 − 3)! = 10 × 9 × 8 = 720
- Combination working
- 10C3 = 10P3 ÷ 3! = 720 ÷ 6 = 120
- With repetition allowed
- 10^3 = 1,000 ordered; C(10 + 3 − 1, 3) = 220 unordered
Use this calculator on your own site
Free embed
- Two lines of HTML, unlimited views
- Shows a small CalculateEveryday bar, with a credit link under the calculator
What each Permutations and Combinations input means
- n (total items)
- The total number of distinct items to choose from: 10 runners, 52 cards, 49 lottery balls. Up to 170. Every count is worked out exactly; past 21 digits it is shown in scientific notation.
- r (chosen items)
- How many you pick or arrange. It cannot be more than n when each item is used once; for repeats — PIN codes, dice, scoops of the same flavour — read the last result line.
Permutations and Combinations formula
nPr = n! ÷ (n − r)! · nCr = n! ÷ (r! × (n − r)!) = nPr ÷ r!
A permutation counts arrangements where order matters: choosing r of n items for first, second, third place gives n × (n − 1) × … — r factors — which is n! ÷ (n − r)!. A combination counts selections where order does not matter, so every group of r items that the permutation counted r! times is counted once: nCr = nPr ÷ r!. OpenStax's examples are a professor arranging 9 of 12 exam questions — P(12, 9) = 79,833,600 — and a diner choosing 2 of 5 sides — C(5, 2) = 10. The page writes out the factors, the division by r!, and also the counts when items can repeat: n^r ordered and C(n + r − 1, r) unordered.
Permutations and Combinations worked example
From 10 runners, the ways to award gold, silver and bronze — order matters — are 10 × 9 × 8 = 720. The ways to pick any 3 for a relay team, where order doesn't matter, divide that by 3! = 6: 120. If the same item can be picked more than once, as with a 3-digit code from 10 digits, it is 10³ = 1,000.
More Permutations and Combinations examples
Poker hands: 5 cards from a 52-card deck. Dealt in order there are 52 × 51 × 50 × 49 × 48 = 311,875,200 sequences. A hand ignores order, so divide by 5! = 120: 2,598,960 different hands.
OpenStax's diner choosing 2 of 5 side dishes: 5C2 = 10 combinations. If the order mattered — a first side and a second — there would be 5 × 4 = 20 permutations, each pair counted twice.
Where the Permutations and Combinations calculator can give the wrong answer
- r cannot be larger than n when each item can be used once.
- nC0 and nCn are both 1: there is one way to choose nothing and one way to choose everything.
- n is capped at 170 because 171! is too large for an ordinary computer number; the results above about 10²¹ are shown in scientific notation.
- Arrangements of letters with repeats (like DISTINCT) divide by the repeats' factorials: 8! ÷ (2! × 2!) = 10,080 — a different formula from the ones here.
Spotted a mistake? Tell us
Permutations and Combinations reference table
| n | r = 0 | r = 1 | r = 2 | r = 3 | r = 4 | r = 5 | r = 6 |
|---|---|---|---|---|---|---|---|
| 3 | 1 | 3 | 3 | 1 | — | — | — |
| 4 | 1 | 4 | 6 | 4 | 1 | — | — |
| 5 | 1 | 5 | 10 | 10 | 5 | 1 | — |
| 6 | 1 | 6 | 15 | 20 | 15 | 6 | 1 |
| 7 | 1 | 7 | 21 | 35 | 35 | 21 | 7 |
| 8 | 1 | 8 | 28 | 56 | 70 | 56 | 28 |
| 9 | 1 | 9 | 36 | 84 | 126 | 126 | 84 |
| 10 | 1 | 10 | 45 | 120 | 210 | 252 | 210 |
Permutations and Combinations FAQ
- Order. A permutation counts arrangements (first, second, third), a combination counts groups. 10P3 = 720 but 10C3 = 120, because each group of 3 can be ordered 6 ways.
- Multiply r numbers counting down from n. 8P3 = 8 × 7 × 6 = 336.
- Work out the permutations and divide by r!. 8C3 = 336 ÷ 6 = 56.
- For a game picking 6 of 49 numbers in any order, 49C6 = 13,983,816. Enter n = 49 and r = 6.
- 10,000: each of the 4 places can be any of 10 digits and repeats are allowed, so 10⁴. Enter n = 10 and r = 4 and read the 'with repetition' line. 10P4 = 5,040 counts only the PINs with no digit repeated.
- Most scientific calculators have an nCr key: type n, press nCr, type r. In Excel or Google Sheets, =COMBIN(n, r) and =PERMUT(n, r) do the same. By hand, multiply r numbers counting down from n and divide by r!.
- 8! = 40,320: enter n = 8 and r = 8. Arranging all n items in order is n factorial. Choosing all of them without order, 8C8, is 1 — there is only one group that contains everyone.