To determine the variation of outpatient opioid prescribing across the US in postoperative pediatric cardiac patients. Retrospective, cross-sectional study using a concatenated database of Medicaid claims between from 2016 through 2018 of children 0-17years, discharged after cardiac surgery and receiving an opioid prescription within 30days. Filled prescriptions were identified and converted to morphine milligram equivalents (MME). Use, duration, and dose were analyzed by sex, race, ethnicity, residence urbanicity, and region. Among 17 186 Medicaid-enrolled children after cardiac surgery, 2129 received opioids within 30days of discharge. Females received lower doses than males (coefficient -0.17, P=.022). Hispanic individuals were less likely to receive opioids (coefficient 0.53, P<.05, 95% CI: 0.38-0.71) and for shorter periods (coefficient 0.83, P<.001). Midwest (MW) (OR 0.61, 95% P-values < 0.05, 95% CI: 0.46-0.80) and Northeast (NE) (OR 0.43, 95% P-values < 0.05, 95% CI: 0.30-0.61) regions were less likely to receive opioids but used higher doses compared with the Southeast (SE) (MW coefficient 0.41, Southwest (SW) coefficient 0.18, NE coefficient 0.32, West (W) coefficient 0.19, P<.05). There were significant variations in opioid prescribing after cardiac surgery by race, ethnicity, sex, and region. National guidelines for outpatient use of opioids in children after cardiac surgery may help limit practice variation and reduce potential harms in outpatient opioid usage.