How to use the combination generator
- 1Choose a Mode: Combinations for groups from one list, Combine lists for pairings across lists, or Permutations when order matters.
- 2Paste your items, one per line, and set Group size (r).
- 3Check the total under Result; for more than 5,000 lines press Generate to confirm.
- 4Press Copy or Download.
Example
Ana Ben Cara Dev Eli (group size 2)
Ana, Ben Ana, Cara Ana, Dev Ana, Eli Ben, Cara Ben, Dev Ben, Eli Cara, Dev Cara, Eli Dev, Eli
Combinations, group size 2: 5C2 = 10 pairs. Each pair appears once, because order doesn't matter (Ana, Ben is the same pair as Ben, Ana).
Combinations vs permutations
A combination is a selection where order doesn't matter: a team of Ana and Ben is the same team as Ben and Ana. A permutation is an arrangement where order matters: a 1st and 2nd place of Ana, Ben differs from Ben, Ana. For the same items there are always at least as many permutations as combinations; for groups of 3 there are 3! = 6 times as many. Switch Mode to Permutations here, or use the permutation generator for letters and words.
Combinations of a given size (r)
Group size (r) sets how many items go in each combination. The number of combinations of r items from n is nCr = n! ÷ (r! × (n − r)!). Results are listed in order of your input, with each group appearing once.
Allow repetition lets an item appear more than once in a group (like choosing 3 scoops of ice cream from 5 flavors, where two scoops can be the same). The count is then (n + r − 1)C r.
Combining several lists (Cartesian product)
Combine lists takes one item from each list in every possible way, which mathematicians call the Cartesian product. Shirt sizes S, M, L × colors red, blue give six variants: S red, S blue, M red, and so on. Press Add list for up to five lists; the total is the product of the list lengths. Prefix, Suffix and Separator shape each line, for example to build SKUs like TS-M-blue.
How many results to expect
| Items (n) | Size (r) | Combinations | Permutations |
|---|---|---|---|
| 5 | 2 | 10 | 20 |
| 10 | 3 | 120 | 720 |
| 20 | 5 | 15,504 | 1,860,480 |
| 49 | 6 | 13,983,816 | — |
Counts grow fast. The total is always shown first; up to 5,000 results appear immediately, larger lists need a click on Generate, and above 500,000 the tool asks you to reduce the input, because a browser can't usefully display millions of lines.
Examples: teams, menus, test cases
- Pairings and rotas: every pair from a list of people for one-to-one meetings (n people give n × (n − 1) ÷ 2 pairs).
- Menus and bundles: every 3-item combo from a list of dishes or products.
- Software testing: every combination of browser × operating system × language from three lists.
- Lottery odds: 49C6 is 13,983,816, so one ticket has a 1 in about 14 million chance of matching all six numbers.
To pick a few at random instead of listing them all, use the random line picker.
Is anything I enter stored?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
