What Makes a Password Strong: Length, Randomness and Entropy
Password advice is often a list of rules: add a capital, add a symbol, add a number. Behind the rules is a simple idea. A password is strong if an attacker would need to try an enormous number of possibilities before hitting yours. That is a counting problem, and counting is something you can do yourself.
This article shows how to measure strength in bits, compares a short complicated password with a longer simple one, explains why a few random words can be both strong and memorable, and points out where the arithmetic stops being reliable.
Counting the possibilities
If each character is chosen at random from a pool of N symbols and the password has L characters, there are N to the power L possible passwords. Strength is usually quoted in bits of entropy, which is the base-2 logarithm of that count. Each extra bit doubles the number of possibilities.
entropy (bits) = L × log₂(N)Valid only when every character is chosen at random and independently.
| Character pool | Size N | Bits per character |
|---|---|---|
| Digits only | 10 | 3.32 |
| Lowercase letters | 26 | 4.70 |
| Upper and lowercase | 52 | 5.70 |
| Letters and digits | 62 | 5.95 |
| All printable ASCII | 94 | 6.55 |
Widening the pool helps only modestly: moving from lowercase letters to all 94 printable characters adds 6.55 − 4.70 = 1.85 bits per character. One more character of length adds the full per-character figure from the table, which is between 3.3 and 6.6 bits.
Why length beats complexity
Worked example: a random 8-character password from all 94 printable characters has 94⁸ = 6.1 × 10¹⁵ possibilities, which is 8 × 6.55 = 52.4 bits. A random 12-character password using only lowercase letters has 26¹² = 9.5 × 10¹⁶ possibilities, or 12 × 4.70 = 56.4 bits. The plain lowercase password is stronger, because it is longer.
Going longer pays off quickly. Four more lowercase characters multiply the count by 26⁴ = 456,976. A random 16-character lowercase password reaches 75.2 bits, and 12 random characters from the full 94-symbol pool reach 78.7 bits.
Many sites still insist on symbol and capital rules. If you must follow them, make the password long and random first, and then satisfy the rule, rather than relying on the rule to provide the strength.
Passphrases made of random words
A passphrase treats each word as one symbol. With a list of 7,776 words (the size used for dice-based word lists), each word adds log₂(7,776) = 12.92 bits.
- 4 random words: 4 × 12.92 = 51.7 bits, about the same as a random 8-character password from the full keyboard.
- 5 random words: 64.6 bits.
- 6 random words: 77.5 bits, similar to 12 random characters from 94 symbols, and easier to type and remember.
The words must be chosen by chance, with dice or a generator, and not picked because they feel memorable. A phrase you invented, a song lyric or a famous quotation has far fewer real possibilities than the formula assumes.
What the bits mean in practice
To make the numbers concrete, suppose an attacker could test 10 billion guesses per second. This rate is only an assumption for illustration. Real speeds depend heavily on how a service stores passwords and on the attacker's equipment, and guessing against a live login form is far slower than cracking a stolen file.
| Password | Bits | Time to try every possibility at 10 billion/s |
|---|---|---|
| 8 random characters from 94 | 52.4 | about 7 days |
| 12 random lowercase letters | 56.4 | about 110 days |
| 16 random lowercase letters | 75.2 | about 138,000 years |
| 12 random characters from 94 | 78.7 | about 1.5 million years |
On average an attacker finds the password halfway through, so the expected time is half these figures. The pattern is the point: every 10 extra bits makes the search roughly a thousand times longer.
Where the math stops helping
Entropy is a property of how a password was chosen, not how it looks. "P@ssw0rd1!" looks complex, but it is a common word with predictable substitutions and a predictable ending, so it has very little real entropy. Attackers try likely patterns and leaked passwords first.
- Use a different password for every account, because a leak at one site then cannot unlock another.
- Let a generator create the password, since people are poor at choosing randomly. The random password generator creates one to your length and character settings.
- Store passwords in a password manager so that length is not limited by memory, and turn on two-step verification where it is offered.
You can reproduce every figure above with the exponent calculator for N to the power L and the log calculator for base-2 logarithms.
This article is general education about how password strength is measured, not security advice for any specific system. Follow the guidance of the service or organization that holds the account.
- Random Password Generator: Set the length and the kinds of characters you want, then press the button for a fresh random password. Copy it into your password manager and use it for one account only.
- Exponent Calculator: Type a base and an exponent and get the power straight away. The guide below covers the exponent rules, negative and fractional powers, and what to expect from very large or very small results.
- Logarithm Calculator: Enter a number and a base to get log base b of x, or leave the base empty for the natural logarithm. The guide explains what a logarithm means and the rules for working with them.
This article is general information, not professional advice. See our Disclaimer and Editorial Policy.
More articles
Acres, Hectares and Square Miles: Land Area Units Compared
Land listings and maps use acres in some places and hectares in others. See how the units relate, how to convert them exactly, and how to avoid the squared-factor mistake.
Celsius, Fahrenheit and Kelvin: Formulas and Oven Marks
Temperature scales do not share a zero, so conversion needs a multiplication and an addition. Here are the exact formulas, a quick estimate, and an oven chart.
Clothing Size Conversion: Measure Your Body, Not the Label
A US 8, UK 12 and EU 40 are often listed as equals, yet brands label garments differently. Compare your measurements with a size chart instead, converting inches to centimeters.