What Is Password Entropy?
What Is Entropy in Cryptography?
In the physical sciences, entropy measures the degree of disorder or randomness in a closed system. In computer science and cryptography, information entropy serves a similar purpose: it quantifies the unpredictability of a piece of data — specifically, security credentials like passwords, PINs, or passphrases.
When we talk about “password strength,” we are not discussing how clever a password is. Instead, we are looking at its mathematical randomness. Password entropy, measured in bits, tells us how many guesses a brute-force cracking script must make on average to guess your credential.
Understanding entropy is crucial for developers designing authentication systems and users securing their accounts. In this article, we will examine the mathematics behind entropy, look at calculation examples, and outline the safety thresholds required to withstand modern GPU-based cracking attacks.
Claude Shannon and Information Theory
The concept of cryptographic entropy is based on the work of Claude Shannon, an American mathematician often called the “father of information theory.” In his groundbreaking 1948 paper, A Mathematical Theory of Communication, Shannon introduced a way to measure the information content of a message based on probability.
Applied to password security, Shannon’s theories help us understand search spaces. If a password is generated with $E$ bits of entropy, the size of the search space (the total number of possible combinations) is:
$$\text{Search Space} = 2^E$$
For example, a password with 1 bit of entropy has a search space of $2^1 = 2$ possibilities (like a coin flip). A password with 64 bits of entropy has a search space of $2^{64} \approx 1.84 \times 10^{19}$ possibilities.
Every additional bit of entropy doubles the difficulty of cracking the password. This exponential growth is why small increases in password length provide massive gains in security.
The Formula and Step-by-Step Calculation
To calculate the entropy of a password, we assume it is composed of characters chosen at random from a known pool of symbols. The standard formula is:
$$E = L \times \log_2(R)$$
Where:
- $E$ is the entropy of the password in bits.
- $L$ is the length of the password (number of characters).
- $R$ is the size of the character pool (the number of unique characters available to choose from).
You can analyze your own passwords instantly using our client-side Password Entropy Calculator.
To perform the calculation manually, follow these three steps:
Step 1: Determine the Character Pool Size ($R$)
We categorize the characters in the password into standard sets:
- Lowercase letters (
a-z): 26 characters - Uppercase letters (
A-Z): 26 characters - Numeric digits (
0-9): 10 characters - Special symbols: 33 characters (standard keyboard symbols)
If a password uses characters from multiple sets, we add their sizes together. For example, if a password contains lowercase letters, numbers, and symbols, the pool size is: $$R = 26 + 10 + 33 = 69$$
Step 2: Apply the Logarithm
Next, calculate the entropy contribution per character using the base-2 logarithm of the pool size ($\log_2(R)$). This tells us how many bits of entropy each character provides.
- If $R = 10$ (digits only), $\log_2(10) \approx 3.32$ bits per character.
- If $R = 26$ (lowercase letters only), $\log_2(26) \approx 4.70$ bits per character.
- If $R = 95$ (full ASCII set), $\log_2(95) \approx 6.57$ bits per character.
Step 3: Multiply by Length ($L$)
Finally, multiply the bits per character by the total length of the password.
Let’s calculate the entropy of a 12-character password using the full ASCII set: $$E = 12 \times \log_2(95) \approx 12 \times 6.57 \approx 78.8 \text{ bits}$$
How Pool Size Affects Entropy
Many users focus heavily on adding complex symbols to their passwords while keeping them short. However, the mathematics of entropy show that increasing the pool size ($R$) has a minor effect compared to increasing the length ($L$).
Let’s compare two scenarios:
Scenario 1: Focus on Complexity (Short and Complex)
Consider an 8-character password using the full ASCII set ($R = 95$):
- $E = 8 \times \log_2(95) \approx 8 \times 6.57 \approx \mathbf{52.56 \text{ bits}}$
Scenario 2: Focus on Length (Long and Simple)
Consider a 16-character password using lowercase letters only ($R = 26$):
- $E = 16 \times \log_2(26) \approx 16 \times 4.70 \approx \mathbf{75.2 \text{ bits}}$
Even though Scenario 2 uses a much smaller character pool, its length makes it four million times harder to crack than the complex password in Scenario 1. This illustrates why security experts recommend prioritizing length over complex character sets. You can generate long, secure passwords easily with our Password Generator.
Comprehensive Entropy Comparison Table
The following table provides entropy calculations for common password configurations:
| Password Type | Length | Pool Size (R) | Bits per Char | Total Entropy |
|---|---|---|---|---|
| Numeric PIN | 4 | 10 | 3.32 | 13.3 bits |
| Numeric PIN | 6 | 10 | 3.32 | 19.9 bits |
| Lowercase only | 8 | 26 | 4.70 | 37.6 bits |
| Lowercase only | 12 | 26 | 4.70 | 56.4 bits |
| Lowercase + digits | 10 | 36 | 5.17 | 51.7 bits |
| Mixed case | 10 | 52 | 5.70 | 57.0 bits |
| Mixed case + digits | 12 | 62 | 5.95 | 71.4 bits |
| Full ASCII | 8 | 95 | 6.57 | 52.6 bits |
| Full ASCII | 12 | 95 | 6.57 | 78.8 bits |
| Full ASCII | 16 | 95 | 6.57 | 105.1 bits |
| Diceware 4 words | 4 | 7,776 | 12.92 | 51.7 bits |
| Diceware 5 words | 5 | 7,776 | 12.92 | 64.6 bits |
| Diceware 6 words | 6 | 7,776 | 12.92 | 77.5 bits |
| Diceware 7 words | 7 | 7,776 | 12.92 | 90.4 bits |
Critical Entropy Thresholds
To evaluate the strength of your passwords, use these standard entropy ranges:
| Entropy Range | Strength Rating | Crack Time (100B hashes/s) | Use Case |
|---|---|---|---|
| Under 28 bits | Very Weak | < 1 second | Nothing — easily cracked |
| 28-35 bits | Weak | Seconds to minutes | Low-risk throwaway accounts only |
| 36-55 bits | Moderate | Minutes to hours | Not recommended for any real account |
| 56-75 bits | Strong | Days to years | Standard online accounts |
| 76-95 bits | Very Strong | Years to centuries | Financial, email, critical accounts |
| 96+ bits | Guaranteed Secure | Centuries+ | Master passwords, admin credentials |
You can check your password’s rating and analyze it for potential weaknesses using our Password Strength Checker.
Real-World Entropy Examples
Let’s examine the entropy of common password types people actually use:
Common Passwords (and Why They Fail)
123456— 6 digits = 19.9 bits — cracked instantlypassword— 8 lowercase = 37.6 bits — cracked in secondsP@ssw0rd!— 9 chars, full ASCII but predictable = ~52 bits — cracked in minutesqwerty123— 9 chars, keyboard pattern = ~40 bits — cracked in seconds
Strong Passwords (and Why They Work)
kT9$mP2#xLqN— 12 chars, full ASCII, random = 78.8 bits — takes years to crackcorrect horse battery staple— 4-word Diceware = ~51.7 bits — moderate (add more words)river-mountain-storm-ocean-forest— 5-word Diceware = ~64.6 bits — strongj8$kL2#mN9$pQ4$rS6— 18 chars, full ASCII, random = 118.2 bits — unbreakable
Why Predictable Passwords Have Lower Effective Entropy
Even a password that looks random may have low effective entropy if it follows human-chosen patterns. Research from the 2024 Carnegie Mellon password study found that users’ “random” passwords actually contain only 40-60% of the theoretical entropy because humans unconsciously avoid certain character combinations and favor patterns.
This is why using a cryptographically secure random generator — such as our client-side Password Generator — is critical. True randomness eliminates human bias and achieves the full theoretical entropy of the character pool.
The Threat of GPU Cracking
Modern password cracking is highly optimized. Attackers use tools like Hashcat on custom GPU rigs to test combinations at incredible speeds.
When a website database is breached, attackers do not attack the live website. Instead, they download the hashed password database and run offline attacks. This bypasses rate-limiting protections, allowing them to test billions of hashes per second.
GPU Cracking Speed Benchmarks (2026)
| Algorithm | Hardware | Speed |
|---|---|---|
| MD5 | 10x RTX 4090 | ~300 billion hashes/sec |
| SHA-1 | 10x RTX 4090 | ~100 billion hashes/sec |
| SHA-256 | 10x RTX 4090 | ~40 billion hashes/sec |
| bcrypt (cost 12) | 10x RTX 4090 | ~1 million hashes/sec |
| Argon2id | 10x RTX 4090 | ~100,000 hashes/sec |
The implications are clear:
- A 40-bit password (e.g.,
Kj#9mP2) is cracked in milliseconds against MD5. - A 64-bit password (e.g., 5-word Diceware) takes minutes to hours against MD5 but remains strong against bcrypt.
- An 80-bit password takes years even against fast hashing algorithms.
- A 100+ bit password is mathematically unbreakable with current technology, regardless of the hashing algorithm.
If your password has low entropy (e.g., 40 bits), an offline GPU array will crack it in minutes. By generating high-entropy credentials (e.g., 80+ bits), you ensure that even if a hash database is leaked, your specific password remains secure. Check if your credentials have been compromised in past leaks using our secure Password Breach Checker.
Entropy vs. Password Length: A Visual Guide
Here’s a quick reference showing how entropy scales with length for different character pools:
| Length | Digits Only (10) | Lowercase (26) | Mixed Case (52) | Full ASCII (95) |
|---|---|---|---|---|
| 6 | 19.9 bits | 28.2 bits | 34.2 bits | 39.4 bits |
| 8 | 26.6 bits | 37.6 bits | 45.6 bits | 52.6 bits |
| 10 | 33.2 bits | 47.0 bits | 57.0 bits | 65.7 bits |
| 12 | 39.8 bits | 56.4 bits | 68.4 bits | 78.8 bits |
| 16 | 53.1 bits | 75.2 bits | 91.2 bits | 105.1 bits |
| 20 | 66.4 bits | 94.0 bits | 114.0 bits | 131.4 bits |
This table clearly demonstrates that length is the dominant factor in entropy calculation. A 20-character lowercase password (94 bits) is stronger than a 12-character full-ASCII password (78.8 bits), despite having no uppercase letters, digits, or symbols.
Frequently Asked Questions
What entropy should my passwords have?
For standard online accounts, aim for at least **60-75 bits** of entropy. For critical accounts (email, banking, password manager), target **80+ bits**. For master passwords and root credentials, aim for **100+ bits**. Use our [Password Entropy Calculator](/entropy-calculator) to check your current passwords.Is a 12-character random password always strong?
It depends on the character pool. A 12-character password using only lowercase letters has about 56 bits of entropy (moderate). The same length using full ASCII has about 79 bits (strong). Always use mixed character sets for shorter passwords. Our [Password Generator](/password-generator) automatically selects from the full character pool.How does entropy relate to cracking time?
Entropy directly determines the size of the search space. Each bit doubles the number of possible combinations. A password with 64 bits of entropy requires an average of $2^{63}$ guesses to crack — approximately 9.2 quintillion combinations. Against a cracker testing 100 billion hashes per second, this takes roughly 3 years.Are passphrases as secure as complex passwords?
Yes, when generated randomly. A 5-word Diceware passphrase (from a 7,776-word list) provides about 65 bits of entropy — comparable to a 10-character random password using full ASCII. For higher security, use 6+ words. Generate secure passphrases using our [Passphrase Generator](/passphrase-generator).Why do some websites limit password length?
Length limits often indicate poor security practices. Some legacy systems store passwords in plaintext or use weak hashing, and limit length to reduce storage costs or meet outdated database constraints. NIST recommends supporting passwords of at least **64 characters**. Avoid services that impose low maximum password lengths.GeneratePass Developers
Verified AuthorSecurity researchers, cryptography engineers, and software developers dedicated to making browser-based cryptographic tools accessible and secure. We write guides with a focus on local execution, zero-trust patterns, and client-side data sovereignty.
Related Security Tools
Related Publications
Base64 Encoding Explained
A technical guide to Base64 encoding, explaining the mathematical bit-shifting process, padding logic, and modern use cases in web applications.
Base64 Myths Debunked: What Encoding Actually Does (and Doesn't Do)
Debunking the most common Base64 myths, explaining what Base64 encoding is, what it is not, and when you should—and shouldn't—use it.
JWT Security Guide: How JSON Web Tokens Work and How to Secure Them
A comprehensive guide to JWT security, covering token structure, signing algorithms, common vulnerabilities, and production best practices.