The equivalent noise bandwidth of a window
is the width of a rectangle whose area contains the same total power
as the window. The height of the rectangle is the peak squared magnitude
of the window's Fourier transform.

Assuming a sampling interval of 1, the total energy for the
window, *w*(*n*), can be expressed
in the frequency or time-domain as

$${\int}_{-1/2}^{1/2}{\left|W(f)\right|}^{2}}df={\displaystyle \sum _{n}{\left|w(n)\right|}^{2}}.$$

The peak magnitude of the window's spectrum occurs at *f* = 0. This is given
by

$${\left|W(0)\right|}^{2}={\left|{\displaystyle \sum _{n}w}(n)\right|}^{2}.$$

To find the width of the equivalent rectangular bandwidth, divide
the area by the height.

$$\frac{{\displaystyle {\int}_{-1/2}^{1/2}{\left|W(f)\right|}^{2}}df}{{\left|W(0)\right|}^{2}}=\frac{{\displaystyle \sum _{n}{\left|w(n)\right|}^{2}}}{{\left|{\displaystyle \sum _{n}w}(n)\right|}^{2}}.$$

See Equivalent Rectangular Noise Bandwidth for an example that
plots the equivalent rectangular bandwidth over the magnitude spectrum
of a von Hann window.