When humans deal with stress, they produce stress hormones which create physiological responses related to the autonomic nervous system (ANS). One of the physiological responses to stress in the body is a variation in the heart rate or heart rate variability (HRV), which are some features obtained from the R-R interval derived from Electrocardiograph (ECG) signals. HRV features can be obtained using time domain analysis and frequency domain analysis. In this study, we present our work on the development of a stress detection system based on heart rate by calculating and comparing HRV features from time and frequency domain analysis and classifying these features with the k-Nearest Neighbors (kNN) algorithm. The system is implemented on both Android device and PC, and then compared if there is any difference on the accuracy. From the experiment results, it is known that the combination of HRV features from time and frequency domain analysis are the best features to represent stress with accuracy of 79.17% using the kNN algorithm.