How this instrument works
Permutation with repetition counts ordered sequences of length r where each position is filled independently from the same set of n options, and reusing an option in a later position is completely allowed. Because nothing gets removed from the pool as positions fill, every one of the r positions has exactly n choices, with no shrinking. Multiplying those r identical choice-counts together — n × n × n ×⋯, r times — gives n^r, the total count of possible ordered sequences.
This is the pattern behind any fixed-length code built from a repeatable alphabet: a 4-digit PIN (10 digits, 4 positions, repeats fine — 1111 is a valid PIN), a 3-letter code (26 letters, 3 positions), an 8-bit binary string (2 symbols, 8 positions). In every case the position count r stays fixed and the option count n stays available at each position regardless of what was chosen before it, which is precisely what distinguishes it from arranging items without repetition, where each pick shrinks the remaining pool by one.
n^r grows explosively as r increases, since each extra position multiplies the total by another factor of n rather than adding to it. A 4-digit PIN has 10,000 possibilities; a 6-digit PIN has 1,000,000 — a hundredfold jump from adding just two more digits. That same exponential growth is the mathematical backbone of the password-combination instrument, which applies this identical formula to measure how many guesses an attacker would need to exhaust a password's character space.
- Enter the number of options available at each position into n (options per position) — for a PIN, that's 10 (digits 0–9); for letters, 26.
- Enter the number of positions in the sequence into r (number of positions) — how many digits, letters or symbols long the sequence is.
- Read Permutations with repetition (n^r) beneath the inputs; the instrument raises n to the power of r for you.
- Repetition is assumed allowed throughout — if your scenario actually forbids reusing an item across positions, use the permutation-without-repetition instrument instead, which follows n! / (n − r)! rather than n^r.
- For a security or password-strength framing of this exact formula, see the password-combination instrument, which labels the same inputs as character-set size and password length.
Worked example — a 4-digit PIN code
A PIN code has 4 digit positions, and each digit can independently be any of 10 values, 0 through 9, with repeats allowed — 1111 and 1234 are both valid PINs. Enter n = 10 and r = 4. Each of the 4 positions has all 10 digits available regardless of what the other positions hold, so the count is 10 × 10 × 10 × 10 = 10^4 = 10,000. Permutations with repetition reads 10,000.
That's every possible 4-digit sequence from 0000 through 9999, inclusive — no digit position ever runs out of options because nothing is removed from the pool as positions fill. Compare that to arranging 4 digits without repetition, which would only allow 10 × 9 × 8 × 7 = 5,040 sequences, since each digit used would no longer be available for a later position; repetition roughly doubles the count here, and the gap widens further as r grows.
Questions
What does n^r count?
The number of ordered sequences of length r where each position is independently filled from n options, with repeats allowed. A 4-digit PIN has n = 10 options (digits 0–9) and r = 4 positions, giving 10^4 = 10,000 possible PINs, including ones with repeated digits like 1111.
How is this different from permutation without repetition?
Without repetition, each item is used at most once, so the pool shrinks with every position filled, giving n! / (n − r)!. With repetition, nothing is removed — every position independently has the full n options — giving n^r instead. For n = 10, r = 4: without repetition gives 5,040 arrangements, with repetition gives 10,000.
Why doesn't the pool shrink as positions get filled?
Because repetition means an option chosen for one position stays fully available for every other position too — nothing is used up. That's why each of the r positions independently multiplies by the same n, rather than by a shrinking count, giving the simple power n^r instead of a factorial ratio.
Can r be larger than n when repetition is allowed?
Yes, freely — since options are reused rather than consumed, there's no upper limit on r relative to n. A binary string (n = 2) can be any length r at all; an 8-bit string, for example, has 2^8 = 256 possible sequences even though there are only 2 symbols to choose from.
How does this relate to the password-combination calculator?
They compute the exact same formula, n^r, applied to a specific real-world case: password strength. The password-combination instrument uses this identical n^r calculation but labels n as character-set size and r as password length, and frames the result as a measure of how many guesses a brute-force attack would need.
What's a real example where repetition clearly isn't allowed?
Awarding gold, silver and bronze among a field of racers — once a racer takes gold, they can't also take silver, so the pool of remaining candidates shrinks at each step. That scenario needs the permutation-without-repetition formula, n! / (n − r)!, not n^r.