Skip to content
Calcrivo

Argon2 Time Cost Calculator

Estimate Argon2 hashing time from memory, passes and memory bandwidth, and get the pass count that hits your target.

Inputs

passes
MiB
MiB/s
ms

Estimated Hash Time

128.0ms

Time Cost to Hit Target

11passes

Total Memory Traffic

192MiB

Hashes per Second per Core

7.81

Assessment

Faster than needed — raise time cost toward 11

Step by step

  1. Values used

    Time cost (passes) = 3 passes; Memory cost = 64 MiB; Argon2 fill throughput = 1,500 MiB/s; Target hash time = 500 ms

  2. Argon2 Time Cost

    hash time ≈ (passes × memory MiB) ÷ fill throughput MiB/s; recommended passes = ⌊(target seconds × throughput) ÷ memory⌋.

  3. Estimated Hash Time

    = 128.0 ms

  4. Time Cost to Hit Target

    = 11 passes

  5. Total Memory Traffic

    = 192 MiB

  6. Hashes per Second per Core

    = 7.81

  7. Assessment

    = Faster than needed — raise time cost toward 11

How it works

Argon2's cost is dominated by streaming its memory matrix, so runtime is close to linear in passes × memory divided by the machine's effective fill rate. Inverting that gives the pass count that lands on your latency budget for a memory size you have already fixed. Extra memory buys more attacker resistance per millisecond than extra passes, so the right tuning order is to raise memory until RAM runs out and only then add passes — this tells you how many passes are left in the budget.

Formula

Argon2 Time Cost

hash time ≈ (passes × memory MiB) ÷ fill throughput MiB/s; recommended passes = ⌊(target seconds × throughput) ÷ memory⌋.

passes
Argon2 t parameter — sweeps over the memory matrix
fill throughput
How fast your CPU can fill Argon2 blocks
target
Login latency budget

Frequently Asked Questions

How is Argon2 Time Cost calculated?

hash time ≈ (passes × memory MiB) ÷ fill throughput MiB/s; recommended passes = ⌊(target seconds × throughput) ÷ memory⌋. Argon2's cost is dominated by streaming its memory matrix, so runtime is close to linear in passes × memory divided by the machine's effective fill rate. Inverting that gives the pass count that lands on your latency budget for a memory size you have already fixed.

Why does Argon2 Time Cost matter?

Extra memory buys more attacker resistance per millisecond than extra passes, so the right tuning order is to raise memory until RAM runs out and only then add passes — this tells you how many passes are left in the budget.

What values do I need to enter?

This calculator takes 4 inputs: Time cost (passes), Memory cost, Argon2 fill throughput, Target hash time. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Is it better to raise passes or memory?

Memory. Attacker cost grows with memory × time, but memory also raises the silicon area a parallel cracker needs. Set memory as high as your peak concurrency allows, then use passes to consume any remaining latency budget.

You might also need