The purpose of this study is to evaluate the effectiveness of heartbeat error and compensation methods on heart rate variability (HRV) with mobile and wearable sensor devices. The HRV analysis extracts multiple indices related to the heart and autonomic nervous system from beat-to-beat intervals. These HRV analysis indices are affected by the heartbeat interval mismatch, which is caused by sampling error from measurement hardware and inherent errors from the state of human body. Although the sampling rate reduction is a common method to reduce power consumption on wearable devices, it degrades the accuracy of the heartbeat interval. Furthermore, wearable devices often use photoplethysmography (PPG) instead of electrocardiogram (ECG) to measure heart rate. However, there are inherent errors between PPG and ECG, because the PPG is affected by blood pressure fluctuations, vascular stiffness, and body movements. This paper evaluates the impact of these errors on HRV analysis using dataset including both ECG and PPG from 28 subjects. The evaluation results showed that the error compensation method improved the accuracy of HRV analysis in time domain, frequency domain and non-linear analysis. Furthermore, the error compensation by the algorithm was found to be effective for both PPG and ECG.