Heart rate variability (HRV) provides essential health information such as the risks of heart attacks and mental disorders. However, inconvenience related to the accurate detection of HRV limits its potential applications. The ubiquitous use of smartphones makes them an excellent choice for regular and portable health monitoring. Following this trend, smartphone photoplethysmography (PPG) has recently garnered prominence; however, the lack of robustness has prevented both researchers and practitioners from embracing this technology. This study aimed to bridge the gap in the literature by developing a novel smartphone PPG quality index (SPQI) that can filter corrupted data. A total of 226 participants joined the study, and results from 1343 samples were used to validate the proposed sinusoidal function-based model. In both the correlation coefficient and Bland-Altman analyses, the agreement between HRV measurements generated by both the smartphone PPG and the reference electrocardiogram improved when data were filtered through the SPQI. Our results support not only the proposed approach but also the general value of using smartphone PPG in HRV analysis.new approaches to make health information more accessible than before. Among these approaches, smartphone photoplethysmography (PPG) has gained prominence [21,22]; it is an optical method that uses sensors to monitor the microvascular blood volume changes in body tissues [23]. As hemoglobin absorbs more light than the surrounding tissue, an increase (systole) or decrease (diastole) in the amount of blood can be assessed by employing the differences in the intensities of the lights and the converted waveforms. Smartphone PPG detects heartbeats by recording videos of fingertips using the in-built camera [24,25].The primary motivation for using smartphone PPG, compared to other wearable devices, is that it requires minimal equipment. Given that smartphones with in-built cameras have become a part of modern life, using them to access health information is an ideal alternative when ECGs or similar medical devices are not available [26]. In addition, there have been several reported techniques for increasing the accuracy of smartphone PPG, such as point-of-interest selection [27], bandpass filtering [28], adaptive signal thresholding [29], motion detection techniques [30][31][32], interpolation techniques [33], and signal decomposition methods [34][35][36]. Bioengineering studies indicate that the average HR [37] and HRV measured using smartphone PPG are comparable with those measured using gold standard ECGs [21,28,[38][39][40].Although it is a promising solution for practical data collection and has an accuracy that has been well proved in several experiments, using smartphone PPG to measure HRV has received limited research attention in applied disciplines such as medicine or psychology [41]; a possible explanation is the lack of robustness in practical scenarios. When smartphone users measure their heartbeats outside a laboratory environment, slight hand movements or ...