Password Entropy Calculator Online | Crack Time Estimation

Password & Security
100% client-side. Processed locally in your browser using the Web Crypto API. Nothing is sent to any server.
⚠️ Critical Security: Aim for 60+ bits of entropy for most accounts. 80+ bits is very strong. For password manager master keys or email, target 100+ bits. A large gap between theoretical and actual entropy indicates exploitable patterns.

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

⚠️ Trusting Only Theoretical Entropy — A password like "P@ssw0rd123" has decent theoretical entropy (~52 bits) but very low actual entropy because it matches known attacker patterns. Always compare theoretical vs. actual entropy.
⚠️ Ignoring Pattern-Based Attacks — zxcvbn detects dictionary words, keyboard walks ("qwerty"), repeated characters, dates, and common substitutions. A password with high theoretical entropy can still be weak if it contains these patterns.
⚠️ Testing Real Production Passwords — Never test actual production passwords on public sites. Even client-side calculators can be compromised by browser extensions or network monitoring. Use for educational purposes or test with similar patterns instead.
⚠️ Misinterpreting Shannon Entropy — Shannon entropy measures character frequency distribution, not overall strength. "aaaa" has zero Shannon entropy but high theoretical entropy for its pool. Use all three metrics together.
⚠️ Assuming 60 Bits Is Always Safe — While 60 bits is a good baseline, critical accounts (email, banking, password manager master) should target 80+ bits. Nation-state attackers can brute-force lower entropy passwords.

Security Notes

🔒 Gap between theoretical and actual = patterns — if theoretical is 80+ bits but actual is under 40, your password contains exploitable patterns.
🔒 Shannon entropy catches repetitions — "aaaa" has high theoretical entropy for its pool but zero Shannon entropy; this tool flags both.
🔒 Use this alongside the Strength Checker — our Password Strength Checker gives actionable feedback; this tool gives the mathematical breakdown.
🔒 Generate, don't guess — for truly random passwords, use our Password Generator or Passphrase Generator.

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

Related Concepts

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

Learn More