Every strength meter that turns green when you add a symbol is trying to estimate one thing: entropy. Password strength is not a vibe or a checklist — it is a measurable quantity, expressed in bits, that tells you how hard a password is to guess. Once you understand the math, the usual advice ("make it longer") stops being a slogan and starts being arithmetic. This is a math-first tour of what entropy is, how it is calculated, and why the numbers behind crack-time estimates deserve a healthy dose of skepticism.
What entropy actually measures
Entropy measures uncertainty. For a password chosen uniformly at random, it answers the question: how many equally likely possibilities did this password come from? We express it in bits, where each additional bit doubles the number of possibilities. A password with 40 bits of entropy is one out of 2^40 (about a trillion) equally likely candidates; 50 bits is one out of 2^50, which is 1,024 times larger.
Summer2026!, which are far weaker than their length suggests because people are predictable.The formula: length x log2(charset)
For a password of length L drawn from a character set with N possible symbols, the number of possible passwords is N^L. Entropy is the base-2 logarithm of that count:
H = log2(N^L) = L × log2(N)
In plain terms, each character contributes a fixed number of bits equal to log2(N), and you multiply by how many characters you have. The per-character value depends only on how big the alphabet is:
| Character set | Size N | Bits per character (log2 N) |
|---|---|---|
| Digits only (0-9) | 10 | 3.32 |
| Lowercase letters | 26 | 4.70 |
| Upper + lower letters | 52 | 5.70 |
| Letters + digits | 62 | 5.95 |
| All printable ASCII (+ symbols) | 94 | 6.55 |
How length and charset combine
Multiply bits-per-character by length and you get the entropy of a randomly generated password. The table below shows total bits for common combinations (rounded):
| Character set (N) | 8 chars | 12 chars | 16 chars | 20 chars |
|---|---|---|---|---|
| Digits (10) | 27 | 40 | 53 | 66 |
| Lowercase (26) | 38 | 56 | 75 | 94 |
| Alphanumeric (62) | 48 | 71 | 95 | 119 |
| All ASCII (94) | 52 | 79 | 105 | 131 |
As a rough industry guideline, under 40 bits is weak, 60–80 bits is reasonable for most accounts, and 100+ bits is comfortably future-proof for random secrets. A 16-character alphanumeric password (about 95 bits) is already very strong.
Why length beats complexity
Here is the key insight the formula makes obvious. Adding a whole new character class (say, symbols) only raises N, and because entropy uses a logarithm, that raise is small and one-time: moving from a 62-character set to a 94-character set adds just 6.55 - 5.95 = 0.6 bits per character. But adding more length stacks up linearly: each extra character adds a full log2(N) bits, every time.
Concretely, extending an alphanumeric password by four characters adds about 4 × 5.95 ≈ 24 bits — the equivalent of making the search space roughly 16 million times larger. Switching those same characters to include symbols would have added only a couple of bits total. This is exactly why a long, memorable passphrase of several random words can be stronger than a short, punctuation-stuffed password that is painful to type.
How attackers actually guess
Entropy assumes an attacker has no shortcut and must search blindly. Real attacks look for shortcuts:
- Brute force: systematically try every combination. This is the attack the entropy formula models. It is only feasible against low-entropy passwords, because the work doubles with every added bit.
- Dictionary and rule-based attacks: try common words, leaked passwords, and predictable mutations (
p@ssw0rd, a word plus a year, a capital at the front and a "!" at the end). Because humans choose these patterns, the effective entropy of a human password is often a fraction of its theoretical value. - Credential stuffing: take username/password pairs leaked from one breach and replay them against other sites. Nothing is "cracked" — it exploits password reuse. This is why using a unique password everywhere matters more than raw complexity.
What "time to crack" estimates really mean
If an attacker can test G guesses per second and the password has H bits of entropy, brute force needs about 2^(H-1) guesses on average, giving a time of roughly 2^(H-1) / G seconds. That single formula hides enormous assumptions:
- The password must be truly random. The estimate is meaningless for human-chosen passwords, which fall to dictionary attacks long before brute force finishes.
- The guess rate depends on the hash. Fast, unsalted hashes like MD5 can be tested billions of times per second on a GPU; slow, deliberately expensive functions like bcrypt or Argon2 cut that rate by orders of magnitude.
- Online vs offline matters. Against a live login with rate limiting, an attacker gets a handful of tries; against a stolen database of hashes, they can attack offline at full hardware speed.
FAQ
Q: Does adding one symbol make a weak password strong?
A: Barely. A symbol raises entropy only if the password is random. For a predictable base word, attackers already try the "add a symbol" pattern, so the real gain is tiny.
Q: Is a passphrase of random words secure?
A: Yes, if the words are chosen randomly from a large list. Four to six random words can exceed 60–80 bits and are far easier to remember than symbol soup.
Q: Why do two meters give my password different scores?
A: They use different models. Some just count character classes and length; better ones estimate resistance to real dictionary and pattern attacks, which lowers the score for predictable choices.
Q: How many bits should I aim for?
A: For a randomly generated password, roughly 60–80 bits is strong for everyday accounts and 100+ bits is excellent for high-value secrets and long-lived keys.