About the GTIN / UPC Check Digit Calculator
This check digit calculator applies the GS1 modulo-10 algorithm used on every retail and logistics barcode number. In “calculate” mode, enter the data digits without the final digit — 7 for EAN-8, 11 for UPC-A, 12 for EAN-13, 13 for GTIN-14 or 17 for an SSCC — and it returns the check digit and the complete code. In “validate” mode, paste a full code and it tells you whether the last digit is correct and, if not, what it should be.
It is handy for brand owners assigning new product numbers from their GS1 company prefix, warehouse and EDI teams building case codes and shipping labels, and anyone troubleshooting a barcode that scanners or a marketplace reject. Spaces and dashes are ignored, so you can paste numbers exactly as they are printed.
A correct check digit only proves the number is well-formed; it does not prove the GTIN is licensed or registered to a company. Look a code up in GS1’s Verified by GS1 service to confirm ownership.
How to use the gtin / upc check digit calculator
- 1Choose “Calculate” to generate a check digit or “Validate” to test a full code.
- 2Paste the digits — spaces and dashes are fine.
- 3For calculate, leave off the final digit (11 digits for UPC-A, 12 for EAN-13).
- 4Read the check digit, the complete code and its 14-digit GTIN form.
- 5Use the step-by-step table to verify the weighting by hand.
Formula and method
GS1 numbers all share one algorithm regardless of length. Starting with the digit immediately to the left of the check-digit position and moving left, multiply digits alternately by 3 and 1. Add the products, then find the amount needed to reach the next multiple of 10 — that is the check digit (0 if the sum is already a multiple of 10).
Because the weighting starts from the right, adding leading zeros does not change the result, which is why a UPC-A, its EAN-13 form with a leading 0 and its 14-digit GTIN form all end in the same check digit. The algorithm catches every single-digit error and most adjacent transpositions.
- digitᵢ
- Each data digit (all digits except the check digit)
- weightᵢ
- 3 for the rightmost data digit, then alternating 1, 3, 1…
Worked examples
UPC-A check digit
Weighting the 11 data digits 0 3 6 0 0 0 2 9 1 4 5 from the right as 3, 1, 3… gives a sum of 58. The next multiple of 10 is 60, so the check digit is 2 and the full UPC is 036000291452.
EAN-13 check digit
The 12 data digits produce a weighted sum of 89, which is 1 short of 90, so the check digit is 1 and the EAN-13 is 4006381333931.
Validate an SSCC shipping label
The first 17 digits weight to 143; 150 − 143 = 7, which matches the final digit, so this 18-digit SSCC is valid.
Catch a mistyped UPC
The code ends in 3, but the data digits require a check digit of 2, so the number is invalid and the corrected code is 036000291452.
Frequently asked questions
How do you calculate a UPC check digit?+
Take the first 11 digits. Multiply the digits in odd positions (1st, 3rd, … 11th) by 3 and add the even-position digits. The check digit is the number you must add to that total to reach the next multiple of 10 — or 0 if it already is one.
Is the check digit the same for UPC, EAN-13 and GTIN-14?+
Yes for the same item number. GS1 weights from the right, so padding a 12-digit UPC with leading zeros to 13 or 14 digits gives the same check digit. A GTIN-14 with a packaging indicator other than 0 is a different number and has its own check digit.
Does a valid check digit mean the barcode is registered?+
No. The check digit only confirms the number is internally consistent. To know whether a GTIN was issued to a company, look it up in GS1’s Verified by GS1 database; marketplaces such as Amazon increasingly check that.
What is an SSCC?+
The Serial Shipping Container Code is an 18-digit GS1 number that uniquely identifies a pallet, carton or other logistic unit. It starts with an extension digit and company prefix and ends with a mod-10 check digit, and is printed with application identifier (00) in GS1-128 barcodes.
Can I make up my own UPC numbers?+
You can compute a valid-looking number, but retail-ready GTINs must come from a GS1 company prefix licensed to your business. Self-made numbers may collide with real products and are rejected by major retailers.