CalculatorMasters

A/B Password Strength Per-User Formula

Learn how the calculator estimates password compromise likelihood per targeted account and compares expected affected accounts under two policies.

This calculator applies the same attack scenario to policy A and policy B, then estimates how likely one targeted account is to be compromised. It scales that per-user estimate by the targeted user count to show the relative expected impact of each password policy.

  • 100% Free
  • No Sign-Up Required
  • Private & Secure
  • Mobile Friendly

Per-User Compromise Likelihood

P = min(100%, (G × D × 86,400 ÷ 2^(E − 1)) × 100%)

Where:

Multiply the attacker's guesses per second by the attack duration in seconds. Divide that total by the estimated average guesses needed for a password with the stated entropy, then cap the result at 100%.

Variables Explained

VariableWhat It MeansUnit
P - Per-user compromise likelihoodEstimated likelihood that one targeted account is compromised during the stated attack period.percent
G - Attack guesses per secondAssumed rate at which the attacker can make password guesses.guesses/second
D - Attack durationNumber of days the attacker can continue guessing.days
E - Password entropyEstimated average effective password entropy under the policy being tested.bits
N - Active user accountsNumber of accounts in scope for the comparison.accounts
C - Accounts targetedPercentage of active accounts assumed to be included in the attack.percent

Step-by-Step Calculation

1

Estimate targeted accounts

This limits the population impact estimate to the accounts assumed to be targeted.

targetedUsers = activeUsers * (attackCoverage / 100)

2

Convert days to seconds

Guess rate is measured per second, so the attack period must be converted from days.

attackSeconds = attackDurationDays * 86400

3

Calculate available guesses

This is the maximum number of password guesses available in the scenario.

totalGuesses = guessesPerSecond * attackSeconds

4

Estimate average guesses for each policy

The model uses half of the effective password search space as a simplified average-guess estimate.

averageGuesses = pow(2, entropyBits - 1)

5

Calculate compromise likelihood

Available guesses are compared with the average guesses required, with the likelihood capped at 100%.

compromiseProbability = min(100, (totalGuesses / averageGuesses) * 100)

6

Estimate affected accounts

The per-user likelihood is multiplied by targeted accounts to estimate expected affected accounts.

expectedCompromised = targetedUsers * (compromiseProbability / 100)

7

Estimate the reduction from policy B

This shows the modelled reduction when policy B has lower estimated risk than policy A.

accountsAvoided = max(0, expectedCompromisedA - expectedCompromisedB)

Comparing 40-bit and 55-bit password policies

Active user accounts10,000 accounts
Policy A entropy40 bits
Policy B entropy55 bits
Attack guess rate10,000 guesses/second
Attack duration30 days
Accounts targeted100%
1

Convert the attack period

30 × 86,400

2,592,000 seconds

2

Calculate total guesses

10,000 × 2,592,000

25,920,000,000 guesses

3

Calculate policy A average guesses

2^(40 − 1)

549,755,813,888 guesses

4

Calculate policy A likelihood

(25,920,000,000 ÷ 549,755,813,888) × 100

4.7148%

5

Calculate policy B likelihood

(25,920,000,000 ÷ 2^(55 − 1)) × 100

0.0001439%

6

Scale to 10,000 targeted accounts

10,000 × 4.7148% versus 10,000 × 0.0001439%

471.48 versus 0.01 expected accounts

Final Result

Under these assumptions, policy B avoids an estimated 471.47 compromised accounts compared with policy A.

Try the Calculator →

Assumptions

  • Entropy values represent the average effective password strength users actually achieve under each policy.
  • The attacker makes guesses at a constant rate throughout the entire attack period.
  • Each targeted account has similar exposure and password-strength characteristics.
  • The simplified model uses half of the password search space as the average guess count.
  • Policy A and policy B are tested against the same user population and attack scenario.

Limitations

  • !The estimate does not model password reuse, breached credentials, phishing, malware, session theft, or account recovery weaknesses.
  • !Actual guessing rates can vary widely with online rate limits, password hashing, hardware, and attacker resources.
  • !Entropy estimates may not reflect real user password choices or predictable password patterns.
  • !A capped likelihood of 100% is a modelling limit, not a guarantee that every account will be compromised.
  • !Expected affected accounts are statistical estimates and may not equal the outcome of a specific incident.

Common Mistakes to Avoid

1

Entering a raw hash-cracking rate for an online login scenario that has rate limiting.

2

Treating password length alone as the same thing as effective entropy.

3

Using a policy requirement instead of the average strength users actually choose.

4

Comparing policies with different attack durations or guess rates, which makes the A/B result less comparable.

5

Reading an expected account count as a certain number of compromises.

6

Ignoring controls such as multi-factor authentication and secure password recovery.

Related Formulas

Frequently Asked Questions

How is password compromise probability calculated?

The calculator divides total attacker guesses by the estimated average guesses needed for the password entropy level, converts the ratio to a percentage, and caps it at 100%.

Why does the formula use 2 raised to entropy minus 1?

An entropy value of E bits represents an effective search space of 2^E combinations. The model uses half that space, 2^(E − 1), as a simplified average search effort.

What happens when policy B has more entropy bits than policy A?

Each additional bit doubles the effective search space. Under identical attack assumptions, higher entropy therefore reduces the simplified compromise estimate exponentially.

Why is compromise likelihood capped at 100%?

A probability cannot exceed 100%. The cap prevents a very large guess budget from producing an impossible percentage.

Is this formula suitable for online and offline attacks?

It can illustrate either scenario if the guess rate is chosen appropriately, but actual online rate limits and offline cracking performance can differ substantially.

Ready to calculate your result?

Use the calculator to get instant results with your own inputs.

Try A/B Password Strength Per-User