The present disclosure is directed to the classification of cardiac episodes using an algorithm. In various examples, an episode classification algorithm evaluates electrogram signal data collected by an implantable medical device. The episode classification algorithm may classify may include a sinus template and a comparison of the electrogram signal to the sinus template. Possible classifications of the cardiac episode may include, for example, unknown, inappropriate, appropriate, supraventricular tachycardia, ventricular tachycardia, ventricular fibrillation or ventricular over-sensing.