What is Password Entropy? Understanding Randomness and Security

Technical guide to password entropy: how it's calculated, what the numbers mean, entropy vs. complexity, and how to maximize your password's randomness.

What is Password Entropy? Understanding Randomness and Security

Password "entropy" measures unpredictability—the true indicator of password strength. This technical guide explains the math behind entropy and how to maximize your password security.

What is Entropy?

Definition: Entropy measures the amount of uncertainty or randomness in a password. Higher entropy = more secure.

Origin: From information theory (Claude Shannon, 1948) Units: Bits Formula: H = log₂(N^L)

Where:

  • H = Entropy (bits)
  • N = Number of possible characters (character set size)
  • L = Password length

Key concept: Each additional bit doubles the number of possibilities an attacker must try.

Entropy vs. Complexity

Common Misconception

Wrong: "Complex password = secure password"

  • P@ssw0rd feels complex (has symbols, numbers, capitals)
  • Actually only ~28 bits entropy
  • Based on dictionary word with predictable substitutions
  • Crackable in minutes

Right: "High entropy = secure password"

  • K9#mQ2$nL has high entropy (~59 bits)
  • Truly random characters
  • No patterns or dictionary basis
  • Takes years to crack

The Math

P@ssw0rd (9 characters, but predictable):

  • Base word: "password" (common dictionary word)
  • Substitutions: @ for a, 0 for o (well-known pattern)
  • Effective entropy: ~28 bits
  • Actual possibilities being tested: ~268 million (not 95^9)

K9#mQ2$nL (9 characters, random):

  • No dictionary base
  • True random selection
  • Full entropy: ~59.5 bits
  • Actual possibilities: ~572 trillion

Difference: 2 million times more secure despite same length!

Calculating Entropy

Character Set Size (N)

Character SetSize (N)Example
Lowercase only26abcdefgh
Uppercase only26ABCDEFGH
Lowercase + Uppercase52aBcDeFgH
Digits only1012345678
Alphanumeric (lower + upper + digit)62aB3dE7gH
Alphanumeric + symbols95aB3d#E7!
Extended ASCII256Full keyboard

Entropy by Password Type

8-character lowercase (password):

H = log₂(26^8)
H = 8 × log₂(26)
H = 8 × 4.7
H ≈ 37.6 bits

Possibilities: 208 billion

8-character all types (K9#mQ2$n):

H = log₂(95^8)
H = 8 × log₂(95)
H = 8 × 6.57
H ≈ 52.6 bits

Possibilities: 6.6 quadrillion

16-character all types (K9#mQ2$nL7@pR4x):

H = log₂(95^16)
H = 16 × log₂(95)
H = 16 × 6.57
H ≈ 105.1 bits

Possibilities: 4.4 × 10^31 (44 nonillion)

What Entropy Numbers Mean

Entropy Scale

< 28 bits: Very Weak

  • Examples: pass, 1234, qwerty
  • Crack time: Instant to seconds
  • Never use

28-36 bits: Weak

  • Examples: password, abc12345
  • Crack time: Seconds to minutes
  • Vulnerable to all attacks

36-60 bits: Fair

  • Examples: MyDog2024!, Summer2025
  • Crack time: Minutes to days (offline fast)
  • Acceptable for low-value accounts only

60-80 bits: Strong

  • Examples: K9#mQ2$nL7@p, Correct-Horse-Battery-Staple
  • Crack time: Years to centuries
  • Good for most accounts

80-128 bits: Very Strong

  • Examples: K9#mQ2$nL7@pR4xY, xQ9$mK2#nL7@pR4yW5zT8
  • Crack time: Millennia to age of universe
  • Excellent for all accounts

> 128 bits: Overkill (but good)

  • Crack time: Beyond computational limits
  • Good for paranoia or compliance requirements

Entropy and Crack Time

Attack Speed Reference

Online attacks: ~100 attempts/second

  • Rate limited by server
  • Account lockouts
  • Network latency

Offline slow (bcrypt): ~10 billion/second

  • Modern GPU
  • Properly salted hash

Offline fast (MD5): ~100 billion/second

  • Modern GPU
  • Weak or unsalted hash

Crack Time Calculations

Formula: Time = 2^(entropy) / attempts_per_second

40 bits entropy (e.g., MyPass1!):

Possibilities: 2^40 = 1.1 trillion
Offline fast: 1.1 trillion / 100 billion = 11 seconds

60 bits entropy (e.g., K9#mQ2$nL7@p):

Possibilities: 2^60 = 1.15 quintillion
Offline fast: 1.15 quintillion / 100 billion = 133 days

80 bits entropy (e.g., K9#mQ2$nL7@pR4xY):

Possibilities: 2^80 = 1.2 septillion
Offline fast: 1.2 septillion / 100 billion = 38,000 years

100 bits entropy:

Possibilities: 2^100 = 1.27 nonillion
Offline fast: 1.27 nonillion / 100 billion = 40 million years

Factors That Reduce Entropy

1. Dictionary Words

Example: correcthorsebatterystaple

Theoretical entropy:

26 characters, lowercase only
H = log₂(26^26) ≈ 122 bits

Actual entropy:

4 words from ~7,776 word dictionary
H = log₂(7776^4) ≈ 51.7 bits

Reduction: Dictionary reduces entropy by 70 bits!

Why: Attackers don't try all 26-character combinations—they try dictionary word combinations first.

2. Predictable Patterns

Example: Password123!

Theoretical entropy:

12 characters, mixed types
H = log₂(95^12) ≈ 78.8 bits

Actual entropy: ~30-35 bits

Why: Pattern is in attack dictionaries

  • "Password" = common base
  • "123" = common number sequence
  • "!" = common symbol addition

3. Character Repetition

Example: aaabbbccc123

Theoretical entropy:

12 characters
H = log₂(36^12) ≈ 62 bits

Actual entropy: Much lower

Why: Repetition reduces actual combinations

  • Only 3 unique letters (not 26)
  • Predictable pattern (repeated triples)

4. Sequential Characters

Example: abcdef123456

Theoretical entropy: 12 chars = high

Actual entropy: Very low

Why: Sequence detected immediately

  • Alphabet sequence
  • Number sequence
  • No randomness

5. Keyboard Patterns

Example: qwertyuiop12

Theoretical entropy: 12 chars = high

Actual entropy: Very low

Why: Well-known keyboard pattern

  • Top row of keys
  • Tested early in attacks
  • No actual entropy

Maximizing Entropy

Method 1: True Random Generation

Tool: Cryptographically secure random number generator (CSPRNG)

Example output: K9#mQ2$nL7@pR4xY

Why it's best:

  • No patterns
  • No dictionary words
  • Full entropy from character set
  • Maximum security per character

How to generate:

// Using Web Crypto API
const array = new Uint8Array(16);
crypto.getRandomValues(array);
const password = Array.from(array, byte =>
  charset[byte % charset.length]
).join('');

Best for: Password manager entries

Method 2: Diceware Passphrases

Method: Roll dice to select words from special dictionary

Example: correct-horse-battery-staple-mountain-river

Entropy calculation:

Diceware dictionary: 7,776 words (6^5 = 7,776)
6 words: log₂(7776^6) ≈ 77.5 bits

Why it works:

  • Truly random word selection (dice rolls)
  • Large dictionary
  • No human bias
  • Memorable (6 random words easier than 12 random characters)

Best for: Master passwords, memorizable passwords

Method 3: Random + Length

Principle: More length = more entropy (exponential relationship)

Comparison:

10 random chars: ~66 bits
12 random chars: ~79 bits  (+20% length = +13 bits)
14 random chars: ~92 bits  (+17% length = +13 bits)
16 random chars: ~105 bits (+14% length = +13 bits)

Each additional random character adds ~6.6 bits (if using 95 char set)

Best for: Maximum security needs

Common Entropy Mistakes

Mistake 1: Trusting Password Strength Meters

Problem: Many meters only check length and character types, not actual entropy

Example: Password123!

  • Some meters rate as "strong" (12 chars, all types)
  • Actual entropy: ~30 bits (dictionary + pattern)

Solution: Use tools that check for:

  • Dictionary words
  • Common patterns
  • Breach databases
  • Actual entropy calculation

Try our advanced checker →

Mistake 2: Overvaluing Complexity

Bad: P@ssw0rd! (looks complex, low entropy ~28 bits) Good: K9#mQ2$nL (truly random, high entropy ~59 bits)

Why: Substitutions (@ for a, 0 for o) are predictable

Mistake 3: Undervaluing Length

8 chars random: 52.6 bits 16 chars random: 105.1 bits

Doubling length doubles entropy (for truly random passwords)

Mistake 4: Human-Generated "Random"

Problem: Humans are terrible at random selection

Example: Asked to create random password

  • Often includes date/year (2024, 2025)
  • Often includes name fragments
  • Often follows patterns (Start with capital, end with !)

Solution: Always use computer-generated randomness

Entropy in Practice

Scenario 1: Banking Account

Requirement: Maximum security Recommended: 80+ bits entropy Example: K9#mQ2$nL7@pR4xY (16 random chars, ~105 bits)

Why:

  • High-value target
  • Financial loss risk
  • Store in password manager (don't need to remember)

Scenario 2: Master Password

Requirement: Memorable + secure Recommended: 77+ bits entropy Example: Correct-Horse-Battery-Staple-Mountain-River (6 Diceware words, ~77 bits)

Why:

  • Must remember (can't store in password manager)
  • Needs to be strong (protects all other passwords)
  • Passphrase balances memorability and entropy

Scenario 3: Shared WiFi Password

Requirement: Easy to communicate + reasonably secure Recommended: 64+ bits entropy Example: Sunset-Ocean-Mountain-River-2947 (5 words + number, ~68 bits)

Why:

  • Easy to say over phone
  • Can write on router (physical security)
  • Strong enough for WiFi protection

Scenario 4: Low-Value Account

Requirement: Unique + acceptable security Recommended: 60+ bits entropy Example: xQ9$mK2#nL7@ (12 random chars, ~79 bits)

Why:

  • Still needs to be unique (prevent credential stuffing)
  • Generated by password manager
  • Adequate security

Testing Your Password's Entropy

Want to calculate your password's real entropy?

Use our entropy calculator →

Our tool shows:

  • Theoretical entropy (based on length and character types)
  • Actual entropy (accounting for patterns and dictionary words)
  • Crack time estimates (for multiple attack scenarios)
  • Pattern detection (sequences, repetitions, common substitutions)
  • Breach status (15+ billion compromised credentials)

Privacy guarantee: All calculations happen in your browser locally.

Advanced: Entropy Analysis Tools

For Developers

zxcvbn (JavaScript library):

import zxcvbn from 'zxcvbn';
const result = zxcvbn('P@ssw0rd!');
console.log(result.entropy); // ~28 bits
console.log(result.crack_times_display); // Time estimates

passlib (Python library):

from passlib.pwd import genword
# Generate random password with target entropy
password = genword(entropy=80, charset='ascii_95')

For Security Professionals

hashcat (with mask attack to test entropy):

# Test 8-char all types (52.6 bits entropy)
hashcat -m 0 -a 3 hash.txt ?a?a?a?a?a?a?a?a

John the Ripper (incremental mode):

# Test increasing lengths
john --incremental=ASCII hash.txt

Entropy Requirements by Standard

NIST SP 800-63B

Minimum: ~40 bits entropy Recommended: ~80 bits entropy How to achieve: 12+ random characters or 6+ word passphrase

PCI DSS

Minimum: 7 characters (not entropy-based) Better interpretation: 50+ bits entropy How to achieve: 10+ random characters

HIPAA

Minimum: Not explicitly specified Recommended: 60+ bits entropy How to achieve: 12+ random characters

Check compliance with our validator →

Conclusion

Password entropy is the true measure of password strength:

Key principles:

  1. Entropy = unpredictability (not complexity)
  2. Length matters exponentially (each char adds ~6.6 bits)
  3. Randomness is critical (patterns reduce effective entropy)
  4. Dictionary words lower entropy (even if long)

Practical recommendations:

  • 60+ bits: Minimum for any account
  • 80+ bits: High-value accounts
  • 77+ bits: Master passwords (use passphrase)
  • 100+ bits: Maximum security needs

How to achieve:

  • Use password manager for true random generation
  • Use Diceware for memorizable passphrases
  • Aim for 12-16+ characters
  • Avoid patterns, dictionary words, personal information

Calculate your password's entropy now →


Related Reading:

Ready to Test Your Password Security?

Use our free password strength checker to analyze your passwords with advanced security metrics, breach checking, and personalized recommendations.