For historical reasons, nails are sold both by a number followed by d and (less confusingly) by length. The “d” stands for penny, so 8d refers to an 8-penny nail, 16d to a 16-penny nail and so on.