Password entropy is a number, measured in bits, that describes how unpredictable a randomly generated password is, and it is determined by just two things: the size of the pool each character is drawn from and how many characters there are. Entropy is the honest way to talk about password strength, because it strips away the theater of mandatory symbols and cuts to what an attacker actually faces: how many guesses, on average, before they hit yours. Understanding the simple formula behind it tells you exactly which choices raise strength and which merely look impressive, and it explains why a boring long random string beats a short complicated one every time.
What does entropy actually measure?
Entropy measures the size of the space of equally likely passwords, expressed as a power of two, so that each bit represents a doubling of that space. If a password was generated by a process that could have produced any of N equally likely results, its entropy is the base-2 logarithm of N. One bit means two possibilities, ten bits means 1,024, and twenty bits means just over a million. Because the scale is logarithmic, every single extra bit doubles the number of guesses an attacker must make on average to find the password.
That doubling is the whole reason bits are the right unit. Attackers measure their capability in guesses per second, so what matters is how many guesses stand between them and success. Entropy converts the messy question of “how strong is this password” into a clean count of the attacker’s workload. A password with 60 bits of entropy sits in a space of 2^60 possibilities; add ten bits and you multiply the attacker’s work by roughly a thousand.
The crucial word is random. Entropy quantifies unpredictability under the assumption that the generating process was genuinely random and every outcome was equally likely. It is a property of how the password was produced, not of how it looks on the page. That distinction, which we return to at the end, is where most real-world password strength is won or lost.
How is entropy calculated?
For a random password, entropy in bits equals the length multiplied by the base-2 logarithm of the pool size, which captures both levers in one line. The pool is the set of characters each position could hold, and the length is how many positions there are. Written out:
entropy (bits) = length * log2(pool_size)
pool_size is the number of distinct characters
each position is drawn from, for example:
digits only 10 -> log2(10) ~= 3.32 bits per character
lowercase letters 26 -> log2(26) ~= 4.70 bits per character
lowercase + digits 36 -> log2(36) ~= 5.17 bits per character
mixed-case letters 52 -> log2(52) ~= 5.70 bits per character
mixed-case + digits 62 -> log2(62) ~= 5.95 bits per character
+ common symbols 94 -> log2(94) ~= 6.55 bits per character
The per-character bit values come straight from the pool size, and the length just multiplies them. So a 12-character password drawn randomly from the 62-character alphanumeric pool carries about 12 times 5.95, or roughly 71 bits. The same pool at 16 characters gives about 95 bits. Notice how the calculation rewards length directly and pool size only through a logarithm, a point that has real consequences.
Two things must hold for this number to be meaningful. First, each character has to be chosen independently and uniformly at random from the pool. Second, the length and pool must reflect how the password was actually generated, not how it happens to look. If you generate a password with our password generator, which selects characters at random in your browser, the formula applies cleanly because the generation really is random and local to your device.
Should you add length or grow the pool?
Length is almost always the better investment, because entropy grows linearly with length but only logarithmically with pool size. Every character you add contributes the same fixed number of bits, so length scales the strength steadily and without limit. Enlarging the pool, by contrast, gives you the logarithm of the increase, which flattens out quickly once the pool is already large. Going from a 62-character pool to a 94-character pool adds only about 0.6 bits per character, whereas adding four more characters to a 62-character password adds nearly 24 bits.
| Password | Pool size | Length | Approx. entropy |
|---|---|---|---|
| 8 digits | 10 | 8 | ~27 bits |
| 8 mixed-case + digits | 62 | 8 | ~48 bits |
| 12 mixed-case + digits | 62 | 12 | ~71 bits |
| 16 lowercase only | 26 | 16 | ~75 bits |
| 16 mixed-case + digits + symbols | 94 | 16 | ~105 bits |
| 20 mixed-case + digits | 62 | 20 | ~119 bits |
Read the fourth row against the second: a 16-character all-lowercase password (75 bits) comfortably beats an 8-character password that uses every symbol on the keyboard (48 bits), despite looking far simpler. This is the mathematical heart of the advice that length beats complexity. Symbols are not useless, since they do widen the pool, but they are a weaker lever than adding characters, and they come at a real cost in typing and memorability that length in a stored password does not.
What about passphrases made of words?
A random-word passphrase has entropy too, and it is calculated the same way with the “pool” being the wordlist and the “length” being the number of words. Each word chosen at random from a list of N words contributes log2(N) bits. A widely used wordlist has 7,776 entries, and log2(7,776) is about 12.9 bits, so every randomly chosen word from it adds roughly that much. A five-word passphrase from such a list therefore carries about 65 bits, and a six-word one about 78.
passphrase entropy = number_of_words * log2(wordlist_size)
with a 7,776-word list: log2(7776) ~= 12.9 bits per word
4 words ~= 52 bits
5 words ~= 65 bits
6 words ~= 78 bits
The appeal is that a five- or six-word passphrase reaches strong entropy while being easier to type and recall than an equivalent character string. But the same iron rule applies: the words must be selected at random from the list. If you pick the words yourself, or draw them from a quote or a theme, the log2(N) accounting collapses because the choices are no longer independent or uniform. Random selection is what earns the bits.
Why does entropy only count for random passwords?
Entropy only reflects real strength when the password was generated randomly, because the formula assumes every character or word was an independent, uniform draw, and human choices violate that assumption completely. When you invent a password, you unconsciously follow patterns: real words, a capital at the start, a digit and a symbol at the end, familiar substitutions. Attackers model exactly these patterns, so a human-chosen password lives in a far smaller effective space than its length and character variety suggest. Its calculated entropy is a fiction; its effective entropy is a fraction of it.
This is why P@ssw0rd123! is weak despite looking, by a naive character count, like it should carry decent entropy. Every part of it is predictable, so cracking wordlists reach it almost immediately, and the theoretical bit count means nothing. The formula was never describing that password, because that password was not produced by a random process. Entropy is a statement about the generator, and a biased generator produces low true entropy no matter how ornate the output.
The practical takeaway is to let a random process do the choosing and then let length carry the strength. Generate the password or passphrase with a tool that selects uniformly at random, keep it local so the secret is never transmitted, and favor more characters or more words over exotic symbol requirements. Do that, and the entropy you calculate is the entropy you actually get, which is the entire point of measuring it.