The Permutation Calculator computes how many different arrangements you can make from n items taken r at a time. It uses the standard permutation formula and can also handle repeated items when you need unique arrangements.
What a Permutation Calculator Measures
A permutation is an arrangement where order matters. If swapping two positions changes the outcome, you are counting permutations. The most common case is choosing r positions out of n items without repeating the same item.
In this article, you will learn the core formulas, what each variable means, and how to apply them to real problems like ranking lists, forming codes, and scheduling.
Key Variables (n, r, and Repeats)
- n: total number of available items.
- r: number of items you arrange (taken at a time).
- Repeats (optional): counts of identical items when items repeat, so you count unique arrangements.
For “no repeats,” the calculator counts every distinct ordered selection. For “with repeats,” it divides by factorials of repeated counts to remove duplicates.
Core Formulas Used
1) Permutations Without Repetition (Order Matters)
When you arrange r items chosen from n distinct items (and you do not reuse items), the number of permutations is:
| Case | Formula | Meaning |
|---|---|---|
| nPr | n! / (n − r)! | All ordered arrangements of length r |
2) Permutations With Repeated Identical Items (Unique Arrangements)
If you are arranging a total of m items where some items are identical (for example, letters in a word), you count unique permutations using:
| Case | Formula | What to Provide |
|---|---|---|
| Unique permutations with repeats | m! / (k1! · k2! · …) | Repeat counts that sum to m |
The calculator supports this by letting you input the repeated counts. It then computes the number of unique arrangements.
How to Use the Permutation Calculator
Use the calculator in three steps:
- Choose the mode: no repeats (nPr) or repeats (unique arrangements).
- Enter values: total items (n) and taken items (r) for nPr, or total length (m) and repeat counts for repeats.
- Read the result: the calculator outputs the permutation count.
All inputs must be whole numbers. If you enter invalid values (like negative numbers or r > n in the no-repeats mode), the calculator shows an error.
Worked Example (Quick and Practical)
Suppose you have n = 8 different books and you want to arrange r = 3 on a shelf. Order matters because the first book shown is different from the second.
Compute:
- nPr = 8! / (8 − 3)! = 8! / 5! = 8 × 7 × 6 = 336
So there are 336 possible ordered arrangements.
Worked Example with Repeats
Imagine arranging the letters in the word “AAB”. There are m = 3 total letters, with repeats: A occurs 2 times and B occurs 1 time.
Compute unique arrangements:
- 3! / (2! · 1!) = 6 / 2 = 3
So there are 3 unique letter arrangements: AAB, ABA, BAA.
Real-Life Use Cases
Ranking and Ordering Tasks
If you are ordering winners, priorities, or steps in a process, you are typically counting permutations without repetition. For example, if you must place r people into r distinct positions selected from n candidates, order matters and nPr applies.
Building Codes and Sequences
When you generate PINs, passwords, or sequence IDs, you often care about order. If characters are all distinct choices with no repeats, use nPr. If the “items” include identical symbols (like repeated letters), use the repeated-items formula for unique arrangements.
Common Mistakes to Avoid
- Using combinations when order matters: permutations assume order changes outcomes.
- Forgetting repeats: if items repeat and are identical, dividing by factorials removes duplicates.
- Mixing up n and r: n is the pool; r is how many you arrange.
Frequently Asked Questions
What is the difference between a permutation and a combination?
A permutation counts arrangements where order matters, such as ABC versus ACB. A combination counts selections where order does not matter, such as {A,B,C} as one set. Use permutations for rankings, sequences, and ordered selections.
When should I use nPr instead of the repeated-items formula?
Use nPr when you have n distinct items and you arrange r of them with no reuse. Use the repeated-items formula when the arranged positions include identical items, like repeated letters in a word.
Why do we divide by factorials when items repeat?
When items repeat, swapping identical items does not create a new unique arrangement. Dividing by k! for each group of identical items removes those overcounted duplicates. This correction is what makes the count “unique.”
What happens if I enter r greater than n?
In the no-repeats permutation case, r cannot exceed n because you cannot arrange more unique items than you have available. The calculator treats this as invalid input and shows an error instead of returning a misleading number.
Are factorial results always whole numbers?
Yes for valid permutation inputs. Factorials grow quickly but still produce integers. For repeated-items permutations, the division also yields a whole number because the denominator is constructed from factorials of counts that sum to the total.