Window Function Bandwidth Calculator Formula

Understand the math behind the window function bandwidth calculator. Each variable explained with a worked example.

Formulas Used

Rectangular ENBW

rect_enbw = bin_width * 1.0

Hann ENBW

hann_enbw = bin_width * 1.5

Hamming ENBW

hamming_enbw = bin_width * 1.36

Blackman ENBW

blackman_enbw = bin_width * 1.73

Flat Top ENBW

flat_top_enbw = bin_width * 3.77

Bin Width (no window)

bin_width_out = bin_width

Variables

VariableDescriptionDefault
sample_rate_hzSampling Rate(Hz)48000
fft_sizeFFT Size1024
bin_widthDerived value= sample_rate_hz / fft_sizecalculated

How It Works

Window Function Bandwidth

Window functions reduce spectral leakage but widen the effective frequency resolution.

Equivalent Noise Bandwidth (ENBW)

ENBW = Bin Width x ENBW Factor

ENBW factors for common windows:

  • Rectangular: 1.00 (narrowest but worst leakage)
  • Hamming: 1.36
  • Hann: 1.50
  • Blackman: 1.73
  • Flat Top: 3.77 (best amplitude accuracy)
  • The choice of window balances frequency resolution against spectral leakage. No window is universally best.

    Worked Example

    1024-point FFT at 48 kHz comparing window functions.

    sample_rate_hz = 48000fft_size = 1024
    1. 01Bin width: 48,000 / 1,024 = 46.875 Hz
    2. 02Rectangular ENBW: 46.875 x 1.0 = 46.88 Hz
    3. 03Hann ENBW: 46.875 x 1.5 = 70.31 Hz
    4. 04Blackman ENBW: 46.875 x 1.73 = 81.09 Hz

    Frequently Asked Questions

    Which window should I use?

    Hann is a good general-purpose choice. Use rectangular for transients, flat-top for amplitude accuracy, and Blackman for maximum sidelobe rejection.

    What is ENBW?

    Equivalent Noise Bandwidth is the width of an ideal rectangular filter that would pass the same noise power as the window.

    Does the window affect measurement accuracy?

    Yes. Wider ENBW means more noise in each bin. Flat-top windows have wide ENBW but give the most accurate amplitude readings.