Background: Studies suggest that the pain response may be evaluated using pupillometry and is influenced by factors such as gender and anxiety. Objectives: The aim of this study was to use pupillometry to observe the effects of gender and anxiety on the pain response. Study Design: A randomized, prospective, clinical and interventional study. Setting: Center for Research on Pain at the Federal University of Maranhão, Brazil. Methods: Ninety-six patients were divided into groups according to their level of anxiety as indicated by the Beck questionnaire. Under photopic conditions and using retinography, these patients underwent pupillometry while a painful pressure stimulus of 1,500 kPa was applied to the middle phalanx of each patient’s right middle finger using a pressure algometer. Results: The pupil diameter increased in response to pain in all study participants, regardless of gender and anxiety level; the average pupil diameter was 3.265 ± 0.028 mm before the painful stimulus and 4.31 ± 0.200 mm for the duration of the stimulus (P = 0.0251). There was no significant difference between the genders in the level of anxiety (P = 0.614). Regardless of gender, individuals with moderate to severe anxiety had higher average pupil diameters than individuals exhibiting mild or no anxiety (P = 0.019). Men had a higher average pupil diameter than women (4.53 ± 0.345 mm and 4.48 ± 0.358 mm, respectively); however, this difference was not statistically significant in the presence of moderate to severe anxiety (P = 0.072). Limitations: The number of men with high anxiety was insufficient to create their own group. Conclusions: The pupil dilation in response to a painful stimulus was similar in both genders. Additionally, regardless of gender, the average pupil diameter was greater in the presence of moderate to severe anxiety. Key words: Pupillometry, pain, gender, anxiety