Moderate and late preterm infants are a growing subgroup of neonates with increased care needs after birth, yet standard protocols are lacking. We aim to describe variation in length of stay (LOS) by gestational age (GA) across hospitals within the same level of neonatal care and between different levels of neonatal care. Retrospective cohort study of hospitalizations for moderate (32-33 weeks GA) and late (34-36 weeks GA) preterm infants in 2019 Kid's Inpatient Database. We compared adjusted LOS in this cohort and evaluated variation within hospitals of the same level and across different levels of neonatal care. This study includes 217 051 moderate (26.2%) and late (73.8%) preterm infants from level II (19.7%), III (66.3%), and IV (11.1%) hospitals. Patient-level (race and ethnicity, primary payor, delivery type, multiple gestation, birth weight) and hospital-level (birth region, level of neonatal care) factors were significantly associated with LOS. Adjusted mean LOS varied for hospitals within the same level of neonatal care with level II hospitals showing the greatest variability among 34- to 36- week GA infants when compared with level III and IV hospitals (P < .01). LOS also varied significantly between levels of neonatal care with the greatest variation (0.9 days) seen in 32-week GA between level III and level IV hospitals. For moderate and late preterm infants, the level of neonatal care was associated with variation in LOS after adjusting for clinical severity. Hospitals providing level II neonatal care showed the greatest variation and may provide an opportunity to standardize care.