Permutation Calculator
Eight runners in a final and three medals: the permutation calculator gives P(8, 3) = 8 × 7 × 6 = 336 ways to award gold, silver and bronze.
Permutations
- Formula
- P(n, r) = n! / (n - r)! = 8! / 5!
- Worked out
- Everything from 5 down cancels, leaving the top 3 factors: 8 × 7 × 6 = 336.
- Combinations, C(8, 3) P = C × r!. Each unordered group of 3 can be put in 6 orders, so the ordered count is 6 times larger.
- 56
- Chance of one particular outcome 0.297619%, if every arrangement is equally likely, as in a fair draw.
- 1 in 336
| Order matters | Order does not matter | |
|---|---|---|
| Each item at most once | P(8, 3) = 336 | C(8, 3) = 56 |
| Items can repeat | 8^3 = 512 | C(10, 3) = 120 |
- Every count is exact: whole-number arithmetic with no rounding, and no factorial is built only to be divided away.
How the Combination Calculator works
A permutation is an arrangement where order matters. The formula for permutations is P(n, r) = n! / (n - r)!, written nPr, for r items taken from n with no item used twice. For the medals in an 8-runner final it is 8! / 5! = 8 × 7 × 6 = 336. There are 8 choices for gold, then 7 runners left for silver, then 6 for bronze, and the multiplication principle multiplies them.
The factorial form looks heavier than it is. 8! is 40,320 and 5! is 120, and 40,320 / 120 = 336, but every factor from 5 down cancels before anything is multiplied, so the work is just the top r factors. The calculator shows that short product for every answer, and it stays exact for counts hundreds of digits long.
Arranging everything. When r equals n, the count is n!, the ways to order the whole set: 8 runners can finish in 8! = 40,320 orders, and a deck of 52 cards in 52!, a 68-digit number. The factorial calculator gives n! on its own with its digit count and trailing zeros.
With repetition. If an item can be used again, every position has all n choices and the count is n^r. A 3-letter code from 26 letters is 26^3 = 17,576, against P(26, 3) = 15,600 when no letter may repeat. A 4-digit PIN is 10^4 = 10,000. Pick "permutations with repetition" in the Count menu for those.
Permutation or combination? Swap two of the chosen items. If the outcome changes, as when two runners swap medals, order matters and it is a permutation. If it does not, as with two people on the same committee, it is a combination, and the count is smaller by a factor of r!. The 336 medal orders cover C(8, 3) = 56 sets of three medalists, each in 3! = 6 orders. The table under the result shows both counts, with and without repetition.
Repeated letters. The arrangements of a word with repeated letters are n! divided by the factorial of each letter's count, since swapping two identical letters changes nothing. MISSISSIPPI has 11! / (4! × 4! × 2!) = 34,650 distinct arrangements, not 11! = 39,916,800.
Combination Calculator FAQ
What is the formula for permutations?
P(n, r) = n! / (n - r)!. For 3 items from 8 it is 8! / 5! = 8 × 7 × 6 = 336. With repetition allowed it is n^r instead.
How do I calculate nPr by hand?
Multiply r numbers counting down from n. P(8, 3) = 8 × 7 × 6 = 336, and P(10, 4) = 10 × 9 × 8 × 7 = 5,040. The rest of the factorials cancel.
What is a permutation with repetition?
An arrangement where each position can take any of the n items again, like the digits of a PIN. The count is n^r: a 4-digit PIN has 10^4 = 10,000 possibilities.
How many ways can n things be arranged?
n!, which is P(n, n). Five books on a shelf can go in 5! = 120 orders, and 8 runners can finish in 40,320.