UUID Collision Calculator

    Estimate the chance of at least one matching pair of random UUID v4 values.

    This calculator models independent, uniformly random UUID v4 values with 122 random bits. It does not model truncated UUIDs, faulty randomness, v5, ULID, or timestamp-based UUIDs.

    How the estimate works

    With N = 2^122 and n generated identifiers, the birthday approximation is p ≈ 1 − exp(−n(n−1)/(2N)). We use a numerically stable calculation so very small probabilities remain visible. Counts at large scales are approximate because browser numbers have finite precision.

    The 50% threshold is about 2.715 × 10^18 UUIDs. At one billion per day that is about 7.43 million years. A collection has many pairs: the probability that one pair matches is not the risk across the whole collection.

    Frequently asked questions

    Does this guarantee my UUIDs will not collide?
    No. This is a probability model, not a guarantee. Defective randomness, truncation, and application bugs can invalidate its assumptions.
    Can I use this calculation for UUID v7?
    No. UUID v7 includes a timestamp and may use counters. Its collision model depends on the implementation and the number generated within the relevant timestamp interval.