Calculation notebook · comparison

Password Length vs Character Variety: A Transparent Comparison

Length and alphabet size both affect a theoretical password search space. A meaningful comparison also states how characters are chosen and whether category constraints change the distribution.

State the independent uniform model

For alphabet size A and length L, independent uniform choices yield A^L possible strings. Taking log₂ gives L log₂ A bits for that unconstrained model. This is a mathematical description of a selection process, not a measurement of how a particular leaked password will be attacked.

Compare two clearly defined spaces

Twelve lowercase letters give 26^12, with about 56.4 model bits. Sixteen lowercase letters give about 75.2 bits. Twelve characters from a 62-character alphanumeric alphabet give about 71.5 bits. Thus adding four lowercase positions can exceed the model space of the shorter mixed alphabet; “more categories” alone is not the full comparison.

Compare two clearly defined spaces
Uniform unconstrained modelApproximate model bits
12 from 26 lowercase letters56.4
16 from 26 lowercase letters75.2
12 from 62 alphanumeric characters71.5

Do not treat every generator as unconstrained

Requiring at least one character from each selected category removes strings that omit a category and can alter the generation distribution. Removing ambiguous characters also changes A. The simple A^L formula is therefore an upper-model comparison, not an exact entropy audit of every constrained implementation.

Randomness and handling determine practical usefulness

Cryptographic random selection matters more than a string merely looking complicated. Avoid predictable patterns and reuse. A phishing page can capture a long random password just as it can capture a short one; a password manager and additional authentication address risks that alphabet arithmetic does not.

Use length within the actual service policy

Choose a supported long value, satisfy required categories and store it securely. If manual entry is necessary, an ambiguity filter can improve transcription at the cost of a smaller alphabet. Do not publish generated values as shared examples or attach a precise compromise-time claim without an explicit attack model.

Compare a length increment with an alphabet increment

Under independent uniform choices, adding one character multiplies the space by A. Increasing the alphabet from A to B at fixed length L multiplies it by (B/A)^L. These are different operations; there is no universal rule that adding one symbol category always outperforms adding several positions.

For twelve positions, changing alphabet size from 26 to 52 multiplies the space by 2^12 = 4,096. Adding three lowercase positions instead multiplies it by 26³ = 17,576. In this unconstrained model the three extra positions provide the larger multiplier. A real comparison must also confirm the generator’s selection distribution and the service’s accepted length.

Required categories change the valid set

For a tiny example alphabet with two categories, one letter a and one digit 0, unconstrained length-two strings are aa, a0, 0a and 00. Requiring both categories leaves only a0 and 0a, reducing four possible strings to two. The simple A^L count is not an exact constrained count.

A generator that first fills required categories and then shuffles may also need a distribution review before its outputs can be described as uniform across every valid string. Using cryptographic random bytes is necessary, but it does not by itself prove an exact entropy claim for a complex constrained-selection procedure.

Readability filters exchange alphabet size for usability

Removing look-alikes such as certain letters or digits can reduce transcription errors. It also reduces A, so the theoretical space at fixed length decreases. If the service permits more length, adding positions can compensate in the simple model. The actual excluded set and selected categories determine the new alphabet.

This option is relevant when a value must be typed manually. A password manager can fill a longer value without the same visual transcription task. Do not represent an ambiguity filter as extra security by itself, or publish a generated value in an example screenshot to demonstrate the filter.

Separate guessing from capture and reuse

The alphabet-and-length model concerns guessing an unknown value. It does not prevent a phishing form, compromised device or unsafe log from capturing the exact secret. Reusing one strong value also links otherwise separate accounts when one service is compromised. Store distinct generated passwords securely and use additional authentication where appropriate.

No precise compromise time follows from model bits alone. An estimate would need offline or online attack conditions, hashing parameters, attacker resources and rate limits. Keep the comparison transparent instead of converting a mathematical space into an unsupported promise of practical lifetime.

Questions and checks

Do mixed characters always beat a longer lowercase password?

No. Compare A^L under a stated generation model; length can outweigh a larger alphabet.

Are the displayed model bits an exact generator audit?

No. Category constraints and selection distribution require a separate analysis.

Can a long random password still be stolen?

Yes. Phishing, malware, reuse and unsafe storage are separate from guessing-space size.

Sources and scope

The examples are illustrative calculations, not records of individual users. Check the policy or measurements that apply to your situation.

Try the calculations