Objective. Opioids can suppress gonadal hormone production, which may result in low testosterone levels. To date, there have been no large-scale population-based studies examining the extent to which opioid use may contribute to changes in testosterone levels. Design. Cross-sectional study. Setting. 2011-2012 National Health and Nutrition Examination Survey. Subjects. Participants 17 years and older who had data on prescription medication usage and serum testosterone levels available. Participants were divided in two groups, opioid exposed and unexposed. Methods. Testosterone levels of participants who responded that they had been exposed (n = 320) to prescription opioids in the past 30 days were compared with those who were unexposed (n = 4909). The number of participants with low testosterone levels was calculated and unadjusted and adjusted analyses were performed. Results. Participants on opioids had higher odds of having low testosterone levels than those unexposed, odd ratio (OR) = 1.40, 95% confidence interval (CI) (1.07-1.84). After controlling for opioid exposure, as the age and the number of comorbidities increased, the odds of having low testosterone levels significantly increased in all categories. Compared with participants between 17 and 45 years of age, participants >70 years had OR = 1.70, 95% CI (1.16-2.50). Compared with participants with no comorbidities, participants with >2 comorbidities had OR = 1.69 95% CI (1.24-2.30). Conclusion. When assessing the impact of opioids on testosterone, the effects of age and medical conditions should be considered.