According to one embodiment, an electrocardiographic (ECG) waveform timing detector includes an ECG waveform receiving circuit, a threshold value determining circuit, and a comparator. The threshold value determining circuit includes a heart rate calculating circuit, a threshold value setting circuit, and a comparing/determining circuit. The heart rate calculating circuit calculates the heart rate based on ECG waveform received by the ECG waveform receiving circuit. The threshold value setting circuit sets a threshold value. The comparing/determining circuit compares the heart rate with the number of R wave detection triggers detected using the threshold value to determine a threshold value for R wave detection trigger. The comparator compares the ECG waveform output from the ECG waveform receiving circuit with the threshold value for R wave detection trigger to output an R wave detection trigger.