ProtemKey

How passwords are attacked · 5 min read

How long does it take to crack a password?

A crack time is just the size of the search divided by the guess rate. The hard parts are knowing the rate and knowing the real size of the search.

“How long would it take to crack my password?” has a precise answer only for a password that was generated at random. For everything else, the honest answer is “less than the length suggests, by an amount nobody can state exactly.” This guide shows the arithmetic, the assumptions behind it, and where it stops applying.

The formula

For a password chosen uniformly at random from a set of possibilities:

  • The number of possibilities is 2^bits. A random 8-character password over 94 printable characters has 94^8 possibilities, which is 52.44 bits.
  • An attacker trying candidates in some order will, on average, hit it halfway through. Average guesses = 2^bits ÷ 2.
  • Average time = average guesses ÷ guesses per second.

Worst case is twice the average; a lucky attacker can get there on the first guess. The tables on this site always show the average.

The guess rate is the big unknown

The rate depends on where the attacker is guessing, and it varies by many orders of magnitude. The site uses three illustrative rates throughout:

Illustrative attack rates used throughout this site. They are order-of-magnitude assumptions, not measurements; real rates vary with hardware, hash settings and defenses.
ScenarioRate (assumed)Situation
Online, rate-limited100 guesses per houra login form that slows down or locks out repeated failures
Offline, slow hash10,000 guesses per seconda stolen database hashed with a deliberately slow, salted scheme (bcrypt class)
Offline, fast hash100 billion guesses per seconda stolen database hashed with a fast unsalted hash (MD5, SHA-1 or NTLM class) on a high-end GPU rig

These are assumptions chosen to show orders of magnitude, not measurements. Real rates depend on hardware, budget, and especially on how the target site stored the password. Each is a reasonable stand-in for a different situation:

  • Online, rate-limited. The attacker types guesses into a login form, or a script does. NIST SP 800-63B-4 requires services to limit consecutive failed attempts on one account to “no more than 100,” so a real service caps this kind of attack far below what the table shows over long periods.
  • Offline, slow hash. A password database leaked, and passwords were stored with a deliberately slow, salted hash such as bcrypt. The attacker guesses on their own hardware. See password hashing explained.
  • Offline, fast hash. A database leaked with passwords stored under a fast, unsalted hash. This is the bad case and it does happen.

The table

Average time to guess (half of all possibilities) for secrets chosen uniformly at random. Rates are illustrative assumptions; human-chosen passwords fall far faster than their length suggests.
SecretBitsOnline, 100/hourSlow hash, 104/sFast hash, 1011/s
4-digit PIN13.32.1 daysless than a secondless than a second
6-digit PIN19.9208 days50 secondsless than a second
8 random lowercase letters37.6119 thousand years121 days1 second
8 random printable characters52.43.5 billion years9.7 thousand years8.5 hours
12 random letters and digits71.5about 1015 years5.1 billion years511 years
3 random EFF words38.8268 thousand years272 days2.4 seconds
4 random EFF words51.72.1 billion years5.8 thousand years5.1 hours
5 random EFF words64.616 trillion years45 million years4.5 years
6 random EFF words77.5about 1017 years350 billion years35 thousand years
7 random EFF words90.5about 1020 yearsabout 1015 years272 million years
16 random printable characters104.9about 1025 yearsabout 1019 years5.9 trillion years
20 random printable characters131.1about 1033 yearsabout 1027 yearsabout 1020 years

A few things stand out:

  • Each step in length multiplies the time. One more random printable character multiplies the search by 94. One more random EFF word multiplies it by 7,776.
  • Online limits rescue short secrets. A 6-digit PIN would take on average 208 days at 100 guesses per hour, while offline against a fast hash it falls instantly. That is why PINs are only acceptable where the number of attempts is enforced.
  • Storage matters as much as length. 8 random printable characters average about 9,700 years against a slow hash and about 8.5 hours against a fast one.
  • Long random secrets are out of reach everywhere. Six random EFF words average about 35,000 years even at the fast rate; 16 random printable characters (104.87 bits) are far beyond that.

Worked example: a random password

Take a 12-character password generated from lowercase letters only.

  • Bits: 12 × log2(26) = 12 × 4.700 = 56.41 bits.
  • Possibilities: 26^12, about 9.5 × 10^16.
  • Average guesses: half of that, about 4.8 × 10^16.
  • At 10^11 per second: about 4.8 × 10^5 seconds, roughly 5.5 days.
  • At 10^4 per second: about 151,000 years.

Every figure there follows from two inputs: the generator’s settings and the assumed rate. That is why this site computes entropy from the generator’s settings, never from the output.

Why human-chosen passwords fall far faster

The formula assumes the attacker has no idea which candidates are more likely. For random passwords that is true by construction. For passwords people choose, it is false, and attackers know it. They guess in order of likelihood: leaked passwords first, then dictionary words, then words with common decorations.

Worked example: a password that looks long

Consider an 11-character password such as Summer2024!. If it were 11 random printable characters, it would be worth 11 × 6.555 = 72.10 bits, and the table would put it far out of reach.

But it follows a pattern: a capitalized word, a year, a symbol at the end. Suppose an attacker builds candidates as:

  • one of 10,000 common words, capitalized: 10,000 choices
  • a year from 1900 to 2029: 130 choices
  • one of 32 ASCII symbols at the end: 32 choices

That is 10,000 × 130 × 32 = 41,600,000 candidates, or 25.31 bits. Testing half of them takes:

Rate Average time
Online, 100 per hour about 24 years
Offline, slow hash, 10,000 per second about 35 minutes
Offline, fast hash, 10^11 per second about 0.0002 seconds

The difference between 72 bits and 25 bits is a factor of about 2^46.8, roughly 120 trillion. Real attackers’ lists are better than this toy model: they try the most popular words and years first, so a password like this is often found earlier still.

NIST SP 800-63B-4 makes the same point with its “Password1!” example: a user required to add an uppercase letter, a digit and a symbol to password is “relatively likely” to produce exactly that. Length and character variety only count when the characters are unpredictable.

Note: Nobody can give an exact crack time for a password a person made up, because it depends on how close it sits to the attacker’s guessing order. Strength checkers, including this site’s, can only estimate. See how strength meters work.

What the numbers do not cover

Crack times describe guessing. They say nothing about a password captured by a phishing page, read from a sticky note, logged by malware, or reused on a site that stored it in plain text. In those cases it takes one guess. The breach guide and phishing guide cover those routes.

Summary

  • Average crack time = half the possibilities ÷ guesses per second.
  • The rate is an assumption that spans many orders of magnitude; this site shows three labeled illustrations.
  • The calculation is exact for random passwords and an overestimate, sometimes a huge one, for human-chosen ones.
  • A random passphrase or password from a generator gives you a number you can trust, because the search size is known.

Try your own lengths and character sets in the crack-time calculator.

Sources

  1. NIST SP 800-63B-4, Digital Identity Guidelines: Authentication and Authenticator Management (2025)
  2. OWASP Password Storage Cheat Sheet

General explanation, not advice for a particular situation. Updated 2026-10-31.