PBKDF2 Iteration Count Calculator
Work out pbkdf2 iteration count instantly with clear inputs, formula shown and shareable results.
About PBKDF2 Iteration Count Calculator
PBKDF2 buys resistance by repeating a fast hash many times, so the iteration count is chosen to consume a tolerable amount of server time — typically 200 to 500 ms. The attacker's effective guess rate is their raw hash rate divided by the iteration count, which is why iterations must rise as hardware improves. OWASP currently recommends 600,000 iterations for PBKDF2-HMAC-SHA256.
Formula
PBKDF2 tuning
iterations = hash rate x target time; attacker guesses per second = attacker hash rate / iterations
Worked example
With the default values below, PBKDF2 Iteration Count Calculator returns Iteration count to use of 2,000,000. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Target verification timeminimum 1 ms
- 250 ms
- Hash operations per second on your serverminimum 1
- 8,000,000
- Attacker hardware advantageminimum 1 x
- 500 x
Results
- Iteration count to use
- 2,000,000
- Server-side verification time
- 250.0 ms
- Attacker guesses per second
- 2,000
- Comparison with published guidance
- Meets current OWASP guidance for PBKDF2-HMAC-SHA256 (600,000+)
Step by step
- 1Values used
- 2PBKDF2 tuning
- 3Iteration count to use= 2,000,000
- 4Server-side verification time= 250.0 ms
- 5Attacker guesses per second= 2,000
- 6Comparison with published guidance= Meets current OWASP guidance for PBKDF2-HMAC-SHA256 (600,000+)
Assumptions and limits
- The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 1 decimal place, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why prefer Argon2 or bcrypt over PBKDF2?
PBKDF2 uses negligible memory, so GPUs and ASICs parallelise it cheaply. Memory-hard functions such as Argon2id and scrypt raise the attacker's cost per guess far more effectively.
Do I need to rehash existing passwords when raising iterations?
You can only rehash on next successful login, since the plaintext is required. Store the iteration count with each hash so old and new records verify correctly.
Related Calculators
- Privileged Account Count Calculator
- Zero Trust Segment Count Calculator
- Access Review Effort Calculator
- Alert Triage Capacity Calculator
- Annualised Loss Expectancy Calculator
- Argon2 Parameters Calculator
- Audit Sample Size Calculator
- Backup Encryption Time Calculator
- Base Encoding Size Calculator
- Bcrypt Cost Factor Calculator
You might also need
- Privileged Account Count CalculatorAlso in Security, Cryptography & Risk
- Zero Trust Segment Count CalculatorAlso in Security, Cryptography & Risk
- Argon2 Parameters CalculatorAlso in Security, Cryptography & Risk
- Checksum Verification CalculatorAlso in Security, Cryptography & Risk
- CRC Value CalculatorAlso in Security, Cryptography & Risk
- Keyspace Size CalculatorAlso in Security, Cryptography & Risk
