About the Permutation Calculator
A permutation is an arrangement of items where the order matters. The finishing order of a race, the digits of a PIN, the letters of a password and the seating plan at a dinner are all permutations: swapping two items gives a different result. Counting permutations tells you how many possibilities there are, which in turn tells you how likely a guess is to be right or how long a brute-force search would take.
This permutation calculator finds nPr, the number of ways to arrange r items chosen from n, either without repetition (each item used at most once) or with repetition (any item can fill any position). It works exactly with whole numbers of any practical size, shows the product behind the answer, gives the chance of guessing one particular arrangement, and compares the count with the number of combinations if order did not matter.
How to Use the Permutation Calculator
Enter the total number of items, n.
Enter the number of positions to fill, r.
Choose whether repetition is allowed.
The number of permutations appears with the working and related counts.
The Formulas
without repetition: P(n, r) = n! ÷ (n − r)!
= n × (n − 1) × … × (n − r + 1)
with repetition: n^r
Without repetition, the number of choices falls by one at each position. With repetition, every position has all n choices.
Step-by-Step Example
How many ways can gold, silver and bronze be awarded among 8 runners?
Gold: 8 choices
Silver: 7 remaining
Bronze: 6 remaining
P(8, 3) = 8 × 7 × 6 = 336
There are 336 possible podiums. The same answer comes from 8! ÷ 5! = 40,320 ÷ 120.
How many ways can 3 items be arranged from 10?
P(10, 3) = 10 × 9 × 8 = 720
Step-by-Step Example: With Repetition
How many 4-digit PINs are there?
10 × 10 × 10 × 10 = 10^4 = 10,000
Each digit can be anything from 0 to 9, whatever the others are, so there are 10,000 PINs and a random guess has a 1 in 10,000 chance.
Permutations and Combinations
Every permutation count can be split into two steps: choose which items to use, then arrange them. Choosing 3 of 10 can be done in 120 ways (combinations), and each group of three can be arranged in 3! = 6 orders, giving 120 × 6 = 720 permutations. So P(n, r) = C(n, r) × r!. Whenever you are unsure which to use, ask whether swapping two of the chosen items changes the result. For a committee it does not; for a list of officers, a ranking or a code, it does.
Arranging Everything
When all n items are arranged (r = n), the count is simply n!. Five books can be arranged on a shelf in 5! = 120 ways. A standard 52-card deck can be shuffled into 52! orders, a 68-digit number of about 8.07 × 10^67 — so large that any thoroughly shuffled deck is almost certainly in an order never seen before. Factorials grow faster than any power, which is why even modest arrangement problems quickly produce huge numbers.
Passwords and Security
Permutations with repetition measure how hard a code is to guess. A 4-digit PIN has 10,000 possibilities. An 8-character password using only lowercase letters has 26^8, about 209 billion; allowing upper case, digits and 20 symbols raises the pool to 82 characters and the count to 82^8, about 2.04 × 10^15. Each extra character multiplies the total by the size of the pool, which is why length is the most powerful way to strengthen a password.
Arrangements With Repeated Letters
Words with repeated letters have fewer distinct arrangements, because swapping two identical letters changes nothing. The letters of BOOK can be arranged in 4! ÷ 2! = 12 distinct ways, since the two Os are indistinguishable. For MISSISSIPPI, with four Is, four Ss and two Ps among 11 letters, the count is 11! ÷ (4! × 4! × 2!) = 34,650. This calculator counts arrangements of distinct items; divide by the factorial of each repeat count for words like these.
Circular Arrangements
Seating people around a round table is a special case. Because rotating everyone one seat to the left leaves the same arrangement, the count is (n − 1)! rather than n!. Six guests can sit around a round table in 5! = 120 distinct ways, compared with 720 ways along one side of a straight table. If the table can also be viewed from either side, so that clockwise and anticlockwise orders count as the same, the count halves again to 60.
Understanding Your Result
The headline is the number of permutations.
The formula line shows the product that produces it.
The chance of guessing line gives the probability of hitting one particular arrangement at random.
The if order did not matter line gives the matching number of combinations.
The worth knowing line explains how the two counts are related.
When Should You Use This Calculator?
Use it to count rankings, podiums, seating plans and schedules.
Use it to count possible codes, PINs and passwords.
Use it for homework on permutations and factorials.
Use it to see how quickly the number of arrangements grows.
Common Mistakes
Using permutations when order does not matter. Groups and hands need combinations.
Forgetting whether repetition is allowed. PINs can repeat digits; race places cannot repeat runners.
Treating identical items as distinct. Divide by the repeats' factorials.
Computing n! and (n − r)! separately for large n. Multiply only the top r terms.
Confusing nPr with n^r. The first shrinks the choices at each step; the second does not.