Recent successes in treating neurological disorders with electrical stimulation of the brain have spurred interest in studying the neuronal mechanisms by which such therapies work. However, microelectrode recordings can be confounded by stimulation artifact. Also, large microelectrode arrays now allow recording amounts of data that would otherwise overwhelm current analytic methods that depend heavily on human intervention and interpretation. A set of algorithms is described for automatically removing stimulus artifacts that minimize signal loss with minimum human involvement. Other algorithms automatically differentiate between the extracellular action potentials of individual neurons.