Total harmonic distortion (THD) is a measure of the quality of the electrical output of a generator. It measures how much the electrical waveform deviates from a perfect sine wave. A low THD indicates a cleaner and more stable electrical output, which is important for sensitive electronics and appliances.