Security

How Long to Crack a Password? Do the Entropy Math Yourself

How long a password takes to crack equals the number of possible passwords divided by the attacker's guessing speed, and on average an attacker finds it after trying half of them. A truly random 12-character password using all 95 printable characters has about 78.8 bits of entropy, which would take thousands of years even at an assumed trillion guesses per second, while a random 8-character lowercase password (37.6 bits) falls in under 2 minutes at an assumed billion guesses per second.

Charts that promise "your password takes 3 years to crack" hide both inputs. This article gives you the formula so you can compute any case yourself, and states every guess rate as an assumption, because the real rate depends entirely on the situation, as explained below.

The formula

For a password chosen uniformly at random:

  • Possible passwords = (characters available) length
  • Entropy in bits = length x log2(characters available)
  • Average time to crack = (possible passwords / 2) / (guesses per second)

Each extra bit doubles the work. Bits per character for common character sets:

Character setSizeBits per character
Digits 0-9103.32
Lowercase a-z264.70
Upper + lower + digits625.95
All printable ASCII (including space)956.57
One word from the EFF long list7,77612.92 per word

Worked example: 8 characters from 62 options. 628 = 218,340,105,584,896 (about 2.18 x 1014) possibilities, and 8 x 5.954 = 47.6 bits. At an assumed 109 guesses per second, the average time is 2.18 x 1014 / 2 / 109 = 109,170 seconds, or about 1.3 days. You can check every number in this article with a calculator; the tables were produced with Python's math.log2.

Average crack times at assumed guess rates

The four rates below are round numbers chosen to span the range, not measurements of any particular hardware or attack. Times are the average (half the keyspace), for passwords generated at random.

Password (random)Entropy1 thousand/s1 million/s1 billion/s1 trillion/s
4-digit PIN13.3 bits5 secondsunder 1 sunder 1 sunder 1 s
8 lowercase37.6 bits3.3 years1.2 days1.7 minutesunder 1 s
8 upper+lower+digits47.6 bits3,459 years3.5 years1.3 days1.8 minutes
8 from all 9552.6 bits105,113 years105 years38 days55 minutes
4 EFF words51.7 bits57,928 years58 years21 days30 minutes
16 lowercase75.2 bits6.9 x 1011 years6.9 x 108 years690,939 years691 years
6 EFF words77.5 bits3.5 x 1012 years3.5 x 109 years3.5 x 106 years3,503 years
12 from all 9578.8 bits8.6 x 1012 years8.6 x 109 years8.6 x 106 years8,561 years

Two patterns stand out. Length beats complexity: 16 lowercase letters (75.2 bits) are far stronger than 8 characters of every type (52.6 bits). And a long random passphrase is as strong as a random string of symbols while being much easier to type and remember.

Why the guess rate varies so much

The same password can be safe or weak depending on how the attacker gets to guess.

  • Online guessing (typing guesses into a login form): the service controls the rate. NIST SP 800-63B-4 requires verifiers to limit consecutive failed attempts on one account to no more than 100 before disabling that authenticator. At 100 attempts, even a 6-digit PIN (1,000,000 possibilities) has only a 1-in-10,000 chance of being guessed.
  • Offline cracking (after a database of password hashes is stolen): the attacker guesses on their own hardware with no lockout. The rate then depends on how the site stored passwords. The OWASP Password Storage Cheat Sheet says fast hashes such as MD5 and SHA-1 "allow attackers to perform large numbers of guesses quickly", which is why it recommends deliberately slow, tunable algorithms: Argon2id (minimum 19 MiB memory, 2 iterations), scrypt, bcrypt with a work factor of 10 or more for legacy systems, or PBKDF2-HMAC-SHA256 with 600,000 iterations.

A slow hash can cut the attacker's rate by orders of magnitude, moving a password several columns to the left in the table above. Salting (a random value stored with each hash; NIST requires at least 32 bits) stops attackers from using precomputed tables and forces them to attack each account separately. Neither helps you if your password is in the attacker's list of common passwords, which is tried first.

The big caveat: these numbers only apply to random passwords

Entropy math assumes every character was picked at random. Human-chosen passwords aren't. Summer2026! is 11 characters from all four character types, so a naive calculator credits it with 11 x 6.57 = 72 bits. But attackers don't guess in alphabetical order. They try leaked passwords, dictionary words, names, years and common substitutions first, and a pattern like "season + year + symbol" sits near the front of that list. Its real strength is a small fraction of 72 bits, and no formula can tell you exactly how small.

This is why NIST requires services to check new passwords against a blocklist of commonly used, expected or compromised passwords, and why its guidance prohibits composition rules ("must contain a symbol"): they push people toward predictable patterns like Password1! without adding real entropy.

What NIST recommends now

NIST SP 800-63B-4 sets these requirements for services that use passwords:

  • At least 15 characters when the password is the only authentication factor, and at least 8 when it is part of multi-factor authentication.
  • Accept passwords of at least 64 characters.
  • No composition rules, and no forced periodic password changes (change is required only on evidence of compromise).
  • Check new passwords against a blocklist of common and compromised passwords.

How to make a password that is actually hard to crack

  1. Let a generator choose it. Randomness is the assumption behind every number above, and people are bad at it. A password manager's generator or larely's password generator, which runs in your browser, produces truly random output.
  2. Go long. 16 or more random characters, or six or more random words. EFF recommends at least six words from its long wordlist, chosen by rolling five dice per word.
  3. Use a different password for every site. Reuse turns one site's breach into an attack on all your accounts, regardless of entropy.
  4. Turn on two-factor authentication where it is offered, so a cracked password alone isn't enough. How two-factor authentication codes work explains the codes.

If you think a password was exposed

Change it on that site and anywhere else you reused it, starting with your email account, because email resets every other password. Then enable two-factor authentication on those accounts. Entropy is irrelevant once a password is known: a leaked 30-character password is cracked in zero guesses.

Frequently asked questions

Is an 8-character password secure?
Not as your only protection. A truly random 8-character password from all 95 printable ASCII characters has about 52.6 bits of entropy, which an offline attacker with a high guess rate can exhaust. Human-chosen 8-character passwords are far weaker. NIST SP 800-63B-4 sets a minimum of 15 characters for passwords used as the only authentication factor.
Does adding a symbol make a password much stronger?
Less than adding length. Going from 62 to 95 possible characters raises entropy from about 5.95 to 6.57 bits per character. Adding one more random character from the same 62-character set adds 5.95 bits. Length wins, and NIST's current guidance forbids sites from forcing composition rules at all.
Are password strength meters accurate?
Only roughly. A simple meter multiplies length by character-set size, which assumes every character was chosen at random. Real attackers try dictionary words, names, dates and common substitutions first, so a password like P@ssw0rd2026! scores well on a naive meter but falls early to a guessing attack.
How long does it take to crack a 4-word passphrase?
Four words chosen at random from the 7,776-word EFF list give 4 x 12.9 = 51.7 bits, about the same as a random 8-character password using every printable character. At an assumed one billion guesses per second, finding it takes about 21 days on average. Six words give 77.5 bits, which at the same rate takes millions of years. EFF recommends at least six words.

Sources