Hash Collision Probability

Comments debate the likelihood of hash collisions in UUIDs, IDs, and large datasets, frequently invoking the birthday paradox, entropy calculations, and improbability for practical scales.

šŸ“‰ Falling 0.5x Security
1,922
Comments
20
Years Active
5
Top Authors
#2254
Topic ID

Activity Over Time

2007
3
2008
2
2009
32
2010
27
2011
68
2012
97
2013
92
2014
106
2015
93
2016
104
2017
137
2018
88
2019
105
2020
125
2021
223
2022
156
2023
148
2024
177
2025
127
2026
12

Keywords

wolframalpha.com facebook.com UUID rinatussenov.com wikimedia.org TH E.g wikipedia.org IP collision hash collisions billion birthday bits 256 probability paradox uuid

Sample Comments

bandrami • Dec 31, 2024 • View on HN

The hash space is atoms-in-the-universe range; this is a collision in a much, much smaller subset of that space

tsenart • Dec 6, 2016 • View on HN

Yes, there's always a negligible chance of collision.

tel • May 12, 2015 • View on HN

You'd have to be able to generate some pretty fantastically unique hash collisions!

InclinedPlane • Apr 29, 2013 • View on HN

It'd be great if it was something like a hash or uuid collision. Such things are super unlikely but not impossible.

jules • Nov 25, 2013 • View on HN

You are not taking the entire hash, you are only taking the first 33 bits of the hash. Since there are only about 8.5 billion different values for the 33 bits and there are about 7 billion people, the odds are astronomically low that each of those 7 billion people will receive a different one of those 8.5 billion possibilities.This is the birthday paradox with instead of 365 days you have 2^33 possible answer values and instead of 23 people you have 7 billion people. I leave it as an exercise

ww520 • May 23, 2025 • View on HN

The hash collision chance is extremely low.

gruez • Jul 23, 2022 • View on HN

Using the formula on wikipedia and checking random numbers it looks like the number required for 50% chance of collision is around 1200.https://www.wolframalpha.com/input?i=1-%28999999%2F1000000%2...https://en.wikipedi

klysm • Oct 2, 2023 • View on HN

No number of bits is large enough to _prevent_ collisions.

rezonant • Dec 15, 2023 • View on HN

Hmm, how many bits of entropy are in one of these things? Can we calculate the likelihood of collision?

wruza • Jul 10, 2021 • View on HN

This number may be even lower if you take the birthday problem into account. I’m not a statistics guy to confirm that or to make proper calculations, but I believe it applies to this case as well, because first few bits of a hash are like what a birthday is to an otherwise unique person.https://en.wikipedia.org/wiki/Birthday_problem