Saved

Press the star next to a tool's name to save it.

All my tools

Permutation Calculator

Use this permutation calculator to count ordered arrangements: r from n, repetition allowed, n factorial, or the distinct arrangements of a word such as MISSISSIPPI.

Restored your last values ·

Choose what to count. For a permutation without repetition, enter n items and r chosen, such as 52 and 5. For repetition allowed, you get n to the power r. For all arrangements of n items, you get n factorial. For a word such as MISSISSIPPI, or counts such as 1 4 4 2, you get the number of distinct arrangements.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Choose what to count, enter n and r (or a word), then press Calculate.

A permutation calculator counts the ways to arrange items in order. Enter n items and r places and it gives the number of permutations P(n, r). It also counts arrangements when repeats are allowed, all n! arrangements, and the distinct arrangements of a word with repeated letters such as MISSISSIPPI.

How to use the permutation calculator

  1. Choose what to count: r from n, repetition allowed, all n items, or a word with repeats.
  2. Enter n and r, or type a word, or list how many of each repeated item there are.
  3. Press Calculate. The answer is shown with its working, the matching number of combinations and n factorial.

What a permutation is

The Wikipedia article on permutations says that the number of permutations of n distinct objects is the product of the first n positive integers, called n factorial and written n!.[1] The six permutations of the set 1, 2, 3 are the six three-term sequences (1, 2, 3), (1, 3, 2), (2, 1, 3), (2, 3, 1), (3, 1, 2) and (3, 2, 1).[1] Order is what makes two permutations different: 1, 2, 3 and 3, 2, 1 use the same items but count as two arrangements.

Permutations of r items chosen from n

Often you do not arrange every item, only r of them. The page writes this as P(n, k) = n × (n − 1) × (n − 2) × … × (n − k + 1), a product of k factors, and says that it is 0 when k is larger than n and otherwise equals n! ÷ (n − k)!.[1] It lists several notations for the same count, among them nPk, P(n, k) and A with n and k as sub- and superscripts.[1] For 8 runners and 3 medal places, P(8, 3) = 8 × 7 × 6 = 336 ways to award gold, silver and bronze, which is our own working from the formula. For 5 items and 3 places, P(5, 3) = 60.

Permutations and combinations

A combination ignores order. The page gives C(n, k) = P(n, k) ÷ P(k, k) = n! ÷ ((n − k)! × k!) and notes that these numbers are the binomial coefficients.[1] The calculator therefore shows the combinations beside every permutation answer. Choosing 5 cards from 52 in order gives P(52, 5) = 311,875,200 ordered hands, while ignoring order gives C(52, 5) = 2,598,960 hands. The ratio is 5! = 120, because each unordered hand can be put in order in 120 ways. That check is our own working.

Arrangements with repetition

If each of r places can hold any of n items, with repeats allowed, the count is n multiplied by itself r times. Strictly these are k-tuples rather than permutations in the usual sense, a point we state from standard counting rules. A four-digit PIN with ten digits available has 10 to the power 4, which is 10,000 possibilities. A binary string of length 10 has 2 to the power 10, which is 1,024. We include this mode because many people searching for a permutation calculator mean exactly this.

Distinct arrangements of a word with repeats

When some items are identical, swapping them does not give a new arrangement, so the count falls. The count is a multinomial coefficient: the total n factorial divided by the factorial of each repeat count. This is standard counting, and our own working checks it against the word below. The well-known example is the word MISSISSIPPI, with 11 letters: one M, four I, four S and two P. The count is 11! ÷ (1! × 4! × 4! × 2!) = 34,650. The word BANANA has three A, two N and one B, so 6! ÷ (3! × 2! × 1!) = 720 ÷ 12 = 60. Type a word and the calculator counts the repeated letters for you, or enter the counts yourself, for example 1 4 4 2.

How big permutation numbers get

Factorials grow quickly. 10! is 3,628,800 and 20! is 2,432,902,008,176,640,000. The number of orderings of a 52-card deck, 52!, has 68 digits. The calculator uses exact whole-number arithmetic, so small answers are exact to the last digit and very large answers are shown in scientific form with a digit count. That is why a fixed-size integer overflows so quickly.

Worked examples

A club has 12 members and chooses a president, a secretary and a treasurer. Order matters because the roles differ, so the answer is P(12, 3) = 12 × 11 × 10 = 1,320. If the club chooses a committee of 3 with no roles, the answer is C(12, 3) = 220. A password of 6 lowercase letters with repeats allowed has 26 to the power 6 = 308,915,776 possibilities. Seating 7 guests in a row gives 7! = 5,040 arrangements. These are our own examples worked from the formulas above.

Choosing the right mode

Ask two questions. First, does order matter? If it does not, you want combinations. Second, can an item be used more than once? If it can, use repetition. If you are rearranging every item and some are identical, use the word mode. If every item is distinct and all are used, use n factorial. The same item cannot appear twice in an ordinary permutation, which is why P(n, r) is 0 when r is larger than n.[1]

Common mistakes

  • Using permutations when order does not matter. A lottery ticket is a combination, not a permutation.
  • Forgetting that repeats reduce the count. MISSISSIPPI has far fewer arrangements than 11 factorial.
  • Mixing up n and r. n is the pool and r is how many you place.

What next

Use this often? Add Permutation to your Home screen.

Frequently asked questions

What is a permutation calculator?

A tool that counts the ways to arrange items in order. It finds P(n, r), arrangements with repeats, n factorial and distinct arrangements of words with repeated letters.

What is the formula for permutations?

P(n, r) = n! ÷ (n − r)!, which is n × (n − 1) × … for r factors. It is 0 when r is larger than n.

What is the difference between permutations and combinations?

Order matters in a permutation and not in a combination. C(n, r) = P(n, r) ÷ r!, so combinations are always fewer or equal.

How many arrangements does the word MISSISSIPPI have?

34,650, which is 11! ÷ (1! × 4! × 4! × 2!). Identical letters are divided out.

How do I count permutations with repetition?

If each of r places can hold any of n items, the count is n to the power r. A four-digit PIN has 10 to the power 4, or 10,000.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Math Tools