Permutation and Combination Generator
Paste your custom items, choose a subset size, and instantly see the total count plus every possible arrangement listed. Four formula modes, real-time results, zero buttons.
The fastest way to lock in the permutation-combination difference is to picture two everyday objects.
Imagine reaching into a bowl and grabbing an apple, an orange, and a banana. Does it matter which one your hand touched first? Of course not. You end up with the same three pieces of fruit regardless of order. {Apple, Orange, Banana} is identical to {Banana, Apple, Orange} because you only care about which items you have, not the sequence you picked them in.
A padlock labeled "combination lock" is mathematically a misnomer. Entering 3-1-2 is completely different from entering 1-2-3 or 2-3-1. Each distinct sequence unlocks a different vault. The order of the digits is everything. Despite its name, every padlock in existence is a permutation problem - because sequence defines the correct answer.
The Complete Guide to Permutations and Combinations
Whether you are solving a statistics homework problem, designing a password policy, scheduling a tournament bracket, building a recommendation engine, or analyzing a lottery draw - you are working with permutations and combinations. This guide explains the four fundamental formulas, when to use each one, and how to interpret the numbers they produce.
How to Use This Tool
Switch between Custom Array mode and Numbers Only mode using the tabs at the top of the calculator. In Custom Array mode, paste your actual items separated by commas (for example: Ace, King, Queen, Jack, Ten) and the tool counts them automatically to set n. In Numbers Only mode, type n directly and the list generator will use numbers 1 through n as placeholder item names.
Set r to control how many items you are choosing. Toggle the Order and Repetition options to select one of the four formula states. Every output - including the formula display, total count, and the arrangement list below - updates in real time with no button press required.
The Four Formulas at a Glance
| Type | Repetition | Formula | n=4, r=2 |
|---|---|---|---|
| Permutation | No | n! / (n - r)! | 4! / 2! = 12 |
| Permutation | Yes | n^r | 4^2 = 16 |
| Combination | No | n! / (r! x (n - r)!) | 4! / (2! x 2!) = 6 |
| Combination | Yes | (n+r-1)! / (r! x (n-1)!) | 5! / (2! x 3!) = 10 |
Why Does Repetition Increase the Count So Dramatically?
Without repetition, every time you pick an item it is removed from the available pool, so your options narrow with each selection. If you have 4 items and choose 2, your first pick has 4 options and your second has only 3 - giving 4 x 3 = 12. With repetition, both picks have the full 4 options because the pool never shrinks: 4 x 4 = 16. As r grows, this gap becomes enormous. With n=10 and r=10 and no repetition, the result is 10! = 3,628,800. With repetition it is 10^10 = 10,000,000,000 - nearly 2,756 times larger.
Real-World Applications
Passwords and PINs use permutations with repetition: a 4-digit PIN from digits 0-9 has 10^4 = 10,000 possible values. Lottery draws use combinations without repetition: picking 6 numbers from 49 gives C(49,6) = 13,983,816 possible tickets. A round-robin sports tournament schedule uses combinations (which teams play each other) while playoff seedings use permutations (who finishes in which position). Cryptography, genetics (codon arrangements), and network routing all rely on these same four formulas at massive scale.
Browser Safety and Large Numbers
Factorials grow extremely fast. This tool uses JavaScript's built-in BigInt type to compute exact integer results for any n up to 5,000 and any r. When the result exceeds JavaScript's Number.MAX_SAFE_INTEGER (approximately 9 x 10^15), the total is displayed in scientific notation to avoid rounding errors. For values beyond BigInt precision, a log-based approximation is shown instead. The arrangement list is always capped at 500 entries to prevent browser slowdowns - a notice appears when the cap is active.