Skip to content
ENExplore Calculators

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

  1. 1Values used
  2. 2PBKDF2 tuning
  3. 3Iteration count to use= 2,000,000
  4. 4Server-side verification time= 250.0 ms
  5. 5Attacker guesses per second= 2,000
  6. 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.

PBKDF2 Iteration Count Calculator | Calcrivo