Permutation calculator: nPr, ordered arrangements
A permutation is an arrangement where the order matters. The number of ways to arrange r items chosen from n different ones is nPr = n! ÷ (n − r)!: n choices for the first place, n − 1 for the second, and so on for r places. So 5P3 = 5 × 4 × 3 = 60. This permutation calculator is our Permutations and Combinations Calculator, which gives the exact count with or without repetition, and also counts the arrangements of a word with repeated letters.
Permutations and Combinations Calculator
Count arrangements and selections with nPr and nCr
How to use the permutation calculator
- Open the Permutations and Combinations Calculator. Under Count, keep Choose r from n.
- Type Things to choose from, n and Number chosen, r, each up to 1,000.
- Keep Order matters on: that is what makes it a permutation, and it is on when the calculator opens.
- Turn on Things can repeat if an item can be used more than once, as with the digits of a PIN.
- Read the number of ways and the type of count, with every digit of long answers. The working shows the choices slot by slot, and small cases are listed in full.
- To count the arrangements of a word, choose Arrange a word and type it.
The permutations formula
It is the product of r numbers counting down from n. Arranging all n items is the special case r = n, which gives n!, because 0! = 1. With repetition allowed, every place has all n choices, so the count is nʳ.
| Order matters | Order doesn't matter | |
|---|---|---|
| No repeats | Permutation: n! ÷ (n − r)! | Combination: n! ÷ (r!(n − r)!) |
| Repeats allowed | nʳ | (n + r − 1)! ÷ (r!(n − 1)!) |
If the order doesn't matter, as when choosing a team, use a combination instead: the combination calculator guide covers it. Every combination of r items appears r! times among the permutations, so nCr = nPr ÷ r!.
Worked examples you can check in the calculator
Example 1: 5P3
With n = 5 and r = 3, the calculator's opening values, there are 5 choices for the first place, 4 for the second and 3 for the third: 5 × 4 × 3 = 60. With so few, it lists all 60 arrangements.
Example 2: first and second place
12 teams are in a league. In how many ways can the winner and the runner-up be decided? Order matters, since winning and coming second are different: 12P2 = 12 × 11 = 132.
Example 3: a PIN, with and without repeats
A 4-digit PIN uses the digits 0 to 9. If digits can repeat, each of the 4 places has 10 choices: 10⁴ = 10,000 PINs. If no digit can be used twice, it is 10P4 = 10 × 9 × 8 × 7 = 5,040. Toggle Things can repeat to switch between them.
Example 4: arranging everything
7 different books can be put on a shelf in 7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040 orders. Type n = 7 and r = 7.
Example 5: arrangements of a word with repeated letters
BANANA has 6 letters, but swapping the three As or the two Ns gives the same word. Divide by the orders of each repeated letter:
There are 60 different arrangements. The calculator's Arrange a word option opens on MISSISSIPPI, which has 11!/(4! 4! 2!) = 34,650.
Try one
Factorials grow fast
10! is 3,628,800, and 20! already has 19 digits. Ordinary calculators switch to standard form and round, but this one keeps every digit, and tells you how many digits a very long answer has. To work by hand, cancel before multiplying: 10P4 = 10!/6! = 10 × 9 × 8 × 7, without working out either factorial in full.
Common mistakes
- Using a permutation when order doesn't matter. Teams, groups and hands of cards are combinations.
- Forgetting repetition. Codes and PINs often allow repeats, which gives nʳ, not nPr.
- Multiplying too many numbers. nPr has exactly r factors, counting down from n.
- Not dividing for repeated letters. Arrangements of a word with repeated letters divide n! by the factorial of each repeat count.
- Thinking 0! = 0. 0! = 1, which is why nPn = n!.
Common questions
What is the formula for permutations?
What is the difference between a permutation and a combination?
How do you calculate permutations with repetition?
How do you find the number of arrangements of a word?
What is 0 factorial?
Revision cards
Read the front, say your answer, then flip to check.
Where to go next
- Solve it
Permutations and Combinations Calculator
Count arrangements and selections with nPr and nCr
Open the tool - Test it
Geometry, Algebra 2 & SAT Math
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper - Test it
AP Statistics
A new exam-style paper every day, with instant marking and a mark scheme
Start today's paper