Password entropy, length, and character classes: speaking strength in numbers

4 min read

“Make your password long and complex” is universal advice, but how long and how complex are enough? is a question with an actual numerical answer. This article walks through password entropy and what brute-force resistance looks like in practice.

Entropy: a number for randomness

Password entropy is measured in bits, computed as:

entropy (bit) = log₂(charset_size ^ length)
              = length × log₂(charset_size)

Charset size depends on what characters you allow:

CharsetCharactersSize
Digits only0-910
Lowercase onlya-z26
Mixed caseA-Z, a-z52
AlphanumericA-Z, a-z, 0-962
Alphanumeric + symbols+ ~32 common ASCII symbols94
Full ASCII printable+ remaining symbols95

Examples:

  • 8-char alphanumeric → 8 × log₂(62) ≈ 47.6 bit
  • 12-char alphanumeric + symbols → 12 × log₂(94) ≈ 78.7 bit

Why bits map to brute-force trials

A password with N bits of entropy needs on average 2^(N-1) trials and at worst 2^N trials to brute-force.

  • 47.6 bit → average 2^46.6 ≈ 1.0 × 10^14 trials
  • 78.7 bit → average 2^77.7 ≈ 2.5 × 10^23 trials

Translating that to wall-clock time, given some hash rate, makes the gap concrete.

Estimated cracking time by hash rate

A single GPU hits roughly 10^10 SHA-256/s in 2026. 100 GPUs in parallel get you 10^12 hashes/s. From there:

EntropyCharset / lengthAvg time at 100-GPU rate
30 bit9 digitsunder 1 second
50 bit8-char alphanumerictens of minutes
70 bit11-char alphanumeric+symdecades
80 bit13-char alphanumeric+symthousands of years
100 bit16-char alphanumeric+symexceeds the age of the universe (~10^10 years)

The “practically uncrackable by brute force” threshold is around 80 bits. 100 bits is a comfortable target.

Assumes the server is using a fast hash

Those numbers assume the worst case: the server stores passwords with a fast hash like SHA-256. In reality, password storage should use deliberately slow hashes like bcrypt, scrypt, or Argon2, which can be hundreds to thousands of times slower per check.

Example: bcrypt at cost factor 10 takes about 0.1 seconds per hash. Even with 100 GPUs you only get ~10^6 hashes/s. A 50-bit password becomes practical in this setting — but if a database leak occurs and an attacker spends weeks of compute on offline cracking, the entropy gap matters again.

Why length beats complexity

Look at the entropy formula length × log₂(charset):

  • Charset 26 → 94: log₂(26) ≈ 4.7 to log₂(94) ≈ 6.55 — about 1.4×
  • Length 8 → 16: entropy doubles —

Length scales linearly; adding character classes scales logarithmically. “12 characters of plain alphanumeric” beats “8 characters with symbols”.

This is why modern guidance favors length over complexity. NIST SP 800-63B (2017 revision) explicitly moved away from mandatory complexity rules in favor of longer minimums.

Where humans hit the wall: passphrases

The longest “random” password a person can reliably memorize tops out around 12–14 characters — roughly 80 bits.

To exceed that, passphrases (random words from a dictionary) are the practical option:

4 random words from a 10,000-word list = 4 × log₂(10000) ≈ 53 bits
6 words ≈ 80 bits

The famous XKCD strip “correct horse battery staple” gives about 44 bits, which is on the weaker side by today’s standards. 6 words is the modern recommended minimum for memorable passphrases.

A note on strength meters

The strength meters you see on signup forms vary widely in quality:

  • zxcvbn (originally from Dropbox) — detects dictionary words, keyboard runs, repetition. Reasonably accurate.
  • Naive class checks — “contains upper, lower, digit, symbol?“. Tends to over-rate weak patterns.
  • Length-only meters — too simplistic.

A site that accepts Aa1!aaaa as “strong” is using a meter that doesn’t reflect real entropy. zxcvbn or equivalent is the right baseline.

Practical targets

Use caseRecommended entropyExample (alphanumeric+symbols)
Throwaway account≥ 50 bit8 chars
General use≥ 70 bit11 chars
Important / encryption≥ 100 bit16+ chars
Machine-generated (API keys, etc.)≥ 128 bit22+ base64 chars

For passwords you have to remember, use a passphrase of 6+ random words. For everything else, let a password generator pick.

The password generator on this site shows the entropy of the generated password as you adjust length and character classes — useful when you want to see “how many bits am I making” while choosing settings.