This paper applies fuzzy inference mechanism to assist in analyzing the heart rate variability (HRV) and proposes a double-mean window approach to detect R wave of electrocardiogram (ECG). The proposed approach is composed of a Pan & Tompkins_QRS detection mechanism, a double-mean window mechanism, a sorting mechanism, an interval parameter adjustment, and an RR interval fuzzy inference mechanism, which can correctly detect the position of R wave of ECG and then proceed with the HRV. The experimental results show that the proposed approach can work effectively for detecting R wave of ECG and filtering the abnormal RR interval for normal people.