Arrangements with Repetition

N=nrN = n^{r}

Units aren’t used in this calculation: every value is a plain number.

sig figs

Worked example: Four-digit PIN → 10000 codes. Press Try an example to run it live, then adjust anything.

Enter your known values, leave one input blank, and solves for the missing one. Tap a variable’s symbol to see what it means, with a typical value.

Learning zone

Arrangements with Repetition explained

rnN

When each position is filled independently from the same n options and repeats are allowed, the count is n multiplied by itself r times. A four-digit PIN gives 10⁴ = 10,000 possibilities; an eight-character password from 95 printable ASCII characters gives 95⁸ ≈ 6.6 × 10¹⁵. Solved for r, the formula answers the security question directly: to exceed a billion possibilities with a 26-letter alphabet you need r = ln(10⁹)/ln 26 ≈ 6.4, so seven letters.

Exponentials of this kind are why the Enigma machine was formidable (its plugboard and rotor settings ran to about 1.6 × 10²⁰ configurations) and why Bletchley Park had to attack structure rather than count. The trap is applying nrn^r when repeats are forbidden: three distinct digits give 10 × 9 × 8 = 720 codes, not 1000. Also keep the roles straight: for a 4-digit PIN it is 10⁴ = 10,000, not 4¹⁰ = 1,048,576.

Arrangements with Repetition formula

N=nrN = n^{r}
Where
  • NN= Number of possible sequences
  • nn= Choices per position
  • rr= Number of positions
Revised 31 October 2026
Cite this page

formula.expert. (2026, October 31). Arrangements with Repetition Formula & Calculator. https://formula.expert/solvers/permutations-with-repetition