This manuscript presents a methodological proposal for computing heart rate variability (HRV), specifically designed for analysing physiological signals in surgical patients.The method involves ECG signal processing, tachogram computation, and HRV feature analysis.Results show strong correlation (0.99) and low mean absolute error (0.0069 mV) between pre-processed ECG signals and reference.Artifacts notably affect certain HRV features, but the proposed method achieves high precision, recall, and AUROC curve (0.96) in distinguishing normal from artifact-laden tachograms.Overall, the proposed methodology offers a comprehensive and efficient processing approach for obtaining highquality tachograms from ECG signals.