An electrocardiogram (ECG) is a continuous electrical signal from the heart that is recorded to understand the activity and condition of the heart. A recorded ECG signal always follows a defined pattern for a normal heart condition. Variation in the normal ECG pattern can be seen in cases of numerous cardiac abnormalities. A recorded ECG is also affected by a number of noises and distortions, resulting in a low SNR. A variation in ECG pattern can lead to incorrect study and improper diagnosis of heart condition. Thus, to perform an efficient analysis, it is necessary to preprocess the ECG waveform. ECG preprocessing requires noise removal and analysis of necessary features needed to study cardiac activity. In this paper, ECG preprocessing is evaluated by using two noise removal techniques, i.e., finite and infinite impulse response. After this, the R-peaks are detected using discrete wavelet transform (DWT), maximal optimal DWT, principal component analysis and independent component analysis. A wavelet transform technique is further proposed using Savitzky-Golay filtering and DWT. The results obtained from the proposed methodology represent the best results compared to those of other methods explicated in this paper.