A new method for eliminating EKG artifacts from EEGs was reported. Based on the simultaneously recorded EEGs and EKG, the procedure consisted of 4 steps: synchronized partition of the raw EEG record into segments with respect to the QRS complex of the EKG, averaging of the segments time-locked to EKG, repetition of the average artifact synchronized to EKG and subtraction of the estimate of the artifacts from the raw data. This method enabled the elimination of EKG artifacts from EEGs recorded by using the chin or the hand electrode as a reference. Features of the proposed method include: all signals are processed in digital instead of analogue form, the average EKG wave form is computed throughout the subtraction part of the recording instead of being computed only before the subtraction starts, in case of an on-line algorithm, the average EKG wave form is always updated to the point immediately preceding the real time of EKG subtraction, and by using the recursive form of exponential weighted averaging equation, the average EKG wave form can adapt appropriately to a change of the artifact wave form. By the high speed implementation of the procedure, the processed data of multi-channel EEGs can be obtained on-line with a delay of only 200 msec.