Password Length Calculator
The inverse of a strength checker: instead of testing a password you have, find out how long a random password must be to survive as long as you need. 100% in your browser — nothing is sent anywhere.
Model — offline attack at 10 billion guesses/sec, same as the rest of PasswordLab. Worst case = full search space (poollength ÷ rate), so the answer is conservative in your favour.
How this calculation works
Bits needed = log₂(target seconds × 10,000,000,000). Minimum length = the smallest L with poolL ≥ target seconds × rate — equivalently, ceil(bits needed ÷ log₂(pool)). A 100-year target needs 64.8 bits, so with all four classes (94 characters, 6.55 bits each) the answer is 10 characters; with lowercase only (4.70 bits each) it is 14.
Quick reference (offline attack, 10 billion guesses/sec)
- 8 random characters, all classes — 52.4 bits, about 7 days. Fine for a throwaway account, nowhere near enough for email or banking.
- 10 random characters, all classes — 65.5 bits, about 170 years. The cheapest length that outlives any realistic attack window.
- 12 random characters, all classes — 78.7 bits, about 1.5 million years. The standard recommendation, with enormous headroom for faster future hardware.
- 14 lowercase-only characters — 65.8 bits, about 200 years (the minimum length that clears a 100-year target). When a site bans symbols and capitals, length is the only lever you have — use it.
This page only answers the length question, and only for random passwords. If your password is memorable — words, dates, patterns — its real strength is far lower than the length suggests. Test it on the Strength Checker, or generate a truly random one with the Password Generator or a passphrase.
FAQ
How long should my password be?
For an everyday account, 12 random characters from all four classes (about 79 bits) survive an offline attack for roughly 1.5 million years in this model. 10 characters already survive 100 years. The binding constraint is usually randomness, not length.
Why does one character matter so much?
Each added character multiplies the search space by the pool size. With all four classes (94 characters), one character multiplies an attacker's work by 94 — 9 random characters survive about 1.8 years offline, 10 survive about 170 years.
Does this assume my password is random?
Yes, and that assumption is load-bearing. The math counts every combination as equally likely. A password built from words, dates, or patterns has a much smaller real search space — check it with the Strength Checker, which penalizes common passwords, keyboard walks, and repeated patterns.
Why is the target time so long — 100 years?
Because a leaked hash can be attacked forever, on ever-faster hardware. Aiming for 100 years of headroom costs only one or two extra characters, so it is cheap insurance against both time and faster hardware.
What if my site only allows lowercase letters?
Then you need more characters for the same bits: 14 lowercase letters to survive 100 years, versus 10 from all four classes. Compensate with length — and prefer a passphrase, which buys length you can actually remember.
Is this a guarantee?
No — it is an estimate from a fixed model (uniform random password, offline attack at 10 billion guesses/sec, full search space). Treat it as a planning target with generous headroom, not a promise.