A heart rate detection method, comprising: emitting at a set frequency infrared light having a wavelength of 940 nm to a finger to be tested receiving the infrared light strength IR value after the infrared light has transmitted through the finger storing the IR value within a set time, and calculating the number of stored maximum IR values, the number of the maximum values being the heart rate P. The method detects heart rate in real time.