When the same symbol can appear in several positions and order matters, every position has all n options, so the number of sequences is n × n × … × n = nʳ. A 4-digit PIN has 10⁴ = 10,000 possibilities, a 3-wheel bicycle lock with digits 0–9 has 1,000, and a word of 5 letters from a 26-letter alphabet has 26⁵ = 11,881,376.
This is why password length matters so much. Each extra character multiplies the number of possibilities by n. With 62 symbols (upper- and lower-case letters and digits) an 8-character password has 62⁸ ≈ 2.18 × 10¹⁴ possibilities, and a 10-character one 62¹⁰ ≈ 8.39 × 10¹⁷ (almost 4,000 times as many).
Enter the number of available symbols n and the length r, or type the symbols themselves, and the calculator returns the exact count, the chance of guessing one sequence and a list of up to 300 sequences in order.
How to use the Permutation With Repetition Calculator
- Number of symbols available (n): Ignored when you type the objects themselves below.
- Length of the sequence (r)
- Objects to list (optional, comma-separated): If you type names here, n is taken from how many you entered and the list below uses them.
- List the selections
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
The count is n multiplied by itself r times in exact arithmetic. Sequences are listed like an odometer, with the last position changing fastest.
Worked example
A bank card PIN has 4 positions and 10 digits: 10 × 10 × 10 × 10 = 10,000 PINs, so a random guess succeeds with probability 1 in 10,000 (0.01%). Three guesses before the card is blocked give a 0.03% chance. A 6-digit PIN raises the count to 1,000,000.
How length and alphabet change the count
| Alphabet (n) | Length 4 | Length 6 | Length 8 |
|---|---|---|---|
| 10 digits | 10,000 | 1,000,000 | 100,000,000 |
| 26 letters | 456,976 | 308,915,776 | ≈ 2.09 × 10¹¹ |
| 62 letters + digits | 14,776,336 | ≈ 5.68 × 10¹⁰ | ≈ 2.18 × 10¹⁴ |
Formula
Number of sequences = nʳ
Time to try them all = nʳ ÷ guesses per second
Worked example
Inputs: Number of symbols available (n): 10; Length of the sequence (r): 4; Objects to list (optional, comma-separated): ; List the selections: No.
Results: Permutations with repetition (nʳ) = 10,000; Chance of guessing one sequence = 1 in 10,000 (0.01%); Without repetition, for comparison = 5,040.
Key terms
- Permutation with repetition
- An ordered sequence where symbols may repeat.
- Alphabet
- The set of n symbols available for each position.
- Brute force
- Trying every possible sequence; the time needed grows as nʳ.
Frequently asked questions
How many 4-digit PINs are there?
10⁴ = 10,000, from 0000 to 9999.
How many possible 8-character passwords are there?
With 62 letters and digits: 62⁸ = 218,340,105,584,896. With 95 printable characters: 95⁸ ≈ 6.63 × 10¹⁵.
What is the formula for permutations with repetition?
nʳ: n choices for each of r positions.
How many licence plates with 3 letters and 3 digits are possible?
26³ × 10³ = 17,576,000 (multiply the counts for each part).
Is a 4-digit PIN with no repeated digits more secure?
No, it is less secure: only P(10, 4) = 5,040 possibilities instead of 10,000.
What about arranging letters of a word with repeated letters?
That is a different problem (permutations of a multiset): n! divided by the factorial of each letter count.