ratio.

Find a tool

Browse all tools and categories β†—
PROBABILITY

Uniform Random Value Collision Calculator

Calculate the chance that independent uniform draws repeat a value within an entered namespace.

Enter your values

01 / INPUT

Fields marked as calculated are solved from the other inputs. Their unit selectors remain available.

Calculated on your device

YOUR CALCULATION

Result

β€”

Calculation steps

Work through one step at a time or reveal the complete calculation. The steps use your current inputs.

    How to calculate

    Multiply the successive no-repeat factors using logarithms, then evaluate one minus that probability with expm1 to retain small collision tails. Compare with expected equal-value pairs.

    P(no repeat)=∏(1βˆ’i/N), i=1..nβˆ’1; expected equal-value pairs=n(nβˆ’1)/(2N)

    Worked example

    With 23 independent uniform draws from 365 values, the repeated-value probability is about 50.7297%. With two draws it is exactly 1/365 under the model.

    Assumptions and input details

    Independent uniform draws from the same fixed namespace, with replacement. This is a mathematical collision model, not a test or certification of a generator. Expected equal-value pairs differ from expected duplicate draws. Namespace size is shown as an exact integer; probabilities use floating point and may round to 0 or 1.

    References: Stanford CS109: birthday probability

    Using this calculator

    Can I enter my own problem?

    Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.

    Are the results exact?

    Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.

    Is my input uploaded?

    The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.

    RELATED TOOL Β· MATHEMATICSBinomial Probability Calculator

    Calculate exactly k, at most k and at least k successes in independent trials. Explore the binomial distribution, expected value and standard deviation.

    RELATED TOOL Β· MATHEMATICSPermutation and Combination Calculator

    Count ordered or unordered selections, with or without repetition. Read the exact integer result, compare all four cases and list examples for small problems.

    RELATED TOOL Β· COMPUTINGIPv6 Prefix Range and Address Calculator

    Expand and normalize a hexadecimal IPv6 address and calculate exact numerical prefix boundaries and child-prefix counts.

    ADVERTISEMENT

    Reserved advertising space.