Password Entropy Calculator
Bits of entropy and key space for a random password or diceware passphrase from length and alphabet, or the shortest length that reaches a bit target.
Password Entropy Calculator
Background.
Roll five ordinary dice, read the faces as a five-digit number such as 4-1-6-2-3, and look it up in the Electronic Frontier Foundation's long wordlist: you have picked one of 7,776 words, each exactly as likely as any other. Repeat that six times and an attacker who knows the list, the method and the number of words still faces 7,776⁶ possible passphrases, about 2.2107 × 10²³ of them. Expressed in bits, the base-2 logarithm of that count, the passphrase carries 77.55 bits of entropy.
Bits are the convenient unit because they add up. Each word from the long list contributes log₂(7,776) = 12.9248 bits, each character drawn from the 94 printable ASCII symbols contributes 6.5546, each decimal digit 3.3219. Every additional bit doubles the number of guesses an exhaustive search may need, so going from 60 bits to 70 is not a sixth more work but 1,024 times more.
The whole calculation rests on one condition: every symbol was chosen at random, independently and with equal odds, by dice or by a proper generator. The formula measures that process, not the string it happened to produce. A person inventing a password does not choose uniformly — real words, names, years, keyboard runs and swapping "a" for "@" make some candidates far likelier than others, and attackers try those first. Enter the length and character set of such a password and you still get the figure for a random draw, which can overstate the real guessing difficulty by many orders of magnitude. NIST's current password guidance, SP 800-63B-4, stops estimating entropy for user-chosen passwords for exactly this reason and sets length rules instead.
What the calculator is for, then, is sizing generators and policies: how many bits a 16-character random password gives, how many words a passphrase needs to reach a target, how much a smaller alphabet costs you. It works in both directions — length to bits, or a bit target to the shortest secret that meets it — and reports the key space as a mantissa and a power of ten, so even a figure like 10⁶¹⁴⁴ is shown exactly instead of overflowing.
What is password entropy calculator?
Password entropy, as calculated here, is the min-entropy of the process that generated a secret: minus the base-2 logarithm of the probability of the single most likely outcome, which is how NIST's glossary defines min-entropy. When L symbols are drawn independently and uniformly from an alphabet of C symbols, all C^L outcomes share the same probability, 1 ÷ C^L, so the min-entropy is L × log₂(C) bits; for that uniform case the more familiar Shannon entropy gives the same number. The key space, C^L, is the same fact before the logarithm is taken — the count of distinct secrets the generator could have produced. The measure assumes the attacker knows the alphabet and the length; the only thing hidden is which of the equally likely outcomes came up.
How to use this calculator.
- Choose the mode. Entropy mode turns a length into bits; length mode takes a bit target, such as 128, and returns the shortest secret that reaches it.
- Pick the alphabet your generator was actually set to use. A password manager restricted to letters and digits draws from 62 symbols, not 94; choosing a bigger pool than the generator could reach inflates the answer, and nothing in the arithmetic can catch that.
- For a diceware-style passphrase, choose the EFF long or short wordlist and enter the number of words, not letters: six words from the long list is a length of 6.
- For an alphabet not listed — Base32 with 32 symbols, Base58 with 58, a 5,000-word list of your own — choose Custom and enter the count of distinct symbols.
- Read the bits, the bits per symbol and the key space as mantissa × 10^exponent. The note beneath places the result against NIST's security strengths for cryptographic keys, which is a reference point rather than a password rule.
The formula.
Start from the definition. NIST's glossary gives min-entropy as H∞ = −log₂(max pᵢ), a worst-case measure suited to an attacker who guesses the most likely candidate first. A generator that draws L symbols independently and uniformly from C symbols makes all C^L outputs equally likely, so max pᵢ = 1 ÷ C^L and H∞ = log₂(C^L) = L × log₂(C).
Two consequences follow. Entropy grows linearly with length but only logarithmically with alphabet size, so length is the cheaper lever: doubling a 26-letter alphabet to 52 by adding capitals gains exactly one bit per character, while one more lowercase character gains 4.7004. And entropy adds across independent draws, which is why passphrases work: each EFF long-list word contributes 12.9248 bits however many letters it happens to contain.
Length mode solves L × log₂(C) ≥ B for the smallest whole L, giving L = ⌈B ÷ log₂(C)⌉, and then reports the entropy that length actually delivers. The two agree only when log₂(C) divides the target exactly — hexadecimal, at 4 bits a character, reaches 128 bits in exactly 32 — so the achieved figure is usually a little above the target and never below it. Targets up to 4,096 bits are accepted; if one would need more than 1,024 symbols, the calculator asks for a larger alphabet instead.
The key space is computed as an exact power and split into a mantissa between 1 and 10 and a whole-number exponent, because these values outgrow ordinary floating-point numbers quickly: the largest case modelled, 1,024 symbols from a custom alphabet of a million, is 10⁶¹⁴⁴. An alphabet needs at least two symbols, since with one there is nothing to choose and the entropy is zero, and lengths and alphabet sizes must be whole numbers.
A worked example.
A password manager generates 16 characters from the 94 printable ASCII characters, space excluded. Each character contributes log₂(94) = 6.5546 bits, so the password carries 16 × 6.5546 = 104.8734 bits. The key space is 94¹⁶, and repeated squaring reaches it in four steps: 94² = 8,836; 94⁴ = 8,836² = 78,074,896; 94⁸ = 78,074,896² = 6,095,689,385,410,816; and 94¹⁶ = 37,157,429,083,410,091,685,945,089,785,856, a 32-digit number. The calculator shows it as a mantissa of 3.7157 with an exponent of 31, that is 3.7157 × 10³¹. Logarithms confirm it: 16 × log₁₀(94) = 31.5700, and 10^0.5700 = 3.7157. The note then places 104.9 bits between 80, the security strength NIST no longer considers sufficient for cryptographic keys, and 112, the lowest it still approves for new ones. Switched to length mode with a 128-bit target, the same alphabet needs 20 characters, which deliver 131.0918 bits.
Frequently asked questions.
Can this tell me whether the password I made up is strong?
How many random characters do I need for 128 bits?
Is a diceware passphrase as strong as a random password?
Why did NIST stop basing password rules on entropy?
How long would a 104.9-bit password take to crack?
Does it matter which generator produced the password?
Why is printable ASCII 94 characters and not 95?
Do rules like "must include a digit" make a random password stronger?
Does hashing, salting or a password length limit change the entropy?
Why does length mode give more bits than my target?
References& sources.
- [1]NIST, Computer Security Resource Center Glossary — 'min-entropy'. Definition used to derive this page's formula: min-entropy is −log₂(max pᵢ) over a discrete distribution p₁ … p_k, 'the largest value m having the property that each observation of X provides at least m bits of information'. Sourced by NIST to SP 800-90A Rev. 1, SP 800-90B, SP 800-133 Rev. 2 and NIST IR 8427. For a uniform draw over C^L outcomes this yields L × log₂(C).
- [2]NIST SP 800-63B-4, Digital Identity Guidelines, Appendix A 'Strength of Passwords'. Source of this page's scope limit: entropy has often been used to characterise the effective strength of user-chosen passwords, but estimating it for a human's choice is problematic, so the guideline presents 'a different and somewhat more straightforward approach based primarily on password length'.
- [3]NIST SP 800-63B-4, Digital Identity Guidelines: Authentication and Authenticator Management, §3.1.1.1–3.1.1.2. Source of the length and composition rules quoted on this page: passwords used as a single factor SHALL be a minimum of 15 characters; passwords inside multi-factor authentication SHALL be a minimum of eight; verifiers SHOULD permit a maximum length of at least 64 characters; 'Other composition requirements for passwords SHALL NOT be imposed'.
- [4]NIST, Computer Security Resource Center Glossary — 'security strength'. Source of the bands used in the result note: security strength is 'a number associated with the amount of work (i.e., the number of operations) that is required to break a cryptographic algorithm', measured in bits, commonly {80, 112, 128, 192, 256}, with roughly 2^S operations required at strength S and 80 bits recorded as no longer sufficiently secure.
- [5]Electronic Frontier Foundation (2016). 'Deep Dive: EFF's New Wordlists for Random Passphrases'. Source of the passphrase alphabet sizes: the long list is '7,776 words (6⁵)' at '12.9 bits' per word, and the two short lists are '1,296 words (6⁴)' at '10.3 bits/word'. Both published bit figures are reproduced exactly by this calculator from the list sizes alone.
- [6]IETF RFC 20 (Internet Standard 80), 'ASCII format for Network Interchange'. Source of the printable-character counts: the graphic characters occupy code points 0x20 through 0x7E inclusive, with '2/0 SP Space (Normally Non-Printing)' listed inside the graphic set — 95 printable characters in total, or 94 excluding SPACE.
- [7]IETF RFC 4648, 'The Base16, Base32, and Base64 Data Encodings', §4. Source of the 64-symbol base64 alphabet offered as a pool option.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 7 cited below
- Method
- H = L · log₂(C) K = C^L L = ⌈ B ÷ log₂(C) ⌉
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled