What the Permutation Calculator Computes
A Permutation Calculator counts how many ordered arrangements are possible under different rules. In combinatorics, permutations are used whenever order matters. For example, the arrangement (A, B, C) is different from (B, A, C) because the positions are different. This is why permutations are the foundation for ranking problems, scheduling, seating arrangements, password/keyspace estimation, ordering tasks, and many probability scenarios.
This tool includes the most common permutation models: nPr (choose r from n without repetition), permutations with repetition (n choices per position), multiset permutations (duplicates like A,A,B,C), and circular permutations (rotations treated as the same). It also includes an optional listing mode to generate actual permutations when the total size is small enough to be practical.
Permutations vs Combinations: The Key Difference
Many learners mix permutations and combinations. The difference is simple but extremely important:
- Permutation: order matters (ABC is different from ACB)
- Combination: order does not matter (ABC is the same as ACB)
If your question involves arranging, ranking, ordering, seating, assigning positions, building sequences, or forming codes where position changes meaning, you almost always want permutations. If your question is simply about choosing a group without caring about order, you want combinations.
nPr: Permutations Without Repetition
The most common permutation formula is nPr, read as “n permute r.” It counts the number of ways to choose and arrange r distinct items from a set of n distinct items, without repeating any item. The logic is:
- First position: n choices
- Second position: n−1 choices
- Third position: n−2 choices
- Continue until r positions are filled
nPr = n! / (n − r)!
This works because n! counts all permutations of n items, and dividing by (n−r)! removes the “tail” arrangements that do not affect the first r positions. The nPr tab shows steps, including factorial terms, so you can see where the count comes from.
Permutations With Repetition
In some problems, items can repeat. Think of a PIN code where digits can be reused, or a length-r sequence built from n symbols where repetition is allowed. In this model, every position has n choices, independent of other positions.
total = n^r
This grows very quickly. For example, if n=10 digits and r=6 positions, the count is 10^6 = 1,000,000. The With Repetition tab computes n^r exactly and shows the step interpretation so you can justify the result.
Multiset Permutations: Handling Duplicate Items
Real problems often include duplicates, such as repeated letters in a word (“BALLOON”) or repeated items in a collection (A,A,B,C). If you treat the duplicates as indistinguishable, swapping them does not create a new permutation. Multiset permutations account for this by dividing by factorials of repeated counts.
distinct = n! / (k1! · k2! · …)
Here, n is the total number of items, and k1, k2, … are the counts of each repeated symbol. The Multiset tab builds a frequency table for your input and computes the exact distinct permutation count.
Circular Permutations: Rotations Treated as the Same
For arrangements around a circle (like seating people around a round table), rotating everyone together does not create a “new” seating. If only rotations are considered equivalent, the number of circular permutations of n distinct items is (n−1)! because you can “fix” one person and arrange the rest.
total = (n − 1)!
Some problems also treat mirror images as the same arrangement (reflections). This happens in certain necklace or bracelet counting problems. If reflections are also equivalent and n>2, the count is typically (n−1)!/2 for distinct items. The Circular tab lets you choose whether reflections are identified and shows the rule used.
Generating a List of Permutations
Sometimes you want the actual permutations, not just the count. Listing all permutations is only practical for small n because factorial growth explodes. The List tab generates permutations up to a safe limit you choose. It supports lexicographic listing (useful for teaching and verification) and Heap’s algorithm (efficient generation).
If duplicates appear in the list input, the generated list may contain repeated sequences because the listing algorithms treat positions as distinct. For distinct-only listing, provide distinct items. If you need a distinct list for duplicates, the best approach is to generate unique permutations with multiset logic, which is far more complex and can still be huge. This tool focuses on counting duplicates exactly while keeping listing practical and fast.
How to Use This Permutation Calculator
Use nPr when you choose r distinct items and order matters
Examples: assigning gold/silver/bronze among n competitors, selecting a 4-digit code from digits without repeating, ordering tasks.
Use permutations with repetition when each position can reuse items
Examples: PIN codes, sequences over an alphabet, r-length strings over n symbols.
Use multiset permutations when your items repeat
Examples: anagrams of words with repeated letters, arranging identical objects, counting distinct reorderings of a multiset.
Use circular permutations for round-table and ring arrangements
Examples: seating around a round table, arranging beads around a necklace (with attention to rotation/reflection rules).
Why Permutation Counts Grow So Fast
Factorials increase extremely quickly. A small change in n can multiply results dramatically:
- 10! = 3,628,800
- 12! = 479,001,600
- 15! = 1,307,674,368,000
This is why the list feature includes a maximum limit and why permutation problems often focus on formulas rather than enumeration. The Permutation Calculator is built to give exact counts and clear reasoning without overwhelming the browser.
Practical Uses of Permutations
Permutations appear in many real and academic settings:
- Probability: ordered outcomes, sampling without replacement, ranking problems
- Computer science: search, scheduling, ordering states, brute-force keyspaces
- Operations: route ordering, task assignment, sequencing
- Cryptography concepts: permutation ciphers and permutation-based keyspaces (conceptually)
- Games and puzzles: state permutations and move ordering
Because “order matters” scenarios are everywhere, mastering permutations (and using a reliable calculator) saves time and reduces errors.
Limitations and Accuracy Notes
This calculator uses exact integer arithmetic (BigInt) for counts, so values are precise. Listing permutations is limited for performance: generating all permutations quickly becomes impossible for large n. Use the List tab for small inputs only, and rely on counting formulas for everything else.
FAQ
Permutation Calculator – Frequently Asked Questions
Answers about nPr, repetition, duplicates (multisets), circular permutations, listing limits, and exporting results.
A permutation is an arrangement where order matters. Choosing A then B is different from choosing B then A, so permutations count ordered outcomes.
Permutations consider order; combinations do not. If order matters, use permutations. If you only care which items are chosen, use combinations.
nPr counts the number of ordered ways to choose r items from n distinct items without repetition. The formula is nPr = n! / (n−r)!.
Permutations with repetition allow the same item to be used more than once. For r positions and n choices per position, the count is n^r.
When some items repeat (like A,A,B,C), the number of distinct permutations is n! / (k1!·k2!·...). This divides out swaps of identical items.
In a circle, rotations are considered the same arrangement. For n distinct items, circular permutations are (n−1)!. If reflections are also equivalent, the count changes depending on the scenario.
Yes, for small sizes. The tool can generate a list of permutations when the total count is within a safe limit to avoid browser slowdowns.
Permutation counts use factorial growth (n!), which increases extremely quickly. Even n=15 gives over 1 trillion permutations.
Yes. The calculator can export counts, intermediate steps, and generated lists (when enabled) as CSV.