The Mathematics of Password Entropy
Password entropy is the mathematical measure of unpredictability—the foundation upon which password security is built. Understanding entropy helps you make informed decisions about password strength rather than relying on arbitrary rules like "must contain special characters." This guide explains the mathematics behind our entropy calculator and how to apply it practically.
Information Theory Basics
Entropy comes from information theory, developed by Claude Shannon in . One bit of entropy represents one binary choice—yes or no, 0 or 1, heads or tails. Two bits represent four possibilities, three bits eight possibilities, and so on. Each additional bit doubles the search space an attacker must explore.
For passwords, entropy equals length multiplied by log₂ of the character set size. A password using 26 lowercase
letters has log₂(26) ≈
4.7 bits
per character. Using all 95 printable ASCII characters gives log₂(95) ≈
6.57 bits
per character. This logarithmic relationship means adding more character types provides diminishing returns compared to adding length.
Theoretical vs. Actual Entropy
Our calculator shows theoretical maximum entropy, assuming each character is chosen randomly with equal probability. Human-created passwords never achieve this maximum. We capitalize the first letter, add numbers at the end, and use predictable substitutions. These patterns reduce actual entropy dramatically—"Password1!" might calculate as 72 bits theoretically but have effectively 20 bits or less due to its predictability.
This is why randomly generated passwords are essential. True random generation achieves the theoretical entropy maximum, eliminating the patterns that reduce effective entropy in human-created passwords.
Entropy Targets for Different Security Levels
Security professionals recommend different entropy levels based on threat model. 40-50 bits protects against casual attacks and automated tools but not determined adversaries. 60-70 bits resists most attackers with significant resources. 80+ bits provides protection against nation-state level attackers for the foreseeable future. Beyond 128 bits , you're protected against attacks that would take longer than the remaining lifespan of the universe.
Match your entropy target to the value being protected. A throwaway forum account might only need 40 bits . Your primary email—which can reset other accounts—deserves 70+ bits . Cryptocurrency wallets or master passwords should have 100+ bits . Check your password strength to ensure it meets appropriate security levels.
Passphrases: A Different Entropy Approach
Passphrases calculate entropy differently. Instead of characters from a 95-character set, you're
choosing words from a word list. The standard EFF word list has
7,776 words
, giving log₂(7776) ≈
12.9 bits
per word. Four words provides about
52 bits
—equivalent security to an 8-character random password using all character types, but far more memorable.
The key is truly random word selection. "correct-horse-battery-staple" has 52 bits if each word was chosen randomly. "i-love-my-dog" has effectively zero entropy because it follows predictable patterns. Using a cryptographically random passphrase generator ensures maximum entropy while maintaining memorability.
Practical Entropy Optimization
For maximum security per character, use all available character types—this maximizes bits per character. For maximum memorability, use longer passwords with fewer character types. A 20-character lowercase password ( 94 bits ) beats a 12-character complex password ( 79 bits ) while being easier to type. Experiment with our entropy calculator to find your optimal balance.
For passwords managed by a password manager, maximize entropy with random generation—memorability doesn't matter. For passwords you type regularly (master password, device unlock), prioritize length over complexity and consider a passphrase. Always verify your choices with our crack time calculator to ensure adequate protection.