THD Test Online — Distortion Check

Check total harmonic distortion with a built-in synthetic self-test that verifies the FFT method first. Indicative, not calibrated. Free in your browser.

Tool controls

Protect your hearing. Start at a low volume. Never raise the volume to make a tone audible. Levels are shown in dBFS, relative to full scale — not SPL.

How it works

THD is computed in your browser with an FFT over a synthetic or captured buffer. Nothing is uploaded or recorded. Levels are reported in dBFS, relative to full scale.

On this page

    Total harmonic distortion compresses a whole distortion spectrum into one number: the RMS sum of the harmonic energy divided by the fundamental. A pure 440 Hz sine measured through a linear system reads 0% THD; every nonlinear stage in an amp, converter, or speaker adds energy at 880 Hz, 1320 Hz, and all later integer multiples. This page demonstrates that measurement honestly, with a synthetic self-test and clearly stated limits.

    How to use it

    1. Pick a test frequency. The tool offers 100 Hz, 440 Hz, and 1000 Hz. Low fundamentals stress the analyzer window; 440 Hz is the practical default because its harmonics land on clean FFT bins.
    2. Hear Signal A. Mode A plays a pure sine at your chosen drive level. This is your reference for what “no harmonics” sounds like.
    3. Hear Signal B. Mode B plays a synthesized tone carrying a deliberate 2nd harmonic at 4% of fundamental amplitude (-28 dB) and a 3rd at 2% (-34 dB). The combined figure is sqrt(0.04² + 0.02²) = 4.47% THD.
    4. Run the analysis. The readout lists each harmonic with its frequency, level in dBFS, and individual ratio, plus aggregate THD as a percentage, a ratio, and a dB value.
    5. Press the self-test. It synthesizes a 0.5-second buffer at 44.1 kHz with known harmonics (2nd at 3%, 3rd at 1.5%) and runs the identical FFT path, so you can confirm the math before trusting any number.

    The THD formula and its units

    THD referenced to the fundamental is defined as:

    THD_F = sqrt(V2² + V3² + V4² + …) / V1

    where Vn is the RMS amplitude of the nth harmonic and V1 the RMS fundamental. A second convention, THD_R, divides by the RMS sum of everything (fundamental included), and the two are related by THD_R = THD_F / sqrt(1 + THD_F²). At low distortion the two agree; a 10% THD_F signal reads 9.95% THD_R. Percentage and dB are the same number in different clothes: 20 × log10(ratio). So 10% is -20 dB, 1% is -40 dB, 0.1% is -60 dB, and 0.01% is -80 dB relative to the fundamental.

    The injected-harmonic self-test is a worked example of the formula. With 3% at H2 and 1.5% at H3, the expected answer is sqrt(0.03² + 0.015²) = 3.354%, which is -29.5 dB. The individual components sit at -30.5 dB (H2) and -36.5 dB (H3). If the readout lands on 3.354%, the analyzer path is verified.

    Standard waveforms make useful calibration targets for your ears. A pure square wave’s odd-harmonic series (1/n amplitudes) works out to sqrt(π²/8 - 1) = 48.3% THD_F. A sawtooth, with all harmonics at 1/n, is 80.3%. A triangle, with odd harmonics at 1/n², is only 12.1% despite sounding far “softer” than the square.

    Which harmonic matters: the distortion spectrum

    A single THD number cannot describe character, because harmonics are not equally audible. The table shows where the first five harmonics of a 440 Hz tone land and what they do musically.

    Order Frequency Interval above A4 Character
    H2 880 Hz +1 octave Consonant; doubles pitch cleanly. Dominant in single-ended tube stages, associated with “warmth.”
    H3 1320 Hz Octave + perfect 5th (+19.0 semitones) Dissonant against the fundamental; the signature of crossover distortion; reads as “harsh.”
    H4 1760 Hz +2 octaves Consonant, reinforces H2’s effect at low level.
    H5 2200 Hz 2 octaves + major 3rd (13.7 cents flat vs equal temperament) Audible as a bell-like ring when strong.
    H6 2640 Hz 2 octaves + 5th Usually negligible; part of clipping’s upper-series pile-up.

    Interpretation matters more than the total. Two amplifiers can both read 0.5% THD and sound completely different: crossover distortion spreads energy into high orders (10th to 20th) that escape auditory masking and become plainly audible, while gentle clipping keeps its energy in low, maskable orders. This is why measurement practice includes higher-harmonic distortion (HHD), which sums only the 10th and later harmonics, and why THD + N (notch out the fundamental and measure everything left, noise included) must always be quoted with its measurement bandwidth. THD + N over the same bandwidth is the reciprocal of SINAD. Electronics with negative feedback push measured THD into the hundredths of a percent; loudspeakers are the weak link, with even well-regarded drivers running around 1-3% across much of their band, which is why this page’s numbers are computed in the digital domain before the signal ever reaches a cone.

    Accuracy, limits and troubleshooting

    • No calibrated loopback means no hardware verdict. Everything shown is dBFS, relative to digital full scale, not sound pressure. The browser’s output chain (volume steps, sample-rate conversion, DAC, amplifier, driver) sits between the math and your ears, so measurements of your speakers are indicative at best. To measure real hardware you need a measurement microphone and a known-clean source.
    • Nyquist caps the harmonic count. At a 44.1 kHz sample rate nothing above 22,050 Hz exists, so a 440 Hz fundamental exposes at most its 50th harmonic; a 100 Hz fundamental could theoretically show 220 orders, though windowing and noise floor hide all but the first dozen or so.
    • FFT resolution is a function of window length. Bin spacing equals 1/duration, so a 0.5-second buffer resolves to 2 Hz. Analyzing a 100 Hz fundamental with harmonics close together needs a longer capture than 440 Hz, or the H2 and its neighbors smear.
    • If the self-test does not read 3.354%, something is wrong with the page’s JavaScript, not with your audio: the self-test never touches your output device.
    • Distortion you can hear but cannot see usually means the room or the driver (rub-and-buzz, loose parts), which a pure digital FFT of the generated buffer will never show.
    • Spectrum Analyzer — watch harmonic combs appear live above a played fundamental.
    • Oscilloscope — see the flattened peaks and tilted sides of a clipped waveform in the time domain.
    • IMD Test — the non-harmonic cousin of THD, measured with two-tone stimuli.
    • Tone Generator — feed the analyzer custom fundamentals from 20 Hz to 20 kHz.

    Frequently asked questions

    What is THD?

    Total harmonic distortion is the energy in integer multiples of a fundamental tone, relative to the fundamental. It is reported as a ratio, a percent, and in dB.

    What does the self-test prove?

    The self-test synthesizes a buffer with known 2nd and 3rd harmonics and runs the same FFT analysis used for measurement. It verifies the math, not your speakers.

    Can this measure my headphones?

    No. Without a calibrated microphone and loopback, browser results are indicative only. Use the harmonic table to learn how distortion spectra read.

    Why is the result bandwidth-limited?

    Only harmonics below half the sample rate can be observed, and the FFT window sets frequency resolution. Higher harmonics fold into the noise floor.