Skip to content
Calcrivo

Minimum Password Length Calculator

Find the shortest password that reaches a target entropy in bits, or that survives a target number of years of attack.

Inputs

bits

60 bits resists online attack, 80 bits resists offline attack, 128 bits matches a symmetric key.

years

Recommended Minimum Length

13characters

Length for the Entropy Target

13characters

Length for the Time Target

11characters

Entropy at Recommended Length

85.4bits

Bits Needed for the Time Target

65.8bits

Step by step

  1. Values used

    Target entropy = 80 bits; Character set available = Printable ASCII (95); Attacker's hash rate = SHA-256 — 10 G/s; Years the password must survive = 100 years

  2. Minimum Password Length

    length = ceiling(target bits ÷ log2(charset size)); for a time target, bits needed = log2(2 × rate × years × 31,536,000).

  3. Recommended Minimum Length

    = 13 characters

  4. Length for the Entropy Target

    = 13 characters

  5. Length for the Time Target

    = 11 characters

  6. Entropy at Recommended Length

    = 85.4 bits

  7. Bits Needed for the Time Target

    = 65.8 bits

How it works

Each character contributes log2(charset) bits, so dividing the target by that and rounding up gives the shortest compliant password. The time-based route works backwards from the attack: surviving Y years at R guesses per second means the keyspace must exceed 2 × R × Y × seconds-per-year, and taking log2 converts that keyspace into bits. It replaces the arbitrary '8 characters minimum' with a number derived from the hash you actually use — against bcrypt a 10-character password is fine, against unsalted MD5 it is not.

Formula

Minimum Password Length

length = ceiling(target bits ÷ log2(charset size)); for a time target, bits needed = log2(2 × rate × years × 31,536,000).

31536000
Seconds in a 365-day year
target bits
Entropy the policy demands
rate
Attacker guesses per second

Frequently Asked Questions

How is Minimum Password Length calculated?

length = ceiling(target bits ÷ log2(charset size)); for a time target, bits needed = log2(2 × rate × years × 31,536,000). Each character contributes log2(charset) bits, so dividing the target by that and rounding up gives the shortest compliant password. The time-based route works backwards from the attack: surviving Y years at R guesses per second means the keyspace must exceed 2 × R × Y × seconds-per-year, and taking log2 converts that keyspace into bits.

Why does Minimum Password Length matter?

It replaces the arbitrary '8 characters minimum' with a number derived from the hash you actually use — against bcrypt a 10-character password is fine, against unsalted MD5 it is not.

What values do I need to enter?

This calculator takes 4 inputs: Target entropy, Character set available, Attacker's hash rate, Years the password must survive. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

Why is the length for the time target sometimes shorter?

Because a slow hash does the work for you. Against Argon2id at 5000 guesses per second, surviving a century needs only about 45 bits — 7 characters. The entropy target then dominates, which is the right outcome: it protects you if the hash is ever downgraded or the attacker's hardware improves.

Should I plan for future hardware?

Yes. GPU cracking throughput has historically risen roughly an order of magnitude per decade, which is about 3.3 bits. Adding 10 bits to the target covers roughly 30 years of hardware progress; one extra character of printable ASCII buys 6.6 of them.

You might also need