Skip to main content
Calcimator

Hash Collision Probability Calculator

Calculate hash collision probability using birthday paradox. Find collision probability and birthday bound for hash functions.

Inputs

bits

Results

Collision Probability

0%

Expected Collisions

0

Birthday Bound

400,651,869,298,001,200,000,000,000,000,000,000,000

Time to Collision4,637,170,000,000,000,000,000,000 days
How to Use This Calculator
  1. Enter the hash function digest size in bits.
  2. Set the number of messages to be hashed.
  3. Review the probability of at least one collision occurring.
  4. Ensure the collision probability is below your application acceptable risk threshold.
  5. For digital signatures, collision resistance requires a hash output at least twice the desired security level.

What each input means

Hash Length
Hash output length in bits
Number of Hashes
Number of hash values to compare
Hash Function
Hash function type

How this is calculated

Formula

P(collision) ≈ 1 - e^(-n²/(2×m))

Worked example, using the default values

  1. Identify Input Parameters
    Hash Length = 256, Number of Hashes = 1000000, Hash Function = 0 = 3 input(s) provided
  2. Calculate Collision Probability
    0 = 0%
  3. Calculate Expected Collisions
    Expected Collisions
    0 = 0
  4. Calculate Birthday Bound
    Birthday Bound
    4.006518692980012e+38 = 4.006518692980012e+38
  5. Calculate Time to Collision
    Time to Collision
    4.63717e+24 = 4.63717e+24

Engine last updated . Checked against 2 independently-derived tests how we verify calculators.

The questions that sit next to this one — chosen by subject, including calculators filed under a different category.

More in Technology & Computing.