Long-term variability (LTV) of heart rate was calculated continuously by a microprocessor in 25 preterm infants undergoing indomethacin treatment for closure of patent ductus arteriosus (PDA), in 24 preterm infants without signs of PDA, and in 10 neonates treated with prostaglandin E1 for cyanotic heart malformation. In infants with patent ductus arteriosus, LTV was lower than in controls. Following indomethacin, LTV increased most markedly (from 1.5 to 3.2; p < 0.01) in infants with improved ventilation. The increase was less marked (from 1.8 to 2.5; p < 0.05) in infants whose degree of respiratory failure did not change. LTV remained largely unchanged in infants who deteriorated. In 9 out of the 10 neonates treated with prostaglandin E1, LTV increased. We conclude that LTV corresponds to brain stem oxygenation and may be a useful tool to monitor treatment of PDA.