Total Harmonic Distortion Calculator

Electronics

THD (%)6.24
Total RMS voltage (V)120.23
3rd harmonic share of fundamental (%)5.00
THD (dB)-24.09
How this was calculated
  1. Total harmonic distortion THD = sqrt(V2^2 + V3^2 + V4^2 + V5^2) / V1
  2. = sqrt(56.16) / 120.0 = 6.24 percent of the fundamental
  3. Total RMS including harmonics = 120.23 V against 120.0 V of fundamental
  4. In decibels the THD is -24.09 dB below the fundamental

Every real waveform is a fundamental wearing a crowd of harmonics, and total harmonic distortion is the crowd's share of the voice. Whether the waveform is a mains voltage dirtied by a floor of rectifier loads, an amplifier output, or a sensor signal, THD compresses the spectrum into one comparable number: the root-sum-square of the harmonic amplitudes divided by the fundamental. This calculator takes the fundamental and the 2nd through 5th harmonic amplitudes - the components that dominate almost every practical spectrum - and returns THD as a percent, the same figure in decibels, the true total RMS, and which harmonic is doing the most damage.

The worked examples cover the two worlds the number serves. Two are mains voltages: a 120 V fundamental with a 3rd-harmonic-heavy spectrum at 6.24 percent THD, and a cleaner 230 V case at 4.58 percent. The third is a small 5 V signal whose 0.5 V second harmonic drives THD to 11.40 percent - a reminder that distortion is a ratio, and a modest absolute harmonic on a small fundamental is a large distortion. If you have a spectrum analyser's harmonic readouts in front of you, this page is the arithmetic that turns them into the headline figure a standard or a datasheet will ask for.

Worked examples

120 V mains, THD 6.24

(120 V · 3.6 V · 6 V · 1.2 V · 2.4 V)

THD (%)6.24
Total RMS voltage (V)120.23
3rd harmonic share of fundamental (%)5.00
THD (dB)-24.09

230 V mains, THD 4.58

(230 V · 2.3 V · 9.2 V · 0 V · 4.6 V)

THD (%)4.58
Total RMS voltage (V)230.24
3rd harmonic share of fundamental (%)4.00
THD (dB)-26.78

5 V signal, THD 11.40

(5 V · 0.5 V · 0.25 V · 0.1 V · 0.05 V)

THD (%)11.40
Total RMS voltage (V)5.03
2nd harmonic share of fundamental (%)10.00
THD (dB)-18.86

Two definitions: THD-F and THD-R

Two denominators divide the THD world. THD-F, reported here, divides the harmonic root-sum-square by the fundamental amplitude - the historical definition, and the one audio and most datasheets use. THD-R divides by the total RMS including the harmonics, which caps the value at 100 percent and is preferred in some power-quality contexts. At low distortion the two are indistinguishable for practical purposes: the first example's 6.24 percent THD-F corresponds to about 6.22 percent THD-R. At high distortion they diverge - the third example's 11.40 percent THD-F is about 11.33 THD-R - and a waveform more harmonic than fundamental can post a THD-F above 100 percent, which is legal under that definition and a common source of confused emails.

Know which definition your standard speaks. IEEE 519's voltage limits are framed in THD of the voltage at the point of common coupling; audio specifications are THD (F-style) or THD+N, which adds noise to the numerator and is always the larger, less flattering figure. The calculator's inputs are amplitudes of individual harmonics, so noise is not included - if your analyser reports THD+N, expect it to sit above the number computed here, and do not mistake the gap for an error.

Adding harmonics in quadrature

Harmonics combine by power, not by amplitude: each contributes its square, the squares add, and the square root of the sum is the total harmonic amplitude. In the first example the harmonics 3.6, 6.0, 1.2 and 2.4 V square to 12.96, 36, 1.44 and 5.76; the sum is 56.16; the root is about 7.49 V; and 7.49 / 120 gives the 6.24 percent. The squaring is why the largest harmonic rules: the 6.0 V third harmonic contributes 36 of the 56.16 - nearly two-thirds of the distortion power - while the 1.2 V fourth is a rounding error beside it. Cleaning up a spectrum means hunting the biggest term, not polishing all of them.

The total RMS printed alongside makes the same point from the energy side: sqrt(120^2 + 56.16) = 120.23 V. Six percent distortion moves the true RMS by barely a fifth of a volt, which is why a true-RMS meter can read a badly distorted supply as perfectly healthy. RMS tells you the heating; THD tells you the shape. Equipment fails from both, and confusing the two measurements is how distorted supplies pass inspection.

  • THD = sqrt(V2^2 + V3^2 + V4^2 + V5^2) / V1, reported here as THD-F
  • In decibels: THD(dB) = 20 log10(THD ratio) - always negative for sane waveforms
  • The largest harmonic usually owns most of the distortion power
  • Total RMS = sqrt(V1^2 + sum of harmonic squares) - barely moves at moderate THD

Worked examples: mains and a small signal

Example 1: fundamental 120 V; harmonics 3.6, 6.0, 1.2, 2.4 V. THD 6.24 percent, -24.09 dB, total RMS 120.23 V, and the 3rd harmonic alone is 5.00 percent of the fundamental - the classic signature of single-phase rectifier loads on a three-phase system, where triplen harmonics add in the neutral instead of cancelling. Example 2: 230 V fundamental, harmonics 2.3, 9.2, 0 and 4.6 V. THD 4.58 percent, -26.78 dB; again the 3rd dominates at 4.00 percent, and the absent 4th harmonic is typical - even harmonics cancel in symmetric waveforms, so a large 2nd or 4th is itself a diagnostic of asymmetry or a failing half-cycle.

Example 3 changes the scale: fundamental 5 V, harmonics 0.5, 0.25, 0.1, 0.05 V. The 2nd harmonic leads at 10.00 percent of the fundamental, and THD is 11.40 percent (-18.86 dB) with total RMS of 5.03 V. In an audio or instrumentation chain this is gross distortion, audible and measurable, from absolute voltages a mains engineer would call negligible. The examples share one moral: THD is a ratio with no memory of scale, and it must always be read next to the fundamental it rode in on.

ExampleFundamentalHarmonics 2-5THD (%)THD (dB)Total RMS
1120 V3.6 / 6.0 / 1.2 / 2.46.24-24.09120.23
2230 V2.3 / 9.2 / 0 / 4.64.58-26.78230.24
35 V0.5 / 0.25 / 0.1 / 0.0511.40-18.865.03

THD in decibels

The decibel form is the same information on a logarithmic stage: 20 log10 of the ratio. The examples convert to -24.09, -26.78 and -18.86 dB. Audio engineers live in this form because their world spans six orders of magnitude: -20 dB is 10 percent, -40 dB is 1 percent, -60 dB is 0.1 percent, and a hi-fi specification of -90 dB is three thousandths of a percent. Power engineers live in percent because their action range is narrow - the difference between the examples' 4.58 and 6.24 percent is the difference between meeting and missing a limit - and percentages keep that range legible.

Whichever form you quote, quote the fundamental and the harmonic set with it. A THD computed from harmonics 2 to 5, as here, understates one computed to the 40th if the higher orders carry real energy - in most mains and audio spectra they do not, which is why the 2-to-5 window is the working standard for a hand calculation. If your analyser gives you a THD figure and the individual harmonics, this page is also the audit: recompute, and a mismatch means the analyser used a different window, a different definition, or THD+N.

A large 2nd harmonic is a symptom, not just a number: in a nominally symmetric system it signals half-wave asymmetry - a failing rectifier leg, a DC offset, or a saturating core.

What the biggest harmonic tells you

The calculator names the largest harmonic's share because spectra are fingerprints. A dominant 3rd on mains points to single-phase non-linear loads and warns of neutral overheating, since triplens sum in the neutral conductor. A dominant 5th and 7th pair is the six-pulse rectifier's signature. A dominant 2nd in audio suggests asymmetric clipping - one half of the waveform giving up before the other - while a dominant 3rd with a clean 2nd is symmetric clipping, the gentler, tube-like kind. Reading the fingerprint before reaching for a filter or a redesign saves the classic wasted effort of treating the wrong order.

Mitigation follows the diagnosis: passive filters tuned to the offending order, twelve-pulse or active front ends that cancel 5th and 7th by construction, K-rated transformers and oversized neutrals where triplens rule, and in audio, feedback and bias attention aimed at the stage the fingerprint identifies. In every case the arithmetic on this page is the before-and-after evidence - the same five amplitudes, recomputed, showing whether the fix actually shrank the term that owned the distortion.

If you are specifying rather than diagnosing, write the limit in the standard's own terms - the voltage class, the measurement point and the harmonic window - because a bare 'THD under 5 percent' invites a supplier to choose the definition, the window and the load condition that flatter their equipment. The five amplitudes on this page are the evidence; the specification should demand them, not just the headline.

FAQs

A 120 V fundamental with harmonics of 3.6, 6.0, 1.2 and 2.4 V - what is the THD?

THD is 6.24 percent (-24.09 dB) and total RMS rises only to 120.23 V.

What does the 230 V example give?

4.58 percent THD and -26.78 dB; the 3rd harmonic alone is 4.00 percent of the fundamental.

And the small-signal example?

A 5 V fundamental with a 0.5 V 2nd harmonic gives 11.40 percent THD - the 2nd alone contributes 10.00 percent.

Why root-sum-square?

Harmonic powers add, not amplitudes: the first example's harmonics root-sum-square to the value behind its 6.24 percent.

THD-F or THD-R - which is reported?

This calculator reports THD-F, against the fundamental; at 6.24 percent the two definitions barely differ, unlike the 11.40 percent case.

Which harmonic dominates?

Usually the 3rd in mains loads - 5.00 percent of fundamental in the first example against 4.00 in the second.

Sources

Related calculators

Simple Harmonic Motion Calculator
From amplitude and period to frequency, angular frequency, peak speed and peak acceleration of an oscillator.
Ripple Voltage Calculator
Peak-to-peak ripple voltage of a capacitor-filtered rectifier supply from load current, capacitance, mains frequency and rectifier type.
Inductor Energy Calculator
The energy stored in an inductor's magnetic field, E = 1/2 L I^2, in joules and millijoules.