Permutation Generator
Generate random permutations of a range or a list, where the order of the values is what matters.
Permutation Generator
Arrange 3 from 10
Choose from
Order matters, so 1 2 3 differs from 3 2 1
How to use the permutation generator
- Set the pool as 1 to N, and how many to arrange, r.
- Draw several random arrangements, or tick list every one for small n and r.
- Copy the results or download them as a CSV.
About Random Nr's Permutation Generator
The permutation generator draws random arrangements of numbers, where the order is the whole point, so 1 2 3 and 3 2 1 count as different results. Set the pool as 1 to N and how many positions to fill, r, then draw a batch of random orderings or list every possible one when the numbers are small, ready to copy or export.
How many permutations are possible
The number of ways to arrange r items chosen from n, when order matters, is written n P r, and it climbs even faster than the combination count because every ordering is counted separately.
| Arrange | From | Permutations |
|---|---|---|
| 2 | 5 | 20 |
| 3 | 5 | 60 |
| 3 | 10 | 720 |
| 5 | 10 | 30,240 |
| 10 | 10 | 3,628,800 |
Arranging all ten of a pool of ten gives 3,628,800 orderings, which is ten factorial and the reason two random full shuffles almost never match.
Permutations versus combinations
A permutation cares about order and a combination does not, which is why there are always more permutations than combinations of the same size, by a factor of r factorial.
| Choose 3 from 10 | Count | Because |
|---|---|---|
| Permutations | 720 | order counts, so each set of three is counted six ways |
| Combinations | 120 | order ignored |
Choosing 3 from 10 gives 120 combinations but 720 permutations, exactly six times as many, because each set of three can be ordered in 3 factorial, which is 6, ways. When only the selection matters, use the combination generator.
Draw random permutations or list every one
Draw a few random arrangements for a quick order, or tick list every one to enumerate the whole set when n and r are small, capped at the first 2000 to keep the page fast. Each arrangement is drawn with a Fisher Yates shuffle from the browser cryptographic source, so every ordering is equally likely. To shuffle a list you already have rather than draw from 1 to N, use the number randomizer.
More math and sequence generators
Frequently asked questions
What is a permutation
An arrangement where order matters, so 1 2 3 and 3 2 1 are different permutations. Use it when the sequence itself is the answer.
Random draws or every permutation
Draw a set of random arrangements, or tick list every one to enumerate them all when n and r are small enough.
What is the limit for listing all
Enumeration is capped at the first 2000 arrangements to keep the page responsive. Beyond that, use random draws.
What if r equals n
Then each permutation is a full ordering of all N numbers, in other words a complete shuffle.
Is it free
Yes, free and with no sign up.
Related generators
- Number Base Converter
- Random Binary Number Generator
- Random Hex Number Generator
- Random Octal Number Generator
- Random Roman Numeral Generator
- True Random Number Generator
- Secure Random Number Generator
- Normal Distribution Generator
- Random Sample Generator
- Random Combination Generator
- Permutation Generator
- Random Number Generator
When order does not matter, use the combination generator, or shuffle a list with the number randomizer.