Estimate Argon2 hashing time from memory, passes and memory bandwidth, and get the pass count that hits your target.
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.
Argon2 Time Cost
hash time ≈ (passes × memory MiB) ÷ fill throughput MiB/s; recommended passes = ⌊(target seconds × throughput) ÷ memory⌋.
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.
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.
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.
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.