Password Entropy Calculator
Solve the classic entropy relation E = L · log₂(N) for any of its three unknowns — password entropy, password length, or effective character-set size — with step-by-step math, a strength meter, and companion guessing-time estimates.
Length is the dominant lever
Because entropy is linear in L but logarithmic in N, adding characters is far more powerful than adding symbols. Going from 8 to 16 characters doubles the bits; going from a 62-character alphabet to a 95-character alphabet adds only log₂(95/62) ≈ 0.62 bits per character. A 16-character lowercase passphrase beats an 8-character "complex" password almost every time.
Character-set size is logarithmic
Every doubling of the alphabet adds exactly one bit per character. Digits (10) → lowercase (26) → alphanumeric (62) → printable ASCII (95) → extended (256) gives 3.32, 4.70, 5.95, 6.57 and 8.00 bits per character respectively. Past 95 the gains flatten sharply, which is why "use a symbol" policies add less than most people assume.
Real-world entropy is lower than theoretical
The formula assumes every character is chosen uniformly at random. Human-chosen passwords are not: they follow dictionary words, keyboard patterns, dates and leetspeak substitutions. A "12-character complex" human password may have only 30–40 bits of real entropy. Passphrase generators and password managers produce passwords that actually reach the theoretical value.
Guessing time doubles per bit
Adding one bit of entropy doubles the number of guesses an attacker must make. The relationship between entropy and crack time is exponential: 40 bits is minutes on a GPU rig, 60 bits is months, 80 bits is geological time, and 128 bits is beyond any known or foreseeable classical computer. This is why 128-bit security is the standard target for cryptographic keys.
How to Use This Calculator
The entropy relation links three quantities: E, L, and N. Pick which one you want the tool to solve, then fill in the other two.
1. Choose what to solve for
Pick E, L, or N from the toggle. The calculator rearranges E = L · log₂(N) automatically for whichever you choose.
2. Use realistic presets
Presets cover typical values: entropy from 28 to 128 bits, length from 6 to 24 characters, and character-set size from digits (10) to extended byte range (256).
3. Pick the right alphabet
Use the character-set presets: 10 for PINs, 26 for lowercase passphrases, 62 for typical alphanumeric passwords, 95 for full printable ASCII. If the password uses only a subset in practice, use the effective size — not the maximum available.
4. Read the result and verdict
The result card shows the entropy in bits plus the equivalent number of guesses (2^E), the strength verdict, and a colour-coded strength meter.
5. Check the schematic and charts
The schematic shows how length and alphabet size feed into the entropy result. The chart plots entropy against length for three alphabet sizes.
6. Switch to Advanced for depth
Advanced mode adds a chart of entropy vs. character-set size, a sensitivity check on a +1 change, and companion metrics including guess count, crack time at various speeds, and classification.
What This Tool Offers
Built around the classic entropy relation E = L · log₂(N), the fundamental link between password length, alphabet size, and brute-force resistance.
Three-way solving
Solve for entropy, length, or character-set size. The calculator rearranges the formula for whichever variable you choose.
Clean entropy schematic
A length-and-alphabet-to-entropy diagram with animated-looking flow arrows and live labels that scale with your inputs.
Strength verdict and meter
Each result is classified from very weak through weak, moderate, strong, very strong, to extreme, with a colour-coded badge and live meter bar.
Guess-count and crack-time hints
Each field shows the value converted to related units — total guesses for entropy, and equivalent entropy for length and alphabet size.
Dual comparison charts
Entropy vs. length for three alphabet sizes, plus an advanced entropy vs. alphabet-size chart for three lengths.
Reference tables
Bits per character by alphabet, entropy targets by account type, and a full variable reference table with unit notes.
Reference Tables & Conversions
A bits-per-character lookup, an entropy target grid, and typical values by account type.
Bits per character by alphabet size
Entropy Lookup at Various Lengths
Computed from E = L · log₂(N). Values in bits.
| Length L | N = 10 (digits) | N = 26 (lowercase) | N = 62 (alphanumeric) | N = 95 (printable ASCII) | N = 256 (extended) |
|---|
Typical Entropy and Crack Time by Account Type
Representative targets. Crack times assume an offline attack at 10¹² guesses per second (a mid-range GPU cluster).
| Account / use | Recommended entropy (bits) | Equivalent | Offline crack time @ 10¹² g/s | Notes |
|---|---|---|---|---|
| PIN / low-value | ~20 bits | 6 digits | < 1 second | Only acceptable with rate limiting and lockout |
| Legacy website password | ~40 bits | 8 lowercase | ~18 minutes | Weak against offline attacks |
| Decent user account | ~60 bits | 12 alphanumeric | ~18 months | Acceptable for low-value online accounts |
| Strong user account | ~80 bits | 16 alphanumeric | ~1.9 billion years | Standard target for password managers |
| High-value / admin | ~100 bits | 20 alphanumeric | ~10²¹ years | Recommended for privileged accounts |
| Cryptographic key | 128+ bits | 22 alphanumeric | > age of universe | Beyond classical brute force |
Variable Reference
| Symbol | Meaning | Typical range | Units |
|---|---|---|---|
| E | Password entropy | 20 – 128+ | bits |
| L | Password length | 6 – 64 | characters |
| N | Character-set size | 10 – 256 | symbols |
| log₂(N) | Bits contributed per character | 3.32 – 8.00 | bits/char |
| 2^E | Total guess space size | 10⁶ – 10³⁸+ | guesses |
| G | Attacker guess rate | 10⁶ – 10¹⁵ | guesses/second |
What Does E = L · log₂(N) Measure?
The password entropy relation connects three quantities that describe the brute-force resistance of any password or key: the number of bits of uncertainty an attacker faces (E), the number of characters in the secret (L), and the number of distinct symbols each character is drawn from (N). Together they quantify how many guesses an attacker must make, on average, to find the secret by exhaustive search.
Password Entropy Formula
The defining relationship is:
Rearranged to solve for the other two unknowns:
N = 2^(E / L)
When the alphabet is a power of two — e.g. N = 256 — the formula simplifies to E = 8L, which is why one byte of key material equals eight bits of security.
Password Entropy Variables
| Symbol | Meaning | Notes |
|---|---|---|
| E | Entropy in bits | Number of bits of uncertainty in the secret |
| L | Password length | Number of characters in the secret |
| N | Character-set size | Number of distinct symbols each character may be |
| log₂(N) | Bits per character | Information contributed by each character drawn uniformly |
| 2^E | Guess space | Total number of possible passwords an attacker must try |
| G | Guess rate | Attacker's guesses per second; determines crack time as 2^E / G |
How Each Variable Affects Security
Because the relation is linear in L but logarithmic in N, length and alphabet size are not equal partners. Doubling the length doubles the bits of entropy; doubling the alphabet size adds only one bit per character. In practice this means a long passphrase drawn from a small alphabet can easily beat a short password drawn from a large one. "correct horse battery staple" is four words from a ~7,776-word list, giving 4 · log₂(7776) ≈ 51.7 bits — comparable to a random 8-character alphanumeric password, but far easier to remember.
Real-world entropy is almost always lower than the formula suggests, because humans do not choose characters uniformly at random. Dictionary words, keyboard walks, dates, names, and predictable substitutions (a → @, o → 0) collapse the effective alphabet and length. The formula is therefore best understood as an upper bound — a ceiling on the security a password of a given structure can provide — not a guarantee. Password managers and passphrase generators produce secrets that actually reach the theoretical value.
Password Entropy Calculation Examples
E = 16 × log₂(62) = 16 × 5.9542 = 95.27 bits
L = 95.27 / log₂(62) = 95.27 / 5.9542 = 16 characters
N = 2^(95.27 / 16) = 2^5.9542 = 62 symbols
Time = 2^80 / 10¹² seconds ≈ 1.2 × 10¹² seconds ≈ 38,000 years
Frequently Asked Questions
For most user accounts, yes — 80 bits is the standard target recommended by NIST and used by password managers. At 10¹² guesses per second, an 80-bit search takes on the order of 10¹² seconds, or about 38,000 years, and real-world attackers rarely sustain that rate against a well-hashed password. For high-value accounts, cryptographic keys, or anything protecting long-lived secrets, aim for 100–128 bits. Entropy above 128 bits gives no practical benefit against classical computers.
Because entropy is linear in length but logarithmic in alphabet size. Each extra character multiplies the guess space by N, so adding a character to a 16-character password multiplies the work by 62. Switching from lowercase-only (N=26) to alphanumeric (N=62) multiplies the per-character work by only 62/26 ≈ 2.4, about 1.25 bits. In practice, a 20-character lowercase passphrase (20 × 4.70 = 94 bits) beats a 12-character fully complex password (12 × 6.57 = 79 bits) by a wide margin and is easier to remember.
The formula assumes every character is chosen uniformly at random and independently. Humans do not do that. Passwords built from dictionary words, names, dates, keyboard patterns, or predictable substitutions have far less entropy than the formula suggests — often 20–30 bits less for a typical "complex-looking" password. The tool gives the theoretical maximum for a given length and alphabet; for a real password, use a strength estimator that models human patterns, or use a password manager to generate genuinely random secrets.
Use the size of the pool the password was actually drawn from, not the maximum the input field allows. Digits-only PIN = 10. Lowercase passphrase from a word list = the list size, not 26. Random alphanumeric = 62. Random printable ASCII = 95. Random bytes = 256. If you are not sure, use the smaller number — overestimating N overestimates security.
Crack time ≈ 2^E / (2 · G), where G is the attacker's guess rate in guesses per second. The factor of 2 reflects that on average the attacker finds the password halfway through the search space. At G = 10¹² g/s: 40 bits ≈ 18 minutes, 60 bits ≈ 18 months, 80 bits ≈ 38,000 years, 100 bits ≈ 2 × 10¹⁸ years, 128 bits ≈ 5 × 10²⁶ years. Real attackers also use dictionaries and pattern rules, which can reduce effective entropy by 20–30 bits for human-chosen passwords.
No — entropy is a property of the password itself, not of how it is stored. The hashing algorithm affects the attacker's guess rate G, and therefore the crack time, but not the number of bits of uncertainty. A password with 60 bits of entropy stored with bcrypt at cost 12 might take centuries to crack; the same password stored with unsalted MD5 would fall in minutes. Both statements are consistent because G differs by many orders of magnitude between the two algorithms.
A randomly generated passphrase — four or more words chosen uniformly from a large word list — typically has both high entropy and high memorability, which is the best of both worlds. A four-word passphrase from a 7,776-word list has 4 × log₂(7776) ≈ 51.7 bits; six words gives ≈ 77.5 bits; eight words gives ≈ 103 bits. A human-invented phrase like "ILoveMyDog2019!" has far less, because the words are predictable. Use a generator that picks words at random.
Variables
| Symbol | Quantity | Unit |
|---|---|---|
| Entropy | Password entropy | bits |
| L | Password length | characters |
| N | Size of character set used |
What it means
Password entropy is a measure of the unpredictability of a password, expressed in bits. It quantifies the number of guesses required on average to crack the password via brute force. The entropy is calculated as E = L × log₂(N), where L is the length of the password and N is the number of possible characters (e.g., 26 lowercase, 52 alphanumeric, 95 printable ASCII). Higher entropy means exponentially more combinations to test. For example, an 8‑character password with 95 characters yields about 52.6 bits of entropy, meaning 2^52.6 ≈ 6.5 × 10^15 possible passwords. In practice, a minimum of 80 bits is recommended for security. The formula guides password policy creation: longer passwords and larger character sets increase entropy. However, dictionary attacks and common patterns reduce effective entropy. Understanding entropy helps in evaluating password strength and in designing authentication systems. It is also used in cryptographic key generation.
Worked example
Password Entropy – Two Examples
Real‑World| Parameter | Value |
|---|---|
| L (length) | 8 |
| N (character set) | 26 |
| Parameter | Value |
|---|---|
| L (length) | 12 |
| N (character set) | 94 |
Common mistakes
- Character set size N: Count the number of possible characters (e.g., 26 for lowercase, 52 for mixed case, 95 for printable ASCII).
- Log base: Use log₂ (base‑2) to get bits.
- Length L: The password length; longer passwords increase entropy linearly.
- Entropy vs. security: Higher entropy means stronger resistance to brute‑force, but does not protect against other attacks (e.g., phishing).
- Randomness: Entropy calculations assume truly random characters; predictable patterns reduce effective entropy.
Applications
Password entropy, measured in bits, is calculated as L × log₂(N), where L is the password length and N is the character set size. It quantifies the strength of a password against brute‑force attacks. Engineers use this formula to enforce password policies, to design authentication systems, and to educate users on choosing strong passwords. In security audits, entropy helps evaluate the resistance of passwords to cracking. Understanding this formula is also critical for implementing password hashing and key derivation functions, as well as for setting minimum complexity requirements. It is a fundamental concept in cybersecurity that directly impacts the security posture of any system.
- Password policy design and enforcement
- Authentication system security assessment
- User education on password strength
- Security audits and risk analysis
- Design of password managers and generators
Related calculators · Algorithms
Recently updated formulas
Suggest an improvement
Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.