Major American standards use the following code: DD-PP-SS-XA/B-(LH)
DD is the major diameter of the thread. Thus 3/8-inch thread will have a 3/8 standing at the left most of the thread specification. The dimensions usually come at margins of an inch (1/2, ¼, 1/8 ,1/16 etc). It must be noted that threads with a diameter smaller than ¼ have been given special numbers, from 0 to 10.
PP stands for number of threads per inch. Thus, -20 means that there are 20 threads in each inch along the thread.
SS is the thread standard. Mostly, it is defined by the diameter and number of coils, but sometimes there are several standards (such as UNC and UNJC) that use the same numbers. Thus, this should not be omitted – also helping to prevent errors. If you will write ¼-30 –UNF beside your thread, anyone looking at this will note that something is wrong, as Unified National Fine standards defines 28 threads per inch.
X is the level of closing between the male and female thread, called class. 1 is the most loose thread, meaning there is less contact between threads and more clearance. 2 is the most common class and 3 is the most precise fit, used in accurate applications.
A or B is used to specify whether it is an external or internal thread. External thread is designated A and internal – B.
LH is used to specify the unusual left hand – used sometimes for locking against rotational force or other special applications.

click to enlarge