Signal Processing & DSP
Advanced

Total Harmonic Distortion

Ratio of harmonic energy to the fundamental.

Formula

THD=∑n≥2Vn2V1THD = \frac{\sqrt{\sum_{n\ge2} V_n^2}}{V_1}

Variables

THDDistortion ratio
V_1Fundamental amplitude
V_nn-th harmonic amplitude

Example

Hi-fi amps aim for THD well below 0.1%.

How it works

Total Harmonic Distortion (THD) compares the size of all harmonic components above the fundamental to the size of the fundamental itself. It uses a root-sum-square of the harmonic amplitudes because the harmonics are at different frequencies and their combined contribution to distortion is measured by total energy/power rather than simple addition. A larger THD means the waveform departs more from a pure sinusoid.

When to use it

Use THD when assessing how “clean” an AC waveform, audio signal, inverter output, or oscillator output is relative to its main tone. It is especially useful in signal quality measurements, amplifier specifications, power electronics, and spectral analysis.

Worked example, step by step

Suppose a waveform has fundamental amplitude V1 = 5.0 V, with harmonic amplitudes V2 = 0.30 V, V3 = 0.20 V, V4 = 0.10 V. Step 1: Square the harmonic amplitudes: V2^2 = 0.30^2 = 0.0900 V3^2 = 0.20^2 = 0.0400 V4^2 = 0.10^2 = 0.0100 Step 2: Sum them: Σ Vn^2 = 0.0900 + 0.0400 + 0.0100 = 0.1400 Step 3: Take the square root: √(Σ Vn^2) = √0.1400 ≈ 0.3742 V Step 4: Divide by the fundamental: THD = 0.3742 / 5.0 = 0.0748 Step 5: Convert to percent: THD ≈ 7.48% So the waveform has a total harmonic distortion of about 7.5%.

Common mistakes to avoid

  • Using the DC offset in place of the fundamental amplitude V1
  • Adding harmonic amplitudes directly instead of using the root-sum-square
  • Including the fundamental term V1 in the numerator sum

Did You Know?

A guitar amp's warm 'crunch' is deliberately high THD — distortion that musicians prize rather than avoid.

Share this formula

Reviewed & maintained by the FormulaWon editorial teamLast reviewed September 2026