Strength of 40 random characters
| Character set | Pool | Combinations | Entropy | Avg. time at 10 billion guesses/s |
|---|---|---|---|---|
| Digits only (PIN) | 10 | 1.00 × 10^40 | 133 bits | over a trillion years |
| Lowercase | 26 | 3.97 × 10^56 | 188 bits | over a trillion years |
| Lower + upper | 52 | 4.37 × 10^68 | 228 bits | over a trillion years |
| Letters + digits | 62 | 4.96 × 10^71 | 238 bits | over a trillion years |
| All four sets | 86 | 2.40 × 10^77 | 257 bits | over a trillion years |
The guessing rate is an assumption for illustration (a fast offline attack on a weak hash); real attacks can be far slower or faster. Times apply only to truly random passwords like these.
How entropy is calculated
bits = length × log₂(pool size) = 40 × log₂(86) ≈ 257.1
Each extra character multiplies the number of possibilities by the pool size. Going from 40 to 42 characters with all sets multiplies the search space by 86² = 7,396.