FFT Window Functions Demo

How to use this demo

  • Pick a window, set length N, and (for Kaiser) the β parameter.
  • Compare the time taper and the zero-padded magnitude spectrum (dB).
  • Read coherent gain, ENBW, approximate scalloping loss, and peak sidelobe — then open the theory posts linked below.
FFT Window Functions Demo
—
Spectrum uses 16× zero-padding for a smooth lobe display.
Coherent gain (mean of w) —
ENBW (FFT bins) —
ENBW noise correction —
Scalloping loss (approx.) —
Peak sidelobe (approx.) —

Time-domain window w[n]

|W(f)| in dB (zero-padded FFT, peak normalized to 0 dB)

FAQ

What should I look at first on the plot? Main-lobe width versus first sidelobe height — that trade-off is the window design problem. Then check ENBW if you care about noise-floor bias.

Why does a rectangular window look so bad? Narrow main lobe (good resolution) but high sidelobes (bad leakage). Almost every classic window softens that leakage at the cost of a wider main lobe.

Where are the FoM tables? See window figures of merit and ENBW.

What this tool shows

An FFT implicitly treats a finite record as one period of a periodic signal. Window functions taper the edges of that record so the periodic extension has smaller discontinuities — which lowers spectral sidelobes at the cost of a wider main lobe and a larger equivalent noise bandwidth (ENBW).

Figures of merit in the results panel

Coherent gain is the mean of the window samples. Tone peaks measured after windowing are scaled by this factor (often corrected by dividing by the coherent gain).

ENBW (in FFT bins) is $latex N\sum w^2 / (\sum w)^2$. It tells you how much wider the noise bandwidth is relative to a rectangular window of the same length. The dB value is the noise-floor correction when comparing windows.

Scalloping loss is the amplitude drop when a tone sits halfway between bins. Flat-top windows minimize it; rectangular windows are worst.

Peak sidelobe is the height of the first major sidelobe in the window’s Fourier transform — the main driver of leakage into distant bins.

Related tutorials