GS1 Prefix Check Calculator
Enter a GTIN-8, UPC, EAN-13 or GTIN-14 barcode to validate its GS1 check digit.
Result
How it is calculated
The tool strips everything except digits, so spaces and hyphens are ignored, and needs exactly 8, 12, 13 or 14 digits (GTIN-8, GTIN-12/UPC-A, GTIN-13/EAN-13 and GTIN-14); 9, 10, 11 or more than 14 digits give no result. The last digit is the check digit; the rest is the payload. Working from the right end of the payload, the digits are multiplied by 3, 1, 3, 1 and so on, and the products are added up. computed check = (10 − sum mod 10) mod 10. If it equals the last digit you typed, the code is valid (shown as Yes), otherwise invalid (No). It also shows the code length, the typed check digit, the computed one and the first three digits as the prefix block. It only checks the digits are consistent: it does not look up the company or country of the prefix, and it does not confirm the product exists.
Worked example
Check the 13-digit code 4006381333931. Step 1: payload = 400638133393, check digit = 1. Step 2: weights from the right are 3, 1, 3, 1...; the sum is 4×1 + 0×3 + 0×1 + 6×3 + 3×1 + 8×3 + 1×1 + 3×3 + 3×1 + 3×3 + 9×1 + 3×3 = 89. Step 3: 89 mod 10 = 9, and 10 − 9 = 1. The computed digit 1 equals the typed digit 1, so the code is valid; the prefix block shown is 400. Changing the last digit to 2 would flag it invalid.
Common mistakes
- Typing a digit wrong or swapping two neighbours; the check usually catches single mistakes but not every swap.
- Leaving out the leading zero of a UPC-A or EAN-13 code that a spreadsheet turned into a shorter number.
- Assuming a valid check digit means the barcode is registered to a real product or company; it only means the arithmetic is consistent.
- Reading the three-digit prefix as the country where the product was made; it indicates the GS1 office that issued the number.
- Entering a code that includes extra characters such as an add-on number or a price code after the main barcode.
Sources
About this calculator
GS1 barcode numbers — GTIN-8, UPC-A (GTIN-12), EAN-13 and GTIN-14 — end in a check digit computed with a weighted modulo-10 algorithm: starting from the rightmost digit, alternating positions are multiplied by 3 and 1, the products summed, and the check digit is whatever makes that sum a multiple of 10. The leading digits also encode a GS1 company prefix, a block assigned to the manufacturer by a national GS1 member organization, which is how a scanner can trace a product back to its brand owner.
This calculator takes a barcode number of 8, 12, 13 or 14 digits (the lengths GS1 defines a check digit for), recomputes its check digit to confirm it's valid, and shows the first three digits, the GS1 prefix block, separately (it does not look up the company or registrant behind the number). Retail and inventory staff verifying supplier data, e-commerce sellers listing products on marketplaces, and packaging designers laying out new barcodes use it to catch a mistyped digit or a malformed GTIN before it causes a scan failure at the register or a rejected marketplace listing.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
A UPC-A code and the same number written as a 13-digit EAN with a zero in front share one check digit, so both give the same Yes or No here. The prefix block shown is simply the first three digits as typed, so the two forms show different prefixes. If you are validating a supplier list, run a few codes in both forms. Which barcode type do you check most often?