Home › Guides › Security › Password strength and entropy explained

Password strength and entropy explained

How password entropy is calculated, what the numbers mean in guesses and time, and what NIST guidance says about length and passphrases.

By the tools4free.dev team · Last reviewed 4 December 2026

Password entropy is a measure, in bits, of how unpredictable a password is. For a password chosen at random, it equals the length multiplied by the base-2 logarithm of the number of possible characters: entropy = length x log2(pool size). Each extra bit doubles the number of guesses an attacker needs. The catch is that the formula only holds when the password is truly random. A password a person made up has far less entropy than its length suggests. This guide shows the maths, runs three examples, and explains what current advice from NIST recommends.

The formula, step by step

If a password has L characters and each is picked uniformly at random from a pool of N possible characters, there are N^L possible passwords. Entropy in bits is the base-2 logarithm of that count:

entropy = log2(N^L) = L x log2(N)

Common pool sizes are:

Character setPool size NBits per character
Digits only (0-9)103.32
Lower-case letters264.70
Upper and lower-case letters525.70
Letters and digits625.95
Letters, digits and 32 symbols946.55
One word from a 7,776-word list7,77612.92 per word

Notice what dominates. Going from lower-case only (4.70 bits per character) to the full 94-character set (6.55 bits) adds about 1.85 bits per character. Adding another character to a long password adds 4.7 to 6.55 bits. Length is the cheaper way to buy strength.

Worked example 1: lengths and pools compared

LengthLower-case (26)Letters and digits (62)All printable (94)
837.6 bits47.6 bits52.4 bits
1256.4 bits71.5 bits78.7 bits
1675.2 bits95.3 bits104.9 bits
2094.0 bits119.1 bits131.1 bits

A 16-character random lower-case password (75.2 bits) is stronger than an 8-character password using every character type (52.4 bits), by a factor of 2^22.8, roughly seven million times. Making a short password more complicated is a weak trade next to making it longer.

Worked example 2: turning bits into guesses and time

An attacker who has stolen a database of hashed passwords can guess offline, as fast as their hardware allows. On average they find the password after trying half the space, so the expected number of guesses is 2^(bits - 1). Assume a very fast attack on a weakly protected hash: 10 billion guesses per second (10^10). This is an illustrative rate, not a measurement of any particular system.

PasswordEntropyAverage time at 10^10 guesses per second
8 random lower-case letters37.6 bitsabout 10 seconds
8 random characters from 9452.4 bitsabout 85 hours (3.5 days)
12 random characters from 9478.7 bitsabout 750,000 years
16 random letters and digits95.3 bitsabout 76 billion years

The working for the second row: 2^51.4 is about 3.05 x 10^15 guesses, divided by 10^10 per second is about 3.05 x 10^5 seconds, or 85 hours. If the site stores passwords with a deliberately slow algorithm (see the hashing guide), the rate falls by many orders of magnitude and every row improves. If it uses a fast general-purpose hash, the rate can be higher than assumed here. Online attacks against a login form are far slower, since sites rate-limit them, which is why short passwords are less risky online than offline.

Worked example 3: passphrases

A passphrase of random words has the same maths with a much larger "character" set. With a list of 7,776 words (the size of the well-known dice-based lists, 6^5), each word adds log2(7776) = 12.92 bits.

The words must be picked by dice or a random generator, not chosen by you. A phrase from a song or a favourite quote is not a random selection and gets almost none of this credit.

Why the formula overestimates human passwords

The calculation assumes every character is independent and uniformly chosen. People do not choose that way. Summer2026! uses upper-case, lower-case, digits and a symbol, and a naive calculator might rate it near 70 bits (11 x 6.55). In reality it is a dictionary word, a season-year pattern and a common trailing symbol, which attackers try early in their lists. Its real strength is closer to a few tens of bits at best. A password that has appeared in a breach is effectively zero, no matter how long it is, because attackers try known passwords first.

What current guidance says

NIST Special Publication 800-63B, the US digital identity guidelines, changed the conventional advice. In summary:

The document also sets minimum lengths, which differ between revisions, so read the current version for the exact numbers. The thrust is the same: random, long and unique beats short and complex.

Common mistakes

Try it: check a password's entropy estimate with the password strength checker, which runs in your browser. To create a random one, use the password generator. Never test a password you currently use on a site you do not trust.

Frequently asked questions

How many bits of entropy is enough?

For an account protected by a slow password hash and rate limits, 60 to 80 bits of true randomness is generally ample. For something that must resist offline attacks against a weak hash for years, aim for 80 or more. These are rules of thumb, not guarantees.

Is a long passphrase better than a short random password?

Per keystroke, random characters carry more bits. Per unit of memorability, random words win. Six random words match 12 random characters in strength and are much easier to type.

Do symbols make a password much stronger?

Slightly, if they are random. A symbol set raises the pool from 62 to 94, adding about 0.6 bits per character. Adding one more character does more than that.

Are online strength meters safe?

Only if the check runs locally in your browser. Do not type a real password into a site that sends it to a server.

Sources