# Code 128 Barcode Check Digit Calculator

## Code 128 Barcode Introduction

### What is Code 128 barcode?

Code 128 barcode is a high-density linear barcode symbology, which encodes digits, text, control characters, and full ASCII 128 characters. You can view the detailed information about Code 128 at What is Code 128 barcode?

## Code 128 Barcode Check Digit Character

Code 128 barcode contains a mandatory check digit (checksum) character, which is based on module 103 (mod 103).

The Code 128 check digit will not be displayed in the human readable interpretation (barcode text), and it will not be returned by the barcode decoder also.

### Code 128 barcode check digit calculator

The Code 128 barcode check digit (checksum) character shall be calculated according to the following algorithm.

1. Retrieve each data character value from character data table above
2. Each symbol character position is given a weighting. The Start character position is weighted 1. Then, beginning on the left with the first symbol character following the Start character, the weights are 1, 2 ,3, 4, ... , n, for all following symbol character positions up to, but not including, that of the symbol check character itself; n denotes the number of symbol characters representing data or special information in the symbol, exclusive of the Start/Stop characters and symbol check character.
3. Multiply each symbol character value by its weighting.
4. Sum the products of the calculation in the previous step
5. Divide this sum by 103.
6. The remainder derived from the calculation in the previous step is the symbol character value of the symbol check character.

For example, calculate the check character for Code 128 data "AIM1234"

 Characters Start Code B A I M Code C 12 34 Char Values 104 33 41 45 99 12 34 Weights 1 1 2 3 4 5 6 Products 104 33 82 135 396 60 204 Sum of Products 1014 Divide by 103 (mod 103) 1014 / 103 = 9 Remainder 87 (check digit character value)