Skip to main content
Check Digit Calculator
Diagnostic

Custom Weight Sequence Builder

Explore repeating positional weight sequences for checksums. Review weight placement and how a sequence affects error detection.

Last updated:

Diagnostic, Analysis & Utilities

Configure repeating positional weights.

Length: 10 chars
Calculated Check Character / Checksum
--Ready
Complete Validated Sequence:
--
Arithmetic Steps & Mathematical Specification

Initialising algorithm engine for Custom Weight Sequence Builder...

How Custom Weight Sequence Builder Works?

The Custom Weight Sequence Builder works by letting the user enter a repeating list of weights, previewing which weight lands on each position, and testing the sequence's error detection.

  1. 1Type the weight cycle (for example 7, 3, 1).
  2. 2Choose whether the cycle starts at the left or right end.
  3. 3Preview the weight for every position of a sample payload.
  4. 4Choose the modulus.
  5. 5Run substitution and transposition tests on the sequence.

Custom Weight Sequence Builder Formula

The weight assignment formula is wᵢ = W[(i − 1) mod k], where W is the cycle of length k.

wᵢ = W[(i − 1) mod k]
Good cycle for modulus m: gcd(w, m) = 1 for every w, and wᵢ ≠ wᵢ₊₁ (mod m)
  • k is the cycle length.
  • gcd is the greatest common divisor.
Worked example: cycle 7, 3, 1 over 1234567890
Positions:  1 2 3 4 5 6 7 8 9 10
Weights:    7 3 1 7 3 1 7 3 1 7
Weighted sum = 147
Mod 10 check = 3

Custom Weight Sequence Builder Conversion Table

The weight builder table tests 6 cycles with modulus 10 on the same test strings.

Weight cycleUsed bySingle errors caughtAdjacent swaps caught
3, 1GS1 keys100.0%88.9%
1, 3EAN-13 from the left100.0%88.9%
7, 3, 1MRZ, Finnish reference100.0%88.9%
3, 7, 1ABA routing100.0%88.9%
2, 4Poor example: even weights88.9%88.9%
1, 2, 3, 4, 5, 6, 7, 8, 9Linear weights91.1%100.0%

What is Custom Weight Sequence Builder?

A Custom Weight Sequence Builder is a tool that designs and tests the positional weights of a check digit scheme. Weights decide which errors the check digit catches.

With modulus 10, every weight must be odd and not 5, so that each substitution changes the sum. Two odd weights always differ by an even amount, so a modulus 10 scheme always misses swaps of digits that differ by 5; a prime modulus such as 11 removes that limit.

What are the uses of Custom Weight Sequence Builder?

There are 3 main uses of the Custom Weight Sequence Builder, including scheme design, legacy reverse engineering, and documentation.

  • Scheme design: Engineers test weight cycles before publishing a format.
  • Legacy reverse engineering: Analysts find the weights an old system used.
  • Documentation: Teams record the exact weight mapping for each position.