Advertisement

Total harmonic distortion calculator

Total harmonic distortion, or THD, compares the energy in a signal harmonics with the energy in its fundamental. Audio engineers often quote it as a percentage, while test equipment often shows the fundamental-to-harmonics ratio in decibels. This page converts between the two, so a specification in one form can be compared with a measurement in the other.

Calculator

Enter 1 for one percent. Switch the unit to ratio to type 0.01 directly.

Distortion factor
0.0100%
Distortion as a ratio
0.000100
Distortion attenuation
80.000

Advertisement

How this calculator works

A distorted sine wave contains the original frequency and weaker copies at whole-number multiples of it, called harmonics. THD is the root-sum-square of the harmonic amplitudes divided by the fundamental amplitude. As a fraction it is usually well below 1, so engineers quote a percentage. In decibels the same ratio is 20 times the base-10 logarithm of the fraction, which is negative because the harmonics are weaker than the fundamental. Test gear usually quotes the magnitude as a positive attenuation, so 1 percent THD is the same as 40 dB of attenuation.

Formula

THD (fraction) = sqrt(V2^2 + V3^2 + ... + Vn^2) / V1, where V1 is the fundamental amplitude and V2 to Vn are the harmonic amplitudes. THD (percent) = 100 x THD (fraction). THD (dB) = 20 x log10(THD fraction), a negative number. Distortion attenuation (dB) = -THD (dB) = 20 x log10(1 / THD fraction). THD (fraction) = 10^(-attenuation / 20).

Worked example

A signal with 1 percent THD has a fraction of 0.01. In decibels that is 20 x log10(0.01) = -40 dB, so the distortion attenuation is 40 dB. A cleaner 0.1 percent gives -60 dB, and a poor 10 percent gives -20 dB. Working the other way, an attenuation of 46.02 dB gives THD = 10^(-46.02 / 20) = 0.005, which is 0.5 percent.

Advertisement

Frequently asked questions

What is the difference between THD and THD+N?

THD counts only the harmonic multiples of the fundamental. THD plus noise also counts broadband noise, hum and any other content left after the fundamental is removed. THD+N is always at least as large, and the two figures are not interchangeable even though both are quoted in percent or decibels.

Is a negative THD in decibels a problem?

No. The negative sign simply means the harmonics are weaker than the fundamental, which is the normal case. Data sheets often drop the sign and call the magnitude the distortion attenuation or the fundamental-to-harmonics ratio. This page reports the attenuation as a positive number and the ratio separately.

What is a good THD figure?

It depends on the application. Hi-fi amplifiers are often specified below 0.1 percent at rated power, while guitar amplifiers may run several percent on purpose. Power systems have their own limits: IEEE 519 recommends voltage THD below 5 percent at the point of common coupling, with tighter limits on individual harmonics. A single number is not a quality verdict without the measurement conditions.

Why does THD change with frequency and level?

Nonlinearity is not constant across the audio band, and many devices distort more near their power or voltage limits. A THD figure measured at 1 kHz and 1 W says little about behaviour at 20 kHz or at full output. Compare figures only when the test conditions match.

Can THD be above 100 percent?

Mathematically the root-sum-square of the harmonics can exceed the fundamental, so a ratio above 1 is possible for a heavily distorted signal. Most specifications and standards treat that as a fault rather than a useful number. This page caps the percentage input at 100 percent and asks for a positive attenuation.

Sources

Advertisement