xBarcodexBarcode
GS1 & ISO Algorithmic Engine GS1 General Specifications & Luhn Mod 10

Barcode Check Digit Calculator & Batch Repair Tool

Calculate, verify, and auto-fix check digits for GS1 EAN-13, UPC-A, ISBN, and Luhn with step-by-step math.

Algorithm:

For EAN-13, enter the first 12 digits; the engine computes the 13th check digit.

Computed Check Digit
2
Full code: 6901234567892
Mathematical Derivation Steps
1. 从最右侧有效位向左,交替赋予权重 3 与 1:[1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3]
2. 各位数与对应权重相乘:6×1=6 + 9×3=27 + 0×1=0 + 1×3=3 + 2×1=2 + 3×3=9 + 4×1=4 + 5×3=15 + 6×1=6 + 7×3=21 + 8×1=8 + 9×3=27
3. 加权总和 Sum = 128
4. 取模 10 余数:128 mod 10 = 8
5. 补全至 10 的倍数:(10 - 8) mod 10 = 2
Live Vector Preview
Enter valid payload to preview
Compliance & Advantages

Why Choose xBarcode?

1

Transparent Mathematical Steps: Visualizes weighting, alternate summing, modulo, and complement calculations.

2

Multi-line Batch Auto-Fix: Paste up to 200 lines to instantly detect invalid check digits and repair them with 1 click.

3

Broad Standard Coverage: Supports GS1 Modulo 10, Bookland ISBN-13, Luhn Mod 10, and Code 39 Mod 43.

4

Seamless Vector Generation: Send corrected codes straight to the live renderer for pure CMYK black vector export.

Prepress & Materials

Retail Barcode Printing & Size Tolerances

Retail EAN-13 and UPC-A barcodes have strict specifications for Bar Width Adjustment (BWA) and magnification (80%–200%, nominal 37.29mm × 25.93mm). Maintain adequate Quiet Zones: at least 3.63mm on the left and 2.31mm on the right.

📌 Tip Strict Check Digit Integrity: Invalid check digits will cause immediate POS scan rejections.
📌 Tip Maintain Nominal Scale: 100% scale is strongly recommended for standard shelf consumer packaging.
📌 Tip High Contrast Printing: Use pure black (K:100%) on pure white backgrounds; never use red bars.
F.A.Q.

Frequently Asked Questions

Why does my barcode check digit calculation fail?

GS1 check digits are strictly derived from preceding digits via a weighted modulo-10 algorithm. If any preceding character changes, the final check digit must be recalculated.

Is the check digit calculation identical for EAN-13 and UPC-A?

Yes, both strictly use the GS1 Modulo 10 algorithm. A 12-digit UPC-A is equivalent to a 13-digit EAN prefixed with a leading zero.

Explore More Tools & 143 Barcode Formats

Switch between vCard, 2FA TOTP, Calendar, or browse the complete format catalog.