Check digit calculator
Type a GS1 number without its last digit to calculate the check digit, or the complete number to verify it. Every step of the calculation is shown.
Leave off the last digit to calculate it, or enter the complete number to check it. Spaces and hyphens are ignored.
Try an example
How the check digit is calculated
| Digit | 0 | 3 | 6 | 0 | 0 | 0 | 2 | 9 | 1 | 4 | 5 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| × Weight | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 | 1 | 3 |
| = Product | 0 | 3 | 18 | 0 | 0 | 0 | 6 | 9 | 3 | 4 | 15 |
- Weights alternate 3, 1, 3, 1… starting from the rightmost digit before the check digit.
- Weighted sum: 0 + 3 + 18 + 0 + 0 + 0 + 6 + 9 + 3 + 4 + 15 = 58
- 58 mod 10 = 8; check digit = (10 − 8) mod 10 = 2
Common check-digit errors
- Leading zeros dropped by Excel. A UPC like 036000291452 becomes 36000291452 when a spreadsheet stores it as a number. Format the column as Text before pasting.
- UPC vs. EAN length confusion. A 12-digit UPC-A is the same product as the 13-digit EAN-13 with a leading 0 — but 12 digits typed into an EAN-13 field are treated as “check digit missing” and give a different result.
- Transposed digits. Swapping two neighbouring digits (…45… → …54…) is the most common typing error. The check digit catches most swaps, but not when the two digits differ by 5 (e.g. 1 and 6).
- Scientific notation. Spreadsheets may show 5.90123E+12 and silently round the last digits. Never copy a GTIN from a cell displayed that way.
Check digits at a glance
- One rule for UPC-A, EAN-8, EAN-13, GTIN-14 and SSCC
- Weights 3 and 1 alternate from the right, then round up to the next 10
- Calculated in your browser — the numbers are not uploaded
How the GS1 check digit is calculated
Every GS1 identifier ends in a check digit worked out from the digits before it. Take the digits without the check digit and, starting from the right-hand end, multiply them alternately by 3 and 1. Add the products, then find the amount needed to reach the next multiple of ten — that amount is the check digit (0 when the sum is already a multiple of ten).
Worked example: UPC-A 03600029145
From the right: 5×3, 4×1, 1×3, 9×1, 2×3, 0×1, 0×3, 0×1, 6×3, 3×1, 0×3. The products add up to 58; the next multiple of ten is 60, so the check digit is 2 and the full UPC-A is 036000291452.
Because the weights are counted from the right, the same rule works for every length — which is why a GTIN-12 padded with leading zeros to 14 digits keeps the same check digit.
Which identifier do I have?
Count the digits, including the check digit:
- 8 digits — EAN-8, for very small retail packs (EAN-8 generator)
- 12 digits — UPC-A, the North-American retail code (UPC-A generator)
- 13 digits — EAN-13, retail everywhere else (EAN-13 generator)
- 14 digits — GTIN-14, for cases and cartons, usually printed as ITF-14 (ITF-14 generator)
- 18 digits — SSCC, one pallet or parcel (SSCC generator)
Twelve and thirteen digits are ambiguous: twelve can be a complete UPC-A or an EAN-13 still missing its check digit. The calculator picks the complete reading first and offers the other one with a single click.
What a check digit can and cannot tell you
The check digit catches every single wrong digit and most cases of two neighbouring digits typed the wrong way round — the exception is a swap of two digits that differ by exactly 5, such as 1 and 6. It is a typing safeguard, not a registry: a number can have a perfect check digit and still not belong to you.
Retail GTINs are licensed by GS1. Before printing thousands of labels, also check the format of the whole code with the barcode validator.
Frequently asked questions
Why does my 12-digit number give two different check digits?
Twelve digits can be read two ways. As a complete UPC-A, the last digit is the check digit and is verified. As an EAN-13 without its check digit, all twelve digits are data and a thirteenth digit is calculated. Choose the identifier type to tell the calculator which one you mean.
Can a check digit be 0?
Yes. When the weighted sum is already a multiple of ten, nothing needs to be added and the check digit is 0.
Does a valid check digit mean my barcode number is registered?
No. The check digit only proves the number is internally consistent. Whether a GTIN or SSCC is licensed to your company depends on your GS1 Company Prefix, which comes from your local GS1 organisation.
Is an ISBN-10 check digit calculated the same way?
No. ISBN-10 uses weights 10 down to 2 and modulus 11, and a check value of 10 is written as X. ISBN-13 uses the GS1 rule shown here. The ISBN tools show both calculations.
The calculation runs entirely in your browser — numbers you type are not sent to BarCodra. A correct check digit does not mean a GTIN is licensed: GTINs come from GS1.