This paper describes an interactive computer program for decomposing EMG signals into their component motor-unit potential (MUP) trains and for averaging MUP waveforms. The program is able to handle single- or multi-channel signals recorded by needle or fine-wire electrodes during low and moderate levels of muscular contraction. It includes advanced algorithms for template matching, resolving superimpositions, and waveform averaging, as well as a convenient user interface for manually editing and verifying the results. The program also provides the ability to inspect the discharges of individual motor units more closely by subtracting out interfering activity from other MUP trains. Decomposition accuracy was assessed by cross-checking pairs of signals recorded by nearby electrodes during the same contraction. The results show that 100% accuracy can be achieved for MUPs with peak-to-peak amplitudes greater than 2.5 times the rms signal amplitude. Examples are presented to show how decomposition can be used to investigate motor-unit recruitment and discharge behavior, to study motor-unit architecture, and to detect action potential blocking in doubly innervated muscle fibers.