Skip to content

Serial number randomisation calculator

Enter the length of your serial number, its character set and the quantity you will issue per product code; see the guess probability, the entropy and the chance of a repeat under random generation, and compare with the 1-in-10,000 threshold of EU 2016/161. The calculation runs in your browser.

Free tool · Serialization

Checking your session…

01

How to use it

  1. A

    Choose the serial number length and character set; enter the length of the fixed (non-random) prefix, if any.

  2. B

    Enter the number of serial numbers you will issue for one product code, per batch or over its lifetime.

  3. C

    Review the guess probability, the position against the 1-in-10,000 threshold, the entropy, the collision probability and the table of shortest lengths.

02

How is the guess probability calculated?

If the random part of the serial number consists of n characters drawn from a set of k, the number of possible serial numbers is N = k^n. If a numbers are issued for one product code, the probability that a randomly chosen number is valid is p = a / N. A fixed prefix adds nothing to the space; only the number of random characters, n, counts.

Commission Delegated Regulation (EU) 2016/161, Article 4(b), requires the probability of guessing a serial number to be negligible and in any case lower than one in ten thousand. The tool compares p with this threshold, also shows the entropy of the random part (n · log2 k bits) and lists the shortest length that meets the threshold for each character set.

03

Sequential numbering and predictability

Sequential numbers are attractive because they make production order easy to follow, but the value of serialization against counterfeiting rests on numbers being unpredictable. In a sequential run, anyone who sees one number can derive its neighbours; the chance of finding a valid number is far above the threshold.

The practical solution is to generate numbers randomly (or by an unpredictable algorithm) and keep the production order in a separate record. Random generation needs an even distribution of characters and a check for repeats.

04

Collision (birthday) probability and duplicate checking

When numbers are generated randomly, the chance that two of them are the same is higher than intuition suggests (the birthday paradox). For a numbers and N possible values, the probability of at least one repeat is approximately 1 − exp(−a² / 2N). The value the tool shows is this approximation.

Two products with the same product code must never receive the same serial number, so even when the probability is very low, production should check for duplicates (record the numbers generated and compare each new one against them). The low/medium/high split is the tool's own indicator, not a regulatory value.

FAQ

Are the values I enter sent anywhere?
No. The calculation runs entirely in code inside your browser; the values are neither transmitted to a server nor stored.
Where does the 1-in-10,000 threshold come from?
Commission Delegated Regulation (EU) 2016/161, Article 4(b): the probability of guessing a serial number must be negligible and in any case lower than one in ten thousand. Confirm from the relevant guidance which quantity applies in practice.
What quantity should I enter?
The number of serial numbers you will issue for the same product code (GTIN): per batch or over its lifetime. A larger quantity gives a worse probability; entering the long-term total is the safe side.
What are the serial number rules of Turkey's ITS?
This tool gives no ITS-specific value. For the character set, length and format consult the current ITS technical guide.
Does a fixed prefix enlarge the possible space?
No. A fixed prefix makes the number longer but, not being random, does not enlarge the possible space; only the number of random characters counts.

Set up serial number generation correctly

We build unpredictable serial number generation, duplicate checking and reporting to national systems, integrated with your line and ERP. Let's talk in a free discovery call.