Guides · Free tool
Check Digit Calculator for UPC, EAN & GTIN
Calculate the check digit for UPC-A, EAN-13 and EAN-8, or check whether a barcode is valid. Free, no sign-up, runs right in your browser.
Digits only. Spaces and special characters are ignored.
All calculations run locally in your browser. Nothing you enter here is sent or stored.
How is the check digit calculated?
The check digit is the last digit of a UPC or EAN code. It’s calculated from the preceding digits and helps catch typos and scanning errors immediately. The calculation follows a fixed scheme (modulo 10 with alternating weights):
- Working from right to left, the digits are multiplied alternately by 3 and 1 (the rightmost data digit by 3).
- All the results are added up.
- The check digit is the number that brings this sum up to the next multiple of 10. Formula: (10 − (sum mod 10)) mod 10.
Example for the UPC-A 03600029145_: the weighted sum of the eleven data digits is 58. The next multiple of 10 is 60, so the check digit is 2, and the complete code is 036000291452. The calculator above does exactly this math for you.
What do you need the check digit for?
Whenever you create your own barcodes or enter numbers manually. If you print labels yourself or assign GTINs, you have to calculate the check digit correctly; otherwise the code is invalid and scanners will reject it. When you capture existing codes, validation helps you find typos. Our GTIN guide explains exactly what UPC, EAN and GTIN mean, and the barcode types comparison gives an overview of all formats.
If you don’t want to check individual codes but capture lots of barcodes at once, Scan2List: Inventory Scanner does that for you: you photograph a shelf, the app reads all the codes at the same time and exports them as a CSV.