Argon2 Time Cost Calculator
Estimate Argon2 hashing time from memory, passes and memory bandwidth, and get the pass count that hits your target.
About Argon2 Time Cost Calculator
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
Worked example
With the default values below, Argon2 Time Cost Calculator returns Estimated Hash Time of 128.0. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Time cost (passes)accepts 1–16 passes
- 3 passes
- Memory costaccepts 1–4,096 MiB
- 64 MiB
- Argon2 fill throughputaccepts 50–20,000 MiB/s
- 1,500 MiB/s
- Target hash timeaccepts 20–5,000 ms
- 500 ms
Results
- Estimated Hash Time
- 128.0 ms
- Time Cost to Hit Target
- 11 passes
- Total Memory Traffic
- 192 MiB
- Hashes per Second per Core
- 7.81
- Assessment
- Faster than needed — raise time cost toward 11
Step by step
- 1Values used
- 2Argon2 Time Cost
- 3Estimated Hash Time= 128.0 ms
- 4Time Cost to Hit Target= 11 passes
- 5Total Memory Traffic= 192 MiB
- 6Hashes per Second per Core= 7.81
- 7Assessment= Faster than needed — raise time cost toward 11
Assumptions and limits
- The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax or compounding frequency into account.
- Figures are rounded for display to 2 decimal places, 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
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.
