The aim of this prospective randomized study was to evaluate the ability of the new Analgesia Nociception Index ANI, derived by heart rate variability, to detect painful stimulation during either propofol or sevoflurane anesthesia and changing remifentanil concentrations.