Quick guide
How to use this calculator
- Enter the minimum and maximum string lengths.
- Enter the available size of each character class.
- Mark any classes that must appear at least once, then read the exact count.
Calculation method
Apply the product rule and inclusion–exclusion
Without requirements, a pool of p characters gives p^L strings of length L. Inclusion–exclusion removes strings missing one or more required classes, and length-range counts are summed.
Worked example
Two-character strings with a digit
With two letters and one digit, there are nine total strings and four letter-only strings.
3²−2² = 5
Supported inputs
Precision and limits
Discrete domain
Inputs are whole counts. Negative, fractional, grouped, and scientific-notation inputs are rejected.
Exact integers
Results use arbitrary-precision integers and are never rounded. Inputs and output size are bounded to keep the page responsive.
Character pools
The entered classes must be disjoint; a character must not be counted in more than one pool.
Security
This is a mathematical search-space count, not an estimate of password strength, cracking time, or account security.
