Permutation Calculator (nPr)
A permutation counts the ways to arrange r items chosen from n when order matters: P(n, r) = n! ÷ (n − r)!. For n = 10 and r = 3 there are 720 permutations, or 10³ = 1,000 if items can be repeated.
Last updated · By S. Dilshan · Runs in your browser, nothing is uploaded
Step-by-Step Solution
What Is a Permutation?
A permutation is an arrangement of items in a particular order. Seating guests at a table, ranking contestants, setting a password or scheduling meetings are all permutation problems: switching two items produces a different result.
The count of permutations is written P(n, r), nPr or ⁿPᵣ. When you use all n items, the count is simply n! (“n factorial”). So a deck of 52 cards can be shuffled into 52! orders, a number with 68 digits, which is why a well-shuffled deck is almost certainly in an order that has never occurred before.
Types of Permutation Problem
| Type | Formula | Example | Result |
|---|---|---|---|
| Choose r of n, no repeats | n! ÷ (n − r)! | 3-letter codes from 10 distinct letters | 720 |
| Repeats allowed | nʳ | 3-digit PIN from 10 digits | 1,000 |
| Arrange all n items | n! | Seating 5 people in a row | 120 |
| Items that repeat | n! ÷ (a! b! …) | Rearranging the letters of STATISTICS | 50,400 |
Permutation Formulas
nis the number of items available.ris the number of positions you fill.n! ÷ (n − r)!is the product n × (n − 1) × … × (n − r + 1): n choices for the first place, n − 1 for the second, and so on.- With repetition every place has all n choices, so you multiply n by itself r times.
- For identical items, divide by the factorial of each group’s size to remove duplicate arrangements.
To count selections where order does not matter, divide by r! and use the combination calculator.
Worked Example: Arranging 3 of 10
No repetition
- There are 10 choices for the first position.
- 9 remain for the second.
- 8 remain for the third.
- P(10, 3) = 10 × 9 × 8 = 720, which equals 10! ÷ 7! = 3,628,800 ÷ 5,040.
With repetition
For a 3-digit PIN using digits 0 to 9 where digits may repeat, every position has 10 options, so the count is 10 × 10 × 10 = 1,000.
Arranging Letters with Repeats
How many distinct ways can you rearrange the letters of STATISTICS? There are 10 letters, with S three times, T three times, I twice, and A and C once each.
10! ÷ (3! × 3! × 2!) = 3,628,800 ÷ 72 = 50,400 distinct arrangements.
Why Longer Codes Are Safer
| Code type | Possibilities |
|---|---|
| 4-digit PIN (0–9, repeats allowed) | 10,000 |
| 6-digit PIN | 1,000,000 |
| 4 distinct digits, no repeats | 5,040 |
| 8 characters from 62 letters and digits | about 218 trillion |
How Fast Factorials Grow
| n | n! (orders to arrange all n items) |
|---|---|
| 5 | 120 |
| 10 | 3,628,800 |
| 15 | 1,307,674,368,000 |
| 20 | 2,432,902,008,176,640,000 |
A single permutation is also a probability tool: the chance that three named runners finish exactly first, second and third among ten equally matched runners is 1 ÷ 720, about 0.14%.
How to Use This Permutation Calculator
- Enter the total number of items n.
- Enter the number of positions r you are filling.
- Choose No repetition (nPr) or Repetition allowed (nʳ).
- Read the permutation count, the formula used and the related number of combinations.
The permutation and combination calculator shows both counts side by side, which helps you check that order really matters in your problem.
Real-World Uses of Permutations
- Security: counting possible PINs, passwords and combinations to estimate brute-force effort.
- Racing and competitions: counting possible finishing orders for the podium.
- Scheduling: the number of orders in which tasks, deliveries or matches can be arranged.
- Computer science: sorting algorithms and search problems often explore permutations of inputs.
- Probability: the total number of ordered outcomes in sampling problems. See the probability calculator.
What Are the Most Common Mistakes With the Permutation Calculator (nPr)?
- Using permutations for unordered groups. A committee does not care about order, so use combinations.
- Forgetting repetition. A lock that allows repeated digits has far more codes than one that does not.
- Ignoring identical items. Arrangements of repeated letters must be divided by the factorials of their counts.
- Circular arrangements. Seating people around a round table gives (n − 1)! because rotations look identical.
- r larger than n. Without repetition you cannot fill more positions than you have items.
- Huge numbers. Even modest inputs produce enormous results, shown in scientific notation.
Where Can You Verify These Formulas?
The definitions and formulas on this page follow standard references. Check them against these sources:
Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.
Frequently Asked Questions
What is the permutation formula?
P(n, r) = n! ÷ (n − r)!. It counts the ordered arrangements of r items chosen from n distinct items.
What is the difference between a permutation and a combination?
In a permutation order matters, so AB and BA are different. In a combination they are the same. P(n, r) = C(n, r) × r!.
How do I count permutations with repetition?
Multiply the number of options for each position. With n options and r positions the count is nʳ. A 4-digit PIN has 10⁴ = 10,000.
What is the number of arrangements of all n items?
It is n!. Five people can sit in a row in 5! = 120 ways.
How do I handle repeated letters in an arrangement?
Divide n! by the factorial of the count of each repeated item. For STATISTICS the answer is 10! ÷ (3! × 3! × 2!) = 50,400.
What is a circular permutation?
It is an arrangement around a circle, where rotations count as the same. For n distinct items the number is (n − 1)!.