Argon2 Memory Calculator
Size the Argon2 memory parameter in KiB blocks, validate it against the lane minimum and project peak server RAM.
About Argon2 Memory Calculator
Argon2 fills a memory matrix of m one-kibibyte blocks split across p lanes, so each lane owns m ÷ p blocks and the spec rejects any m below 8 × p. An attacker's silicon cost scales with memory × passes, which is what a GPU cannot cheaply replicate thousands of times over. Memory is Argon2's real defence, but it is also the parameter that will exhaust a login service under a burst — sizing it without multiplying by peak concurrency is how authentication nodes get OOM-killed.
Formulas
Argon2 Memory
Argon2 allocates m KiB blocks of 1 KiB each, rounded up to a multiple of 4 × lanes and never below 8 × lanes; peak RAM = m × concurrent hashes.
- m
- Memory cost in KiB
- p
- Lane count (parallelism)
- 8 × p
- Absolute minimum block count Argon2 accepts
Area-time hardness
attacker area-time cost ∝ memory × passes, the metric that makes Argon2 hostile to ASICs.
Worked example
With the default values below, Argon2 Memory Calculator returns Effective Memory per Hash of 64.00. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Argon2 memory costaccepts 1–4,096 MiB
- 64 MiB
- Parallelism (lanes)accepts 1–16 lanes
- 4 lanes
- Time cost (passes)accepts 1–16 passes
- 3 passes
- Peak concurrent hashesaccepts 1–1,000 hashes
- 20 hashes
Results
- Effective Memory per Hash
- 64.00 MiB
- 1 KiB Memory Blocks
- 65,536
- Memory per Lane
- 16,384 KiB
- Peak Server Memory at Load
- 1,280 MiB
- Attacker Area-Time Cost
- 192 MiB-passes
- Assessment
- Strong — at or above the 46 MiB OWASP Argon2id profile
Step by step
- 1Values used
- 2Argon2 Memory
- 3Area-time hardness
- 4Effective Memory per Hash= 64.00 MiB
- 51 KiB Memory Blocks= 65,536
- 6Memory per Lane= 16,384 KiB
- 7Peak Server Memory at Load= 1,280 MiB
- 8Attacker Area-Time Cost= 192 MiB-passes
- 9Assessment= Strong — at or above the 46 MiB OWASP Argon2id profile
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 Memory calculated?
Argon2 allocates m KiB blocks of 1 KiB each, rounded up to a multiple of 4 × lanes and never below 8 × lanes; peak RAM = m × concurrent hashes. Argon2 fills a memory matrix of m one-kibibyte blocks split across p lanes, so each lane owns m ÷ p blocks and the spec rejects any m below 8 × p. An attacker's silicon cost scales with memory × passes, which is what a GPU cannot cheaply replicate thousands of times over.
Why does Argon2 Memory matter?
Memory is Argon2's real defence, but it is also the parameter that will exhaust a login service under a burst — sizing it without multiplying by peak concurrency is how authentication nodes get OOM-killed.
What values do I need to enter?
This calculator takes 4 inputs: Argon2 memory cost, Parallelism (lanes), Time cost (passes), Peak concurrent hashes. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
What are the OWASP Argon2id profiles?
OWASP lists m=47104 KiB (46 MiB) with t=1 and p=1, or m=19456 KiB (19 MiB) with t=2 and p=1, as equivalent minimums. Trade memory for passes only along that curve — do not drop below 19 MiB.
