CUID Generator logoCUID Generator

Collision Calculator

Calculate the probability of getting duplicate IDs based on how many you plan to generate. Powered by the birthday paradox formula.

Configuration

Secure, compact, URL-safe (Recommended)

Collision Probability
0
ID Space Size
~1037
50% Risk At
5579.02 quadrillion IDs

Risk Comparison

CUID2
0
UUID v4
0
CUID v1
1.06 × 10^-7

Understanding ID Collisions

A collision occurs when two independently generated IDs happen to be identical. While rare, understanding collision probability helps you choose the right ID format for your scale.

The Birthday Paradox

The "birthday paradox" is a famous probability puzzle: in a room of just 23 people, there's a 50% chance that two share a birthday. This seems counterintuitive because there are 365 possible birthdays.

The same principle applies to unique IDs. Collisions become probable much sooner than you might expect — roughly at the square root of the total possible ID space.

50% collision threshold ≈
√(possible IDs)

ID Type Comparison

TypeRandom Bits50% Threshold
CUID2 (24 chars)~120 bits~1.3 × 10¹⁸ IDs
UUID v4122 bits~2.7 × 10¹⁸ IDs
CUID v1~48 random bits~17 million IDs
Auto-increment (32-bit)N/A4.3 billion max

Note: CUID v1 also uses timestamp and fingerprint for uniqueness, so actual collision risk in practice is lower than pure random would suggest.