How Password Entropy Works

The math behind ‘bits of entropy’ — H = L·log₂(N) — with worked examples, attacker models, and why meter scores and entropy are not the same thing.

Entropy is the one honest, quantitative way to talk about password strength — provided it is applied to how the password was generated, not just what it looks like.

What entropy measures

Entropy measures uncertainty: how many possibilities an attacker must search, on average, to guess your password. It is expressed in bits: each bit doubles the search space. 260 possibilities is "60 bits" — roughly a billion billion.

The formula, worked

H = L × log₂(N)

H = entropy in bits
L = password length
N = size of the character pool each position is drawn from

Example: 16 characters chosen truly randomly from lowercase + digits (pool N = 36):

H = 16 × log₂(36) ≈ 16 × 5.17 ≈ 82.7 bits

Play with every combination on our entropy calculator.

Worked examples (truly random generation)

Password typePoolLengthEntropy
PIN, digits only106~19.9 bits
lowercase only2612~56.4 bits
lower+upper+digits6212~71.5 bits
all four types9516~105.2 bits
5-word passphrase (1,296-word list)12965 words~51.7 bits
7-word passphrase12967 words~72.4 bits

Notice what matters: pool size adds a little; length adds a lot — every extra random character multiplies the space.

Why humans break the math

The formula assumes each character is uniformly and independently random. Humans pick words, names, dates and patterns — distributions an attacker models with frightening accuracy. A human-chosen "12-character password" is nowhere near 71 bits; a randomly generated one is. This is why Math.random()-free generation and dice-word passphrases matter: the process creates the entropy.

Attacker models and time

  • Online attacks (guessing through a login form) throttle to single-digit guesses per second — even 30–40 bits survives for years.
  • Offline attacks on fast hashes (leaked MD5/SHA-1 databases) run ~1011 guesses/second on a decent rig — weak passwords fall in milliseconds.
  • Slow password hashing (bcrypt, scrypt, Argon2) drops that to ~104–105/second, buying back orders of magnitude.

Add it up as "time ≈ 2H−1 / guesses-per-second" — half the space, on average, before the attacker finds you.

Entropy vs strength scores

Our checker shows both a 0–100 score and an entropy estimate. The score is a heuristic that penalizes patterns; the entropy figure is the naive pool-based number adjusted downward by those findings. Neither is a guarantee — pattern analysis cannot know how your password was actually generated. Treat both as guidance, not proof.

Takeaways

  • Entropy comes from random generation, not cleverness.
  • Length is the cheapest entropy: +6.6 bits per extra random mixed character.
  • ~80 bits is effectively unguessable offline; ~45+ suffices behind rate-limited logins with 2FA.
  • You do not choose between memorable and random — passphrases give both.

Hands-On Security Practice

Apply what you learned with our zero-telemetry tools and references:

Put it into practice: run your next password through the local checker — it never leaves your browser.

Keep reading

Related guides