Short tandem repeats (STRs) and variable number of tandem repeats (VNTRs) that have been identified at approximately 0.7 and 0.5 million loci in the human genome, respectively, are highly multi-allelic variations rather than single-nucleotide polymorphisms. The number of repeats of more than a few thousand STRs was associated with the expression of nearby genes, indicating that STRs are influential genetic variations in human traits. Analgesics act on the central nervous system via their intrinsic receptors to produce analgesic effects. In the present study, we focused on STRs and VNTRs in the , , , and genes and analyzed two peripheral pain sensation-related traits and seven analgesia-related traits in postoperative pain management. A total of 192 volunteers who underwent the peripheral pain sensation tests and 139 and 252 patients who underwent open abdominal and orthognathic cosmetic surgeries, respectively, were included in the study. None of the four STRs or VNTRs were associated with peripheral pain sensation. Short tandem repeats in the , , and genes were associated with the frequency of fentanyl use, fentanyl dose, and visual analog scale pain scores 3 h after orthognathic cosmetic surgery (Spearman's rank correlation coefficient = 0.199, = 0.002, = 0.174, = 0.006, and = 0.135, = 0.033, respectively), analgesic dose, including epidural analgesics after open abdominal surgery ( = -0.200, = 0.018), and visual analog scale pain scores 24 h after orthognathic cosmetic surgery ( = 0.143, = 0.023), respectively. The associations between STRs in the gene and the frequency of fentanyl use and fentanyl dose after orthognathic cosmetic surgery were confirmed by Holm's multiple-testing correction. These findings indicate that STRs in the gene influence analgesia in the orofacial region.