Password entropy is the number that says how hard a password is to crack. It replaces vague rules like "add a symbol" with real math — and explains why a long, simple password beats a short, complex one. Here are the formula, numbers and rules that follow.
What password entropy measures
Entropy measures the size of the search space an attacker must work through to guess a password, expressed in bits. For a randomly generated password the formula is:
entropy = log2(pool^length) = length × log2(pool)
where pool is the number of possible characters per position (26 for lowercase, 94 for all printable ASCII) and length is the character count. The formula assumes every character was chosen uniformly at random — true for generated passwords, not for ones humans invent.
Bits translate directly into guess counts: n bits means 2^n possibilities, and each extra bit doubles the work. 38 bits is about 268 billion possibilities; 52 bits is about 4.5 quadrillion; 94 bits is roughly 2 × 10^28. As a benchmark, a GPU rig making 10 billion guesses per second against a fast, unsalted hash exhausts a 38-bit space in seconds, a 52-bit space in about a week, and a 75-bit space in over 100,000 years. Slow, salted hashes like bcrypt or Argon2 multiply those times enormously; leaked password lists shrink them to nothing.
Entropy by length and character set
The table shows entropy in bits (rounded) for random passwords at four pool sizes: 26 (lowercase), 52 (mixed case), 62 (letters and digits) and 94 (all printable ASCII).
| Length | 26 (a-z) | 52 (a-zA-Z) | 62 (a-zA-Z0-9) | 94 (all ASCII) |
|---|---|---|---|---|
| 8 characters | 38 bits | 46 bits | 48 bits | 52 bits |
| 12 characters | 56 bits | 68 bits | 72 bits | 79 bits |
| 16 characters | 75 bits | 91 bits | 95 bits | 105 bits |
| 20 characters | 94 bits | 114 bits | 119 bits | 131 bits |
Two things stand out. Entropy doubles when length doubles. And the columns sit close: at any length, jumping from lowercase-only to full ASCII is worth less than two extra characters. The Password Generator labels under 40 bits Weak, 40-59 Fair, 60-79 Strong and 80+ Excellent — 8 characters never leaves Fair, while 16 is Strong or better everywhere.
Why length beats complexity
The per-character math explains it. One lowercase character adds log2(26) ≈ 4.7 bits; one from the full 94-character set adds ≈ 6.6 bits. Widening the pool buys under 2 bits per character — while each added character stacks its full 4.7 to 6.6 bits on top of everything before it.
Concrete comparison: 8 characters drawn from all 94 give about 52 bits. Twelve lowercase-only characters already give 56 — stronger, and easier to type. Sixteen lowercase reach 75 bits, beating 8 of anything by a factor of millions. Entropy grows linearly with length but only logarithmically with pool size, so characters beat character classes every time. Complexity rules still matter for invented passwords — they block "password" and "letmein" — and NIST's guidelines (SP 800-63B) likewise favor length and screening against breached passwords over forced symbols.
Passphrases: entropy you can remember
The same formula works when the "characters" are whole words. With Diceware you roll five dice to pick a word from a fixed list of 7,776 words (6^5) and repeat. Each word adds log2(7,776) ≈ 12.9 bits:
| Random words | Entropy | Comparable character password |
|---|---|---|
| 4 words | ≈ 52 bits | 8 random characters, full ASCII |
| 5 words | ≈ 65 bits | 10 random characters, full ASCII |
| 6 words | ≈ 78 bits | 12 random characters, full ASCII |
Five random words like correct horse battery staple (the famous xkcd example) reach about 65 bits — Strong, yet memorizable. The catch is the word "random": the words must be drawn by chance. A sentence you invent has far less entropy, because people pick common words in grammatical order.
What ruins entropy
The formula only describes uniform randomness. Predictability collapses real entropy:
- Human patterns. Capital first letter, digits and a symbol tacked on the end, keyboard walks like
qwerty, substitutions likep@ssw0rd— cracking tools try these first. A "10-character" password built this way may effectively hold 20-30 bits, not 60+. - Dictionary words and names. Attackers run lists of billions of passwords leaked in past breaches before brute-forcing anything; a password found in a breach is effectively zero-entropy at any length.
- Reuse. Entropy protects against guessing, not exposure. When one site is breached, every account sharing that password falls to credential stuffing — automated replay of leaked credentials elsewhere.
- Weak server-side storage. Sites hashing passwords with fast algorithms like MD5 or SHA-1 allow billions of guesses per second after a breach. You cannot control this, which is why high entropy and uniqueness both matter.
Practical advice
- Use a unique password per site. Uniqueness is the only defense that survives a breach of one service.
- Let a password manager remember them. Then every password can be 16-20 random characters. Guard the manager itself with a strong passphrase and 2FA.
- Turn on two-factor authentication wherever offered — an authenticator app or hardware key beats SMS. A leaked password alone is then not enough.
- Generate with cryptographic randomness. The Password Generator uses your browser's
crypto.getRandomValueswith rejection sampling, so every character is uniform and unbiased — exactly what the entropy formula assumes. Aim for 60 bits or more, and 80+ for email, banking and your password manager. - Use passphrases for what you must memorize. Five or six truly random words beat any clever scheme.