A method for automatically detecting P-waves in a continuous electrocardiograph signal stream irrespective of the presence of P-R disassociation wherein the lower energy P-wave can meld into the higher energy R-wave. In accordance with the invention, the ECG signal stream is digitized and fed to a computer programmed to perform signal processing operations thereon. First, a basic QRS morphologic prototype is developed through coherent-averaging of a plurality of QRS complexes appearing in the signal stream. Once the prototype is established, it is aligned with the incoming ECG signal stream where a recognizable similarity exists. The prototype is multiplied by a function comprising a "window" to smooth it to zero at its right and left edges while preserving essential center shape. The resulting windowed prototype is then scaled to match in amplitude or energy content the ECG signal stream at the points of alignment. The thus-modified prototype is then subtracted from the signal stream at those points, forming a residue waveform comprising P-waves, residual R-wave energy and ectopic beats. The residue signal may then be smoothed before comparing it to a predetermined linear threshold. The energy amplitudes in the residue signal exceeding the threshold are identified as P-waves.