Permutations with Repetition Calculator
Count ordered arrangements when repetition is allowed
Result
How it is calculated
The tool computes nr. n is the number of different symbols you can pick from (for example 10 digits, or 26 letters) and r is how many positions are filled. Each position is chosen independently and the same symbol may repeat, so the choices multiply: n × n × … × n, r times.
Both inputs are cut to whole numbers (5.9 is read as 5). n must be at least 1 and r at least 0; with r = 0 the answer is 1, the single empty arrangement. The count is calculated in floating point, so results above roughly 9×1015 are rounded approximations, not exact digits. Order matters here, so AB and BA are counted separately.
Worked example
A password has 8 characters, each a letter in upper or lower case or a digit: 26 + 26 + 10 = 62 symbols. So n = 62 and r = 8. The count is 62 × 62 × … (8 times) = 218,340,105,584,896, roughly 2.2×1014 possible passwords. By comparison, a 4-digit PIN (n = 10, r = 4) has only 10,000.
Common mistakes
- Using the formula for no repetition (n!/(n−r)!) when characters may repeat. Passwords and PINs allow repeats, so the correct count is nr.
- Swapping n and r. 104 = 10,000 but 410 = 1,048,576; n is the symbol set size and r is the length.
- Counting the symbol set wrongly, for example forgetting that upper and lower case letters are different symbols.
- Entering decimals. They are cut down, so 62.9 becomes 62.
- Treating the total as the expected number of guesses. An attacker needs on average about half of the possibilities, and only when the choice is truly random.
About this calculator
When order matters and repeated choices are allowed, the count of possible arrangements of length r drawn from n items is simply n^r — each of the r positions independently has n options, so the counts multiply. This is different from permutations without repetition (n!/(n−r)!), where each item can only be used once.
It's the exact math behind a 4-digit PIN (10^4 = 10,000 combinations), a password built from a fixed character set, or a padlock with multiple dials — anywhere the same symbol can be reused in different positions. Security analysts use n^r directly to estimate how many attempts a brute-force attack would need against a given PIN or password length.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)