Combinations and permutations, plainly
A combination is a way of choosing items where the order does not matter. Pick Alice and Ben for a two-person team and you have the same team as Ben and Alice, so it counts once. A permutation treats every ordering as different, so the same pair counts twice. Most everyday questions (teams, toppings, lottery lines, tasting flights) are combination questions.
Here n is how many items you have and r is how many you choose. The exclamation mark is a factorial: 5! means 5 × 4 × 3 × 2 × 1. This tool computes both counts with exact whole-number arithmetic, so even enormous values are shown precisely rather than as rounded approximations.
Worked examples
Why the numbers explode
Combination counts grow faster than almost anything else you meet in day-to-day maths. Choosing 2 from 10 gives a modest 45. Choosing 5 from 25 gives 53,130. Choosing 12 from 25 gives 5,200,300, and a 6-from-59 lottery line is one of more than 45 million. This is called combinatorial explosion, and it is why the tool renders at most 5,000 lines: the exact total is always calculated and displayed, but listing millions of rows would freeze your browser without telling you anything the count has not already told you.
The explosion is also the honest answer to a lot of practical questions. How many 5-a-side line-ups can you make from a squad of 12? 12C5 = 792, which is why arguing about the best one takes all season. How many ways can a pub quiz team of 4 come from an office of 20? 20C4 = 4,845.
What people use the list for
- Fixtures and pairings: every pair from a list of players is every match in a round robin.
- Testing: every combination of r settings or feature flags, ready to paste into a test plan.
- Menus and bundles: every possible box of r products from your range.
- Teaching: seeing all 10 combinations of 2 from 5 makes the formula click in a way the algebra never quite does.
Switch to number range mode when the items are just numbers, such as raffle tickets or lottery balls, and use the download button to save the list as a plain text file for a spreadsheet or script. Everything runs in your browser, so your list is never uploaded anywhere.
If you want one random selection rather than every possible one, the random team generator shuffles people into groups for you, and the lottery number generator draws a single fair line from exactly the pools of numbers described above. This page is for the complete picture: every option, counted exactly and listed in a predictable order.
Frequently asked questions
What is the difference between combinations and permutations?
A combination ignores order: Alice and Ben is the same pair as Ben and Alice, so it is counted once. A permutation counts every ordering separately, so the same two people give two permutations. This tool lists combinations, and shows both counts so you can see how much bigger the permutation number is.
Why is the list capped at 5,000 lines?
Combination counts explode astonishingly fast. Choosing 12 items from 25 already gives 5,200,300 combinations, which no browser should be asked to render. The tool always shows the exact total, calculated precisely however large it is, and lists the first 5,000 so you can inspect, copy or download them.
Can I use numbers instead of typing a list?
Yes. Switch to number range mode and the tool uses the whole numbers 1 to n as the items. That is handy for lottery style questions, raffle tickets or picking seat numbers without typing anything out.
What happens if my list contains duplicates?
Each line is treated as a separate item, even if two lines contain the same text. If you list Anna twice, combinations containing each copy are counted and listed separately. Remove duplicate lines first if that is not what you want.
How large can n and r be?
The counts are calculated with exact whole-number arithmetic (BigInt), so even 1000 choose 500, a number with hundreds of digits, is computed exactly rather than overflowing or rounding. Only the rendered list is capped, at 5,000 lines.