Password entropy measures how many guesses an attacker would need, expressed in bits. Each extra bit doubles the work. It is the most honest way to compare password rules, as long as the password is truly random.
Figures checked by Muhammad Ahmad against NIST SP 800-63B: Digital Identity Guidelines (authenticator entropy) and OWASP: Authentication Cheat Sheet. Prices and rules change, so confirm with the official source before relying on them. How we check the math
How it works
A password of length L drawn at random from N possible characters has N^L possible values. Entropy is log2(N^L) = L × log2(N) bits.
On average an attacker finds a random password after trying half of all possibilities, so the average time is N^L ÷ 2 ÷ guesses per second.
Attack speed depends on the situation. Online logins are usually rate-limited to a few guesses a second. If a site's password database is stolen, attackers guess offline, and speed depends on how the passwords were hashed: slow hashes like bcrypt allow thousands of guesses a second, fast ones allow billions.
A worked example
A 12-character password using letters and digits has 62^12 = 3.23 × 10^21 possibilities, which is 12 × log2(62) = 71.5 bits of entropy. At 10 billion guesses a second, finding it takes about 5,100 years on average.
More examples
A 16-character password from letters and digits has about 95 bits of entropy. An 8-character password using all 95 printable characters has about 52.6 bits and could fall in about 3.8 days at 10 billion guesses a second.
Common mistakes
- Assuming complexity beats length; extra length adds more.
- Treating human-chosen passwords as random.
- Reusing a strong password across sites.
- Ignoring the attack speed, which depends on how passwords are stored.
Questions people ask
Does this apply to passwords I make up myself?
No. The math assumes every character is chosen at random. Human-chosen passwords follow patterns, such as words, names and years, that attackers try first, so their real strength is far lower than this shows.
Is length or complexity more important?
Length. Adding symbols raises bits per character from about 5.95 to 6.57, while each extra character adds a full 5.95 or more. A longer password of letters and digits usually beats a shorter one with symbols.
How many bits of entropy is enough?
About 60 bits resists offline guessing against well-hashed passwords for a long time, and 80 bits or more is comfortable even against fast hashes. A password manager generating 16 or more random characters clears both easily.
How is password entropy calculated?
Entropy in bits = length × log₂(number of possible characters), for a password picked at random. A random 12-character password from 94 printable characters has about 12 × 6.55 = 78.7 bits.
Is a passphrase stronger than a password?
A randomly chosen passphrase can be. Five words picked at random from a 7,776-word list give about 64.6 bits, and six words give about 77.5, while being much easier to remember than random characters.