bcrypt’s cost factor (also called the work factor or rounds) is the single knob that decides how slow password hashing is — and slowness is the whole point, because it throttles attackers running offline brute-force. This estimator benchmarks your device live and projects the hashing time for every cost factor so you can choose a defensible value.
How it works
The cost factor is logarithmic: bcrypt runs 2^cost iterations of its Eksblowfish key schedule. So:
- Cost 10 → 1,024 rounds
- Cost 12 → 4,096 rounds
- Cost 14 → 16,384 rounds
Each +1 to the cost doubles the rounds and therefore roughly doubles the time. Given the time at any one cost, every other cost is time × 2^(target − measured) — an exact relationship.
Because browsers cannot run real bcrypt without an external library, the tool measures your device’s speed with a real Web Crypto PBKDF2-HMAC-SHA256 derivation (a fair proxy for heavy key derivation on your CPU), then calibrates that against published bcrypt timings to produce realistic absolute estimates.
Tips
Aim for roughly 250–500 ms per hash on your production hardware: slow enough to make offline cracking expensive, fast enough that logins feel instant and an attacker cannot trivially exhaust your CPU with spammed login attempts. Servers are usually faster than the browser, so re-run a true bcrypt benchmark on the server and bump the cost up over time as hardware gets faster.