Permutations with Repetition Calculator
How many ordered sequences of length r you can build from n symbols when repeats are allowed — passwords, PINs, number plates and DNA.
If every position can hold any of n symbols independently, the count is simply n multiplied by itself r times: nʳ.
How the permutations with repetition calculator works
If every position can hold any of n symbols independently, the count is simply n multiplied by itself r times: nʳ. A four-digit PIN is 10⁴ = 10,000; an eight-character password from 95 printable ASCII characters is 95⁸, about 6.6 quadrillion.
The calculator also reports the bits of entropy — log₂ of the count — which is how password strength is properly measured.
Formula: arrangements = nʳ; entropy = r × log₂ n bits
Worked examples
| Inputs | Possible sequences | Note |
|---|---|---|
| A 4-digit PIN | 10,000 | 10,000 — 13.3 bits |
| An 8-character password from 95 characters | 6.6342e15 | 6.6 × 10¹⁵ |
| A 6-character alphanumeric code | 2,176,782,336 | 2.18 billion |
FAQFrequently asked questions
How many 4-digit PINs are there?
10,000 — every value from 0000 to 9999.
What is entropy in bits?
log₂ of the number of possibilities. Each bit doubles the search space; 4-digit PINs carry 13.3 bits, which is nothing.
How strong is an 8-character password?
From the full 95-character printable set, about 52 bits — crackable by a determined attacker. Length beats complexity: a 5-word passphrase carries more.
What is the difference from nPr?
nPr forbids reuse. Here every position is independent, so nʳ is always the larger count.
Does this measure a real password's strength?
Only if it was generated uniformly at random. A password a person chose carries far less entropy than its length suggests.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Common Core State Standards — Mathematics — the terms and methods taught in US schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.