1. What does this tool do
This free online combination and permutation generator generates all combinations or permutations from a set—n choose k, nPr, with or without repetition. Use it for combination generator, permutation generator, or n choose k for math, homework, lotteries, and any task that needs every possible subset or arrangement. Use numbers (1..n) or your own labels (A, B, C). No sign-up, no upload; all generation runs in your browser. Copy the full list with one click. Ideal for math and homework, games and puzzles, sampling, or educational use.
2. How to use it
Quick start: Choose input mode (numbers or custom items), enter n or items, set size k, select Combination or Permutation, set repetition (yes/no), click Generate, then copy all results.
- Choose input mode — Numbers 1..n uses integers 1 through n; Custom items lets you enter comma-separated labels.
- Enter items — For numbers, enter n (1–20). For custom, type items like
A, B, C(max 20). - Set size k — How many items per combination or permutation. Without repetition, k must be ≤ n.
- Select mode — Combination (order doesn't matter) or Permutation (order matters).
- Set repetition — No: each item used at most once. Yes: items can repeat.
- Generate — Click to produce the list. Use Copy all to copy results.
3. How it works
- Combination without repetition C(n,k) = n!/(k!(n-k)!) — recursive generation of sorted subsets.
- Combination with repetition C(n+k-1,k) — multisets of size k from n items.
- Permutation without repetition P(n,k) = n!/(n-k)! — recursive backtracking over remaining items.
- Permutation with repetition n^k — Cartesian product of k copies of the item set.
Results are capped at 10,000 displayed; beyond that, only the formula and count are shown. All computation runs entirely in your browser. No data is sent to any server.
4. Use cases & examples
- Math & homework — Verify combinatorial counts, list all subsets or arrangements.
- Games & puzzles — Enumerate possible hands, dice rolls, or lock combinations.
- Sampling — List all ways to choose k items from n for experiments or trials.
- Passwords & codes — Explore possible PIN or code arrangements (educational only).
Example
- n=5, k=3, Combination, No repetition → C(5,3) = 10: (1,2,3), (1,2,4), …
- A, B, C, k=2, Permutation, No repetition → P(3,2) = 6: AB, AC, BA, BC, CA, CB
5. Limitations & known constraints
- Max 20 items — n or custom items capped at 20 to prevent browser freeze.
- Max 10,000 results displayed — For larger counts, only the formula and total are shown.
- No export — Use Copy all to copy the list; no CSV or file download.