Password Entropy Calculator Online | Crack Time Estimation
Password & Security How It Works
What Is an Entropy Calculator?
An entropy calculator measures how unpredictable your password is, expressed in bits. This tool analyzes password strength using three complementary methods: pool-based theoretical entropy (assumes perfect randomness from the detected character pool), zxcvbn actual entropy (pattern recognition that detects dictionary words, keyboard walks, and common substitutions), and Shannon information entropy (character frequency distribution).
Together, these metrics reveal both the mathematical strength and the real-world resistance to pattern-based attacks. All computation happens entirely in your browser — passwords are never transmitted to any server.
When to Use an Entropy Calculator
- Auditing password strength — Quantify how resistant your passwords are to brute-force and pattern-based attacks
- Comparing password strategies — See whether a longer passphrase or a shorter complex password provides more entropy
- Identifying pattern weaknesses — Detect if your password contains dictionary words, keyboard walks, or common substitutions
- Compliance testing — Verify passwords meet organizational entropy requirements (typically 60+ bits)
- Educational purposes — Understand the math behind password strength and why certain patterns are weak
- When NOT to use — Don't test real production passwords on public sites; use for educational purposes or test with similar patterns instead
Entropy Benchmarks
| Entropy | Rating | Example | Crack Time (GPU) |
|---|---|---|---|
| < 40 bits | Weak | password123 | Seconds |
| 40–60 bits | Fair | Tr0ub4dor&3 | Hours to days |
| 60–80 bits | Strong | correct-horse-battery-staple | Centuries |
| 80+ bits | Very strong | random 16-char mixed | Millions of years |
Standards Compliance
- NIST SP 800-63B — Digital Identity Guidelines: Memorized secret strength requirements
- Shannon Information Theory — Mathematical framework for measuring information entropy (1948)
- zxcvbn Algorithm — Pattern-based password strength estimation (Dropbox, 2016)
- OWASP Authentication Guidelines — Password strength meter recommendations (2024)
Last updated:
Code Examples
Calculate entropy programmatically:
JavaScript — Theoretical Entropy (Pool-Based)
function theoreticalEntropy(password) {
let poolSize = 0;
if (/[a-z]/.test(password)) poolSize += 26;
if (/[A-Z]/.test(password)) poolSize += 26;
if (/[0-9]/.test(password)) poolSize += 10;
if (/[^a-zA-Z0-9]/.test(password)) poolSize += 33;
return password.length * Math.log2(poolSize);
}
console.log(theoreticalEntropy('P@ssw0rd123')); // ~52.6 bits Python — Shannon Entropy
import math
from collections import Counter
def shannon_entropy(password):
counts = Counter(password)
length = len(password)
return -sum((c / length) * math.log2(c / length)
for c in counts.values())
print(f"Shannon entropy: {shannon_entropy('P@ssw0rd123'):.2f} bits/char") Go — Theoretical Entropy
package main
import (
"fmt"
"math"
"regexp"
)
func theoreticalEntropy(password string) float64 {
poolSize := 0
if matched, _ := regexp.MatchString("[a-z]", password); matched {
poolSize += 26
}
if matched, _ := regexp.MatchString("[A-Z]", password); matched {
poolSize += 26
}
if matched, _ := regexp.MatchString("[0-9]", password); matched {
poolSize += 10
}
if matched, _ := regexp.MatchString("[^a-zA-Z0-9]", password); matched {
poolSize += 33
}
return float64(len(password)) * math.Log2(float64(poolSize))
}
func main() {
fmt.Printf("Entropy: %.2f bits\n", theoreticalEntropy("P@ssw0rd123"))
} Rust — Shannon Entropy
use std::collections::HashMap;
fn shannon_entropy(password: &str) -> f64 {
let mut counts = HashMap::new();
for c in password.chars() {
*counts.entry(c).or_insert(0) += 1;
}
let length = password.len() as f64;
-counts.values()
.map(|&c| {
let p = c as f64 / length;
p * p.log2()
})
.sum()
}
fn main() {
println!("Shannon entropy: {:.2} bits/char", shannon_entropy("P@ssw0rd123"));
} Node.js — zxcvbn Integration
const zxcvbn = require('zxcvbn');
const result = zxcvbn('P@ssw0rd123');
console.log('Score:', result.score); // 0-4 scale
console.log('Guesses:', result.guesses);
console.log('Entropy:', Math.log2(result.guesses).toFixed(2), 'bits');
console.log('Crack time:', result.crack_times_display.offline_slow_hashing_1e4_per_second); Common Pitfalls & Attack Vectors
Security Notes
Disclaimer
Disclaimer: This page is for educational and testing purposes only. It does not constitute professional security advice. For production password policies and authentication systems, consult official standards (NIST SP 800-63B, OWASP) and conduct a formal security review.
Further Reading & Standards
- NIST SP 800-63B — Digital Identity Guidelines: Memorized Secret Requirements
- Shannon's Original Paper — A Mathematical Theory of Communication (1948)
- zxcvbn Research Paper — Estimating Password Strength (USENIX Security 2016)
- OWASP Authentication Cheat Sheet — Password Strength Requirements
Related Concepts
- Key Management — How to securely generate, store, and rotate cryptographic keys
- Symmetric vs Asymmetric Encryption — Understanding cryptographic fundamentals
- Password Generation — Creating passwords with known entropy
- Post-Quantum Cryptography — How quantum computers will affect password security
Related Tools
Want a quick strength score instead of detailed entropy bits? The Password Strength Checker gives an at-a-glance rating. To generate passwords with known entropy, try the Password Generator or Passphrase Generator.
Frequently Asked Questions
What do the three entropy values mean?
This tool shows three metrics: Theoretical entropy (pool-based, assumes perfect randomness), Actual entropy (zxcvbn pattern analysis, detects common patterns), and Shannon entropy (character frequency distribution). If theoretical is much higher than actual, your password contains patterns an attacker could exploit.
How accurate are the crack time estimates?
Estimates are based on four attack scenarios — online guessing (100/sec), slow hash (10K/sec), workstation (100M/sec), and GPU cluster (10B/sec). Real-world attacks face rate limiting, account lockouts, and key stretching (bcrypt, Argon2) that dramatically slow down cracking beyond these estimates.
What is a good entropy score?
Aim for 60+ bits for most accounts. 80+ bits is considered very strong. For your password manager master key or email, target 100+ bits. A 16-character random password with mixed types typically achieves 80–100 bits of theoretical entropy.
Is my password sent to a server?
No. All computation happens entirely in your browser using JavaScript. Your password is never transmitted, stored, or logged. This tool runs 100% client-side.
Why is my actual entropy lower than theoretical?
Theoretical entropy assumes every character is randomly chosen. Actual entropy (zxcvbn) detects patterns like dictionary words, keyboard walks ("qwerty"), repeated characters, and common substitutions (@ for a). A password like "P@ssw0rd123" has decent theoretical entropy but very low actual entropy because it matches known attacker patterns.
Privacy: This tool runs entirely in your browser — nothing is uploaded or stored. · Disclaimer: For educational purposes only. Not professional security advice.
More in Password
Password Generator
Generate secure random passwords online with customizable length, character types, symbols, and exclusion rules. Quick presets available.
Password Strength Checker
Check password strength and estimate crack time online. zxcvbn-based entropy analysis, multiple attack scenarios, and pattern recognition.
Passphrase Generator
Generate strong passphrases from random dictionary words online. EFF wordlist, configurable separators, and color-coded strength.
KDF Hash Generator
Derive cryptographic keys using PBKDF2, Argon2, or Scrypt online. OWASP 2024 parameters, PHC output, adjustable iterations and memory.
Shamir Secret Sharing
Split secrets into shares using Shamir's Secret Sharing over GF(256). Any K-of-N threshold reconstruction with Lagrange interpolation.