Uni-Sine
MathematicsProbability

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.

Try it

Permutations and Combinations Calculator

Count arrangements and selections with nPr and nCr

Go to its page

How to use the permutation calculator

  1. Open the Permutations and Combinations Calculator. Under Count, keep Choose r from n.
  2. Type Things to choose from, n and Number chosen, r, each up to 1,000.
  3. Keep Order matters on: that is what makes it a permutation, and it is on when the calculator opens.
  4. Turn on Things can repeat if an item can be used more than once, as with the digits of a PIN.
  5. 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.
  6. To count the arrangements of a word, choose Arrange a word and type it.

The permutations formula

{}^{n}P_{r} = \frac{n!}{(n - r)!} = n \times (n - 1) \times \dots \times (n - r + 1)

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 mattersOrder doesn't matter
No repeatsPermutation: n! ÷ (n − r)!Combination: n! ÷ (r!(n − r)!)
Repeats allowednʳ(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:

\frac{6!}{3!\ 2!} = \frac{720}{6 \times 2} = 60

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

practice
Pick an answer, then check it.
In how many ways can 3 of 6 people sit in a row of 3 chairs?

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?
nPr = n! ÷ (n − r)!, the number of ordered arrangements of r items from n different items with no repeats. With repeats allowed it is nʳ.
What is the difference between a permutation and a combination?
In a permutation the order matters; in a combination it doesn't. ABC and CBA are two permutations but one combination.
How do you calculate permutations with repetition?
Multiply n by itself r times: nʳ. A 3-letter code from 26 letters with repeats allowed has 26³ = 17,576 possibilities.
How do you find the number of arrangements of a word?
Divide the factorial of the number of letters by the factorial of each letter's repeat count. BANANA has 6!/(3! 2!) = 60.
What is 0 factorial?
1, by definition. It makes formulas like nPn = n!/0! = n! work.

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
Read next
Maths · ProbabilityCombination calculator: nCr with and without repetitionWork out nCr, the number of ways to choose r items from n when order does not matter, with or without repetition, plus worked examples to check.