A heartbeat detection device (1) is provided with: a sensor data acquisition unit (10) for acquiring sensor data indicating an electrocardiographic waveform of a living body and outputting a sampling data string D(i) based on the sensor data; a first calculation unit (110) for calculating, for each sampling time, a time difference value DY(i) of the sampling data D(i) from the outputted sampling data string D(i); a determination unit (114) for determining a heartbeat time on the basis of a time at which the change in the calculated time difference value DY(i) has exceeded a set threshold value TH; a correction unit (12) for correcting the heartbeat time by taking as a reference time a time at which the time difference value reaches zero on a straight line that passes through two points representing the time difference value DY(n) of sampling data D(n) at the heartbeat time determined by the determination unit (114) and the time difference value DY(n-1) of sampling data D(n-1) immediately prior thereto; and a heart rate calculation unit (13) for calculating the heart rate of the living body from the corrected heartbeat time.
展开▼