Password strength and entropy explained
How password entropy is calculated, what the numbers mean in guesses and time, and what NIST guidance says about length and passphrases.
By the tools4free.dev team · Last reviewed 4 December 2026
Password entropy is a measure, in bits, of how unpredictable a password is. For a password chosen at random, it equals the length multiplied by the base-2 logarithm of the number of possible characters: entropy = length x log2(pool size). Each extra bit doubles the number of guesses an attacker needs. The catch is that the formula only holds when the password is truly random. A password a person made up has far less entropy than its length suggests. This guide shows the maths, runs three examples, and explains what current advice from NIST recommends.
The formula, step by step
If a password has L characters and each is picked uniformly at random from a pool of N possible characters, there are N^L possible passwords. Entropy in bits is the base-2 logarithm of that count:
entropy = log2(N^L) = L x log2(N)
Common pool sizes are:
| Character set | Pool size N | Bits per character |
|---|---|---|
| Digits only (0-9) | 10 | 3.32 |
| Lower-case letters | 26 | 4.70 |
| Upper and lower-case letters | 52 | 5.70 |
| Letters and digits | 62 | 5.95 |
| Letters, digits and 32 symbols | 94 | 6.55 |
| One word from a 7,776-word list | 7,776 | 12.92 per word |
Notice what dominates. Going from lower-case only (4.70 bits per character) to the full 94-character set (6.55 bits) adds about 1.85 bits per character. Adding another character to a long password adds 4.7 to 6.55 bits. Length is the cheaper way to buy strength.
Worked example 1: lengths and pools compared
| Length | Lower-case (26) | Letters and digits (62) | All printable (94) |
|---|---|---|---|
| 8 | 37.6 bits | 47.6 bits | 52.4 bits |
| 12 | 56.4 bits | 71.5 bits | 78.7 bits |
| 16 | 75.2 bits | 95.3 bits | 104.9 bits |
| 20 | 94.0 bits | 119.1 bits | 131.1 bits |
A 16-character random lower-case password (75.2 bits) is stronger than an 8-character password using every character type (52.4 bits), by a factor of 2^22.8, roughly seven million times. Making a short password more complicated is a weak trade next to making it longer.
Worked example 2: turning bits into guesses and time
An attacker who has stolen a database of hashed passwords can guess offline, as fast as their hardware allows. On average they find the password after trying half the space, so the expected number of guesses is 2^(bits - 1). Assume a very fast attack on a weakly protected hash: 10 billion guesses per second (10^10). This is an illustrative rate, not a measurement of any particular system.
| Password | Entropy | Average time at 10^10 guesses per second |
|---|---|---|
| 8 random lower-case letters | 37.6 bits | about 10 seconds |
| 8 random characters from 94 | 52.4 bits | about 85 hours (3.5 days) |
| 12 random characters from 94 | 78.7 bits | about 750,000 years |
| 16 random letters and digits | 95.3 bits | about 76 billion years |
The working for the second row: 2^51.4 is about 3.05 x 10^15 guesses, divided by 10^10 per second is about 3.05 x 10^5 seconds, or 85 hours. If the site stores passwords with a deliberately slow algorithm (see the hashing guide), the rate falls by many orders of magnitude and every row improves. If it uses a fast general-purpose hash, the rate can be higher than assumed here. Online attacks against a login form are far slower, since sites rate-limit them, which is why short passwords are less risky online than offline.
Worked example 3: passphrases
A passphrase of random words has the same maths with a much larger "character" set. With a list of 7,776 words (the size of the well-known dice-based lists, 6^5), each word adds log2(7776) = 12.92 bits.
- 4 words: 4 x 12.92 = 51.7 bits, about the same as 8 random characters from the full set.
- 5 words: 64.6 bits.
- 6 words: 77.5 bits, comparable to 12 random characters, but far easier to type and remember.
The words must be picked by dice or a random generator, not chosen by you. A phrase from a song or a favourite quote is not a random selection and gets almost none of this credit.
Why the formula overestimates human passwords
The calculation assumes every character is independent and uniformly chosen. People do not choose that way. Summer2026! uses upper-case, lower-case, digits and a symbol, and a naive calculator might rate it near 70 bits (11 x 6.55). In reality it is a dictionary word, a season-year pattern and a common trailing symbol, which attackers try early in their lists. Its real strength is closer to a few tens of bits at best. A password that has appeared in a breach is effectively zero, no matter how long it is, because attackers try known passwords first.
What current guidance says
NIST Special Publication 800-63B, the US digital identity guidelines, changed the conventional advice. In summary:
- Favour length, and allow long passwords and passphrases (verifiers should permit at least 64 characters).
- Do not impose composition rules such as "one symbol and one number".
- Do not force periodic password changes without evidence of compromise.
- Check new passwords against lists of known-compromised and commonly used passwords.
- Allow paste, so that password managers work.
The document also sets minimum lengths, which differ between revisions, so read the current version for the exact numbers. The thrust is the same: random, long and unique beats short and complex.
Common mistakes
- Trusting a strength meter that counts character types but not dictionary words or breaches.
- Reusing one strong password on many sites. One breach exposes them all.
- Making predictable substitutions (a for @, o for 0). Attackers' tools apply them automatically.
- Adding a number to the end of a short word and calling it strong.
- Choosing a passphrase from a famous line, lyric or your own details.
- Rotating a password by changing one digit. The new password is as guessable as the old one.
- Skipping multi-factor authentication. A password with 100 bits of entropy can still be phished, so add a second factor on important accounts.
- Storing passwords in a plain text file or browser notes. Use a reputable password manager.
Frequently asked questions
How many bits of entropy is enough?
For an account protected by a slow password hash and rate limits, 60 to 80 bits of true randomness is generally ample. For something that must resist offline attacks against a weak hash for years, aim for 80 or more. These are rules of thumb, not guarantees.
Is a long passphrase better than a short random password?
Per keystroke, random characters carry more bits. Per unit of memorability, random words win. Six random words match 12 random characters in strength and are much easier to type.
Do symbols make a password much stronger?
Slightly, if they are random. A symbol set raises the pool from 62 to 94, adding about 0.6 bits per character. Adding one more character does more than that.
Are online strength meters safe?
Only if the check runs locally in your browser. Do not type a real password into a site that sends it to a server.