Saved

Press the star next to a tool's name to save it.

All my tools

Total Harmonic Distortion Calculator

Use this total harmonic distortion calculator to find THD in percent and decibels from the rms amplitude of the fundamental and its harmonics, in volts or dBc.

Restored your last values ·

Enter the rms amplitude of the fundamental and then the rms amplitudes of the 2nd, 3rd and higher harmonics, in the same unit, such as volts. You get the total harmonic distortion as a percentage and in decibels. You can also give the harmonics in dBc.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Enter the fundamental and the harmonics, then press Calculate.

A total harmonic distortion calculator turns the harmonic levels of a signal into one number that tells you how far the waveform is from a pure tone. Enter the amplitude of the fundamental and of the 2nd, 3rd and higher harmonics, and you get the total harmonic distortion as a percentage, in the two usual forms, and in decibels. It is used for audio amplifiers, power supplies and signal generators. It runs in your browser.

How to use the total harmonic distortion calculator

  1. Choose amplitudes or dBc for the harmonics.
  2. Enter the fundamental amplitude.
  3. Enter the harmonics from the 2nd upwards, separated by spaces or commas.
  4. Press Calculate.

What THD is

The Wikipedia article on total harmonic distortion defines it as the ratio of the rms amplitude of the higher harmonics to the rms amplitude of the fundamental. Put another way, it is the ratio of the power in the harmonics to the power of the fundamental.[1] The first form, THD_F, is √(V₂² + V₃² + V₄² + …) ÷ V₁, where V₁ is the rms value of the fundamental and Vₙ is that of the nth harmonic. The page says that it is the one that is commonly used in audio specifications.[1] The second form, THD_R, has the same numerator but divides by the total rms value, √(V₁² + V₂² + V₃² + …).[1] The calculator gives both.

THD_F against THD_R

By algebra, THD_R = THD_F ÷ √(1 + THD_F²), which is our own derivation from the two definitions. For a small distortion, they are almost the same: a THD_F of 10 percent gives a THD_R of 9.95 percent, as the page's examples show. At large distortion they diverge, and THD_R can never exceed 100 percent. A THD_F of 266 percent gives a THD_R of 94 percent.[1] State which form you use when you quote a figure.

Worked examples

With a fundamental of 1 volt and a single harmonic of 0.1 volt, THD_F is 10 percent, THD_R is 9.95 percent, and in decibels the distortion is −20 dB. The article gives values for ideal waveforms. A pure square wave has a THD_F of about 48.3 percent and a THD_R of 43.5 percent, a sawtooth wave has a THD_F of about 80.3 percent, and a symmetrical triangle wave about 12.1 percent.[1] You can check the square wave by entering the odd harmonics, 1/3, 1/5, 1/7 and so on, with zeros for the even ones. The more harmonics you add, the nearer the result comes to 48.3 percent.

Decibels and dBc

The page says that THD is usually expressed as a percentage, or in decibels relative to the fundamental.[1] It does not write out the decibel formula, so we use the standard one for amplitudes: dB = 20 × log₁₀ of the ratio. A THD_F of 1 percent is −40 dB, and 0.1 percent is −60 dB. If your harmonics are given in dBc, meaning decibels relative to the carrier or fundamental, choose that mode: each level is turned into an amplitude with 10^(dBc ÷ 20) times the fundamental. For example, harmonics at −20 and −40 dBc together give a THD_F of 10.05 percent.

THD plus noise

The article also describes THD+N, in which the noise is added to the harmonics in the numerator. It is measured by feeding in a sine wave, removing the fundamental with a notch filter and measuring what is left. It is the reciprocal of SINAD over the same bandwidth, and it is commonly quoted in the THD_R form.[1] This calculator does not include noise, so its result is the THD alone.

Measuring properly

The page notes that a meaningful result must state the bandwidth over which it was measured. Reports should also give the test frequency range, the level and the gain conditions. It adds that distortion above a fundamental of 10 kHz is inaudible, since the harmonics are above the range of hearing.[1] A sound card with software can be used to find the harmonics by Fourier analysis, and you can type the levels in here.

Filtering a waveform

Filters change the distortion. The page gives some examples of the effect: a square wave through a second-order Butterworth low-pass filter with its cutoff at the fundamental has a THD_F of 5.3 percent, and through a fourth-order filter 0.6 percent. A sawtooth wave through a first-order filter has 37.0 percent, and through a second-order filter 18.1 percent.[1] These show how a filter takes out the higher harmonics, which carry most of the distortion.

Where distortion comes from

An ideal amplifier would reproduce a sine wave exactly. A real one bends the waveform slightly, for example when the output nears the supply rails, and the bending adds harmonics at whole multiples of the input frequency. A lower figure means a cleaner output. For this reason, designers look at which harmonics dominate, since an even harmonic and an odd one point to different causes.

Common mistakes

  • Using peak values for some harmonics and rms for others. Use rms for all of them.
  • Including the fundamental in the list. The list starts with the 2nd harmonic.
  • Quoting a percentage without the form. THD_F and THD_R differ at high distortion.
  • Forgetting the bandwidth. A result needs to say which harmonics were included.

What next

Use this often? Add Total Harmon to your Home screen.

Frequently asked questions

What is a total harmonic distortion calculator?

A tool that finds the THD of a signal from the amplitudes of its fundamental and harmonics, as a percentage and in decibels.

What is the THD formula?

THD = √(V₂² + V₃² + …) ÷ V₁, with rms amplitudes and V₁ the fundamental.

What is the difference between THD_F and THD_R?

THD_F divides by the fundamental and THD_R by the total rms value. THD_R can't exceed 100 percent.

What is the THD of a square wave?

About 48.3 percent against the fundamental, and 43.5 percent against the total.

What does THD+N mean?

Total harmonic distortion plus noise. It adds the noise to the harmonics, and the calculator here covers the harmonics only.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Physics & Science Tools