RandomNr

Random Combination Generator

Generate random number combinations, or every possible combination from a range. Choose whether order matters and export the lot.

Combination Generator

2-5-9

Choose 3 from 10

Choose from

Order does not matter, results are shown sorted

Output

How to use the combination generator

  1. Set the pool as 1 to N and how many to choose, r.
  2. Draw several random combinations, or tick list every one for small n and r.
  3. Copy or export the results.

About Random Nr's Combination Generator

The random combination generator builds number combinations from a range you set, either drawing a handful at random or listing every possible combination in full. Choose whether order matters, set how many items each combination holds, and export the result as CSV, which suits everything from lottery style picks to test cases that need every pairing covered.

How many combinations are possible

When you tick list every combination here, the count can climb fast, so it helps to know how big the set is before you generate it. The number of ways to choose r items from n, where order does not matter, is written n choose r, and choosing 6 from 49 is the classic lottery example.

ChooseFromCombinations
21045
310120
510252
64913,983,816
5522,598,960

Choosing 6 from 49 gives 13,983,816 combinations, which is exactly the odds against a jackpot in that style of lottery: one line in nearly fourteen million.

Combinations versus permutations

A combination cares only about which items are chosen, not their order, so 1, 2, 3 is the same combination as 3, 2, 1. That is the difference from a permutation, where order matters and the two count separately.

Choose 3 from 10CountBecause
Combinations120order ignored
Permutations720order counts, so six times as many

There are always more permutations than combinations of the same size, by a factor of r factorial, which for choosing 3 is 6.

Draw random combinations or list every one

Draw a handful of random combinations for a quick pick, 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. When order matters, use the permutation generator, and for a plain unique draw, the no repeats generator.

More math and sequence generators

Frequently asked questions

What is a combination

A selection where order does not matter, so 1-2-3 and 3-2-1 count as the same combination. The tool shows them sorted.

Random draws or every combination

Draw a set of random combinations, 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 to keep the page responsive. Beyond that, use random draws instead.

Can I choose r from any n

Yes. Set N for the pool and r for how many to choose, with r never larger than N.

Is it free

Yes, free and with no sign up.

Related generators

When order matters, use the permutation generator. For a plain unique draw, see the no repeats generator.