Permutation with Repetition Calculator
PrintIf you are setting a 4-digit PIN code for your phone, the order of the numbers absolutely matters (1234 is not the same as 4321). Furthermore, you are completely allowed to use the same number multiple times (like 7777). In mathematics, whenever order matters and you are allowed to reuse your items, it is called a Permutation with Repetition.
Our free online Permutation with Repetition Calculator instantly evaluates your dataset to find the maximum number of possible outcomes. Whether you are calculating the strength of a computer password or solving a probability puzzle, this tool generates the exact massive number of possibilities in milliseconds.
The Formula (nr) Explained
Unlike standard permutations which require complex factorial equations, a permutation with repetition (or “replacement”) uses a beautifully simple exponential formula: nr.
| Equation Variable | Mathematical Definition | PIN Code Example (0-9) |
|---|---|---|
| The n Variable | The total number of options you have to choose from. | Because a keypad has digits 0 through 9, your total pool of options is 10. Therefore, n = 10. |
| The r Variable | The total number of slots you are trying to fill. | Because a standard PIN code has exactly 4 digits, you have 4 empty slots. Therefore, r = 4. |
| The Final Math (nr) | Multiplying the pool by itself for every slot. | 104 (which is 10 × 10 × 10 × 10). The total number of possible PINs is exactly 10,000. |
Why “Repetition” Creates Massive Numbers
Allowing an item to be reused creates an exponential explosion in your possibilities. Here is a direct mathematical comparison of creating a 4-digit code using the numbers 0-9, with and without repetition.
| The Scenario | The Math | Total Possibilities |
|---|---|---|
| Without Repetition | 10 × 9 × 8 × 7 | 5,040 (Because your pool shrinks every time you use a number). |
| With Repetition | 10 × 10 × 10 × 10 | 10,000 (Because your pool stays at a perfect 10 for every single slot). |
If you are drawing items from a hat and are not allowed to put them back (meaning you cannot reuse them), you must switch over to our Permutation Without Repetition Calculator. If you are building a team where order does not matter at all, use our standard Combinations Calculator.
Frequently Asked Questions (FAQ)
Why is it sometimes called “Permutation with Replacement”?
In statistics classes, professors often use the analogy of drawing colored marbles out of a bag. If you draw a red marble, write down the color, and then replace it back into the bag, you are allowed to draw it again. “Replacement” is simply the physical action that allows “Repetition” to occur.
How does this formula prove password security?
Cybersecurity experts use this exact nr formula to test password strength. If a hacker is trying to crack your 8-character password, and you only used lowercase letters, their pool is 26. The math is 268 (about 208 Billion combinations). But if you add numbers and symbols, the pool jumps to 70. The math becomes 708 (over 576 Trillion combinations). You drastically increased the n variable.
Is a combination lock actually a permutation lock?
Yes! It is the greatest naming error in mathematical history. A standard padlock with spinning dials is technically a Permutation with Repetition lock. Order absolutely matters (1-2-3 will open it, but 3-2-1 will not), and you can reuse numbers (like 5-5-5).