How to calculate password entropy
Password entropy measures how hard a password is to guess, in bits. For a randomly generated password, the formula is length × log2(number of possible characters). A 12-character password using upper and lower case letters, digits and symbols (94 characters) has 12 × 6.55 ≈ 79 bits. The password generator shows the entropy of every password it creates.
The formula
E = L × log2(N)
- L is the length of the password;
- N is the size of the character set the characters are drawn from;
- E is the entropy in bits.
Equivalently, the number of possible passwords is N^L, and the entropy is log2 of that number. Each extra bit doubles the number of guesses an attacker needs.
Character set sizes
| Characters used | N | Bits per character |
|---|---|---|
| digits only | 10 | 3.32 |
| lowercase letters | 26 | 4.70 |
| upper + lowercase | 52 | 5.70 |
| letters + digits | 62 | 5.95 |
| all printable ASCII | 94 | 6.55 |
Entropy by length
| Length | Lowercase (26) | Letters + digits (62) | All (94) |
|---|---|---|---|
| 8 | 38 bits | 48 bits | 52 bits |
| 10 | 47 bits | 60 bits | 66 bits |
| 12 | 56 bits | 71 bits | 79 bits |
| 16 | 75 bits | 95 bits | 105 bits |
| 20 | 94 bits | 119 bits | 131 bits |
Length wins: a 16-character password of letters and digits (95 bits) is far stronger than a 12-character password with symbols (79 bits).
From bits to cracking time
On average, an attacker has to try half of all possibilities: 2^(E−1) guesses. At 10 billion guesses per second, which fast graphics cards can reach against weak password hashes:
- 52 bits: about 3.5 days
- 66 bits: about 80 years
- 79 bits: hundreds of thousands of years
- 95 bits: far longer than the age of the universe
Sites that store passwords properly use slow hash functions such as bcrypt or Argon2, which cut the guessing rate by many orders of magnitude. But you rarely know how a site stores your password, so it is wise to assume the worst.
Entropy only applies to random passwords
The formula assumes every character is chosen uniformly at random. Human-made passwords are not. "Summer2026!" is 11 characters from the 94-character set, so the formula says 72 bits, but attackers try dictionary words, years and common patterns first and will crack it in seconds. Its real entropy is a small fraction of 72 bits.
For passphrases, count words instead of characters. With a list of 7,776 words (the Diceware list), each randomly chosen word adds log2(7,776) ≈ 12.9 bits. Four words give about 52 bits, six words about 78 bits.
How much entropy do you need?
- 60 bits or more for everyday online accounts protected by rate limiting.
- 80 bits or more for anything an attacker could attack offline: your password manager's master password, disk encryption, important email accounts.
- 128 bits is the level of modern encryption keys and is overkill for passwords, but a random 20-character password gets you there.
Practical rules
- Use a different password for every site, so one breach doesn't expose the others.
- Let a password manager generate random passwords of 16 characters or more.
- Turn on two-factor authentication wherever it is available.
Frequently asked questions
How many bits of entropy is a strong password?
Around 80 bits or more for important accounts. A random 12-character password from all 94 printable characters reaches about 79 bits.
Does adding a symbol increase entropy?
Using a larger character set raises the bits per character from 5.95 to 6.55, but only if the symbols are chosen at random. Adding more characters increases entropy more.
Is entropy the same as password strength meters?
Not exactly. Many strength meters estimate the entropy of human-chosen passwords by looking for patterns. The pure formula is only valid for random passwords.
Does the generator store my password?
No. Passwords are created in your browser with a cryptographically secure random generator and are never sent or saved.