This calculator will compute the length of a Code 39 bar code given the total number of data characters, X dimension and wide-to-narrow ratio.

L = (C + 2)(3N + 6)X + (C + 1)I

where

**C**= total number of data characters (no checksum)**X**= X-dimension (width of the smallest element in mils.)**N**= wide-to-narrow multiple (e.g. 3 for a code with 3 : 1 ratio)**I**= inter-character gap width in mils**L**= length of symbol (not including quiet zone, output in mils)

For simplicity, this calculator assumes that the inter-character gap equals the X-dimension, which is correct for many printers such as laser printers. Note that a quiet zone is required on each end of the code that is equal in length to 10 times the X-dimension.