GS1 check digit calculator: UPC, EAN, GTIN-14 and SSCC
Paste a barcode number to see if it is valid, or leave off the last digit and get the right one. Works for UPC-A, EAN-13, GTIN-14 and SSCC-18.
- 10 sec
- Free, no signup
- Runs in your browser
- Formula shown
Barcode number
Paste a full code to check it, or leave off the last digit to get it. Spaces, dashes and a leading (00) or (01) are fine.
Try one
Result
LiveUPC-A (GTIN-12)
Valid
Check digit 2 is correct
- Type
- UPC-A (GTIN-12)
- Digits read
- 036000291452
- Correct check digit
- 2
- Full code
- 036000291452
- As GTIN-14
- 00036000291452
- The check digit catches typos and misreads. It does not prove the number is registered to a brand; GS1's Verified by GS1 lookup does that.
OpsBox scans UPC, EAN and GTIN-14 at receiving and picking, and prints SSCC labels for retail cartons and pallets with the check digit done for you.
How the math works
Take the digits before the check digit. From the right, multiply them by 3, 1, 3, 1 ... Add the results. Check digit = (10 - sum mod 10) mod 10
Every GS1 number ends in a check digit computed from the others with the same mod 10 rule, whatever the length. Starting next to the check digit and moving left, digits are weighted 3, 1, 3, 1 and so on. The check digit is what you add to the sum to reach the next multiple of 10. A scanner does the same math on every read, which is how it catches a smudged bar or a typo.
The length tells the type: 12 digits is a UPC-A (GTIN-12), 13 an EAN-13 (GTIN-13), 14 a GTIN-14 for cases and inner packs, and 18 an SSCC for a pallet or carton shipment. One digit fewer means the check digit is missing, so the calculator works it out. Choose the type yourself if the length is ambiguous.
Worked example. UPC-A 03600029145, check digit missing. From the right: 5x3 + 4x1 + 1x3 + 9x1 + 2x3 + 0x1 + 0x3 + 0x1 + 6x3 + 3x1 + 0x3 = 15 + 4 + 3 + 9 + 6 + 18 + 3 = 58. 10 - 8 = 2. The full code is 036000291452.
Questions people ask
How do I calculate a UPC check digit?
Take the first 11 digits. Starting from the right, multiply them alternately by 3 and 1 and add the results. The check digit is the number that brings that sum up to the next multiple of 10 (0 if it is already a multiple of 10).
Is the EAN-13 check digit calculated the same way?
Yes. All GS1 identifiers (GTIN-8, GTIN-12, GTIN-13, GTIN-14 and SSCC) use the same mod 10 rule, weighting from the right with 3, 1, 3, 1.
What is a GTIN-14?
A 14 digit number for a packaging level of a product, usually a case or inner pack, printed as ITF-14 or GS1-128. It starts with an indicator digit set by the brand owner, then the item number without its check digit, then a new check digit.
What is an SSCC?
The Serial Shipping Container Code: 18 digits that identify one logistic unit, such as a pallet or a carton, on a GS1-128 label after the (00) application identifier. Retailers use it to match the carton or pallet to the ASN.
Does a valid check digit mean the barcode is registered?
No. The check digit only proves the digits are consistent. Whether the number belongs to a brand is answered by GS1's Verified by GS1 lookup or the brand owner.
Why does a UPC start with a 0 in EAN-13?
A 12 digit UPC-A becomes a 13 digit EAN-13 by adding a leading zero, and a 14 digit GTIN-14 by adding two. The check digit stays the same, because leading zeros add nothing to the sum.
Related tools
What do late or non-compliant shipments cost me a year?
Retailer chargeback calculator
How many cases fit per layer and per pallet?
Pallet calculator (Ti-Hi)
What will UPS, FedEx and USPS bill for this box?
DIM weight calculator
Done doing this by hand?
OpsBox is the WMS that runs this math on the floor, for every order, without a spreadsheet.
Estimates from the formulas above, for planning. Check against your carrier, landlord, supplier or team before you commit money. Reset this tool.