The electrocardiogram (ECG) is a well known method that can be used to measure Heart Rate Variability (HRV). This paper describes a procedure for processing electrocardiogram signals (ECG) to detect Heart Rate Variability (HRV). In recent years, there have been wide-ranging studies on Heart rate variability in ECG signals and analysis of Respiratory Sinus Arrhythmia (RSA). Normally the Heart rate variability is studied based on cycle length variability, heart period variability, RR variability and RR interval tachogram. The HRV provides information about the sympathetic-parasympathetic autonomic stability and consequently about the risk of unpredicted cardiac death. The heart beats in ECG signal are detected by detecting R-Peaks in ECG signals and used to determine useful information about the various cardiac abnormalities. The temporal locations of the R-wave are identified as the locations of the QRS complexes. In the presence of poor signal-to-noise ratios or pathological signals and wrong placement of ECG electrodes, the QRS complex may be missed or falsely detected and may lead to poor results in calculating heart beat in turn inter-beat intervals. We have studied the effects of number of common elements of QRS detection methods using MIT/BIH arrhythmia database and devised a simple and effective method. In this method, first the ECG signal is preprocessed using band-pass filter; later the Hilbert Transform is applied on filtered ECG signal to enhance the presence of QRS complexes, to detect R-Peaks by setting a threshold and finally the RR-intervals are calculated to determine Heart Rate. We have implemented our method using MATLAB on ECG signal which is obtained from MIT/BIH arrhythmia database. Our MATLAB implementation results in the detection of QRS complexes in ECG signal, locate the R-Peaks, computes Heart Rate (HR) by calculating RR-internal and plotting of HR signal to show the information about HRV.