Energy & Spectra (same on every page in this path)
1. Power and energy of a signal → 2. Parseval’s theorem (you are here) → 3. Significance of RMS value
Tools: Parseval’s theorem demo · FFT window demo · FFT resolution
In one sentence: Parseval’s theorem says the Fourier transform preserves energy — $latex \sum|x[n]|^2$ computed in time equals $latex \frac{1}{N}\sum|X[k]|^2$ computed from the (unnormalized) DFT, and the 1/N is the factor people forget.
Interactive lab
Open the Parseval’s theorem demo: pick a pulse, tone, Gaussian, or noise, set N, add a Hann window, and watch Etime / Efreq stay at 1 under both the ordinary and the unitary DFT scaling. A built-in “forgot 1/N” row shows the factor-of-N error. Shareable URL state included.
What you will learn
- The continuous-time statement (Parseval/Plancherel/Rayleigh) in both $latex f$ and $latex \omega$ conventions
- The DTFT and DFT forms, and why the DFT version carries $latex 1/N$
- A short derivation, and the unitary DFT where the factor disappears
- Energy signals versus power signals, and the average-power form of Parseval
- How Parseval underlies the windowed ENBW formula
- The coding mistakes that cost a factor of $latex N$, 2, or $latex 2\pi$
The idea in plain words
A signal and its spectrum are two descriptions of the same object. The Fourier transform is a change of orthogonal basis, and a change of orthogonal basis rotates a vector without changing its length. Squared length is energy. That is the entire content of Parseval’s theorem; everything else is bookkeeping about constants.
The name varies by community: Parseval’s theorem (Fourier series, 1799), Rayleigh’s energy theorem (transforms), Plancherel’s theorem (the rigorous $latex L^2$ statement). In signal processing they are used interchangeably.
Continuous time: Parseval and Plancherel
Define the Fourier transform with frequency $latex f$ in hertz:
$latex \displaystyle X(f)=\int_{-\infty}^{\infty}x(t)\,e^{-j2\pi ft}\,dt,\qquad x(t)=\int_{-\infty}^{\infty}X(f)\,e^{j2\pi ft}\,df.$
For any $latex x\in L^2(\mathbb{R})$ (finite energy), Plancherel’s theorem states
$latex \displaystyle \boxed{\int_{-\infty}^{\infty}|x(t)|^2\,dt=\int_{-\infty}^{\infty}|X(f)|^2\,df}$
With the angular-frequency convention $latex X(\omega)=\int x(t)e^{-j\omega t}dt$ the same statement picks up a constant:
$latex \displaystyle \int_{-\infty}^{\infty}|x(t)|^2\,dt=\frac{1}{2\pi}\int_{-\infty}^{\infty}|X(\omega)|^2\,d\omega.$
The $latex 1/2\pi$ is not new physics: it is the Jacobian of $latex \omega=2\pi f$. The more general inner-product version, which also covers cross-correlation, is
$latex \displaystyle \int x(t)\,y^{*}(t)\,dt=\int X(f)\,Y^{*}(f)\,df.$
The integrand $latex |X(f)|^2$ is the energy spectral density (J/Hz if $latex x$ is in volts across 1 ohm): integrate it over a band and you get the energy living in that band.
Fourier series version (periodic signals)
For a $latex T$-periodic signal with complex coefficients $latex c_k=\frac{1}{T}\int_0^T x(t)e^{-j2\pi kt/T}dt$,
$latex \displaystyle \frac{1}{T}\int_0^{T}|x(t)|^2\,dt=\sum_{k=-\infty}^{\infty}|c_k|^2.$
The left side is average power over one period; each $latex |c_k|^2$ is the power in harmonic $latex k$. Check with $latex x(t)=A\cos(2\pi f_0t)$: $latex c_{\pm1}=A/2$, so $latex \sum|c_k|^2=A^2/2$, which is the familiar sinusoid power.
Discrete time: DTFT and DFT
For a discrete-time sequence $latex x[n]$ with DTFT $latex X(e^{j\omega})=\sum_n x[n]e^{-j\omega n}$,
$latex \displaystyle \sum_{n=-\infty}^{\infty}|x[n]|^2=\frac{1}{2\pi}\int_{-\pi}^{\pi}|X(e^{j\omega})|^2\,d\omega.$
Note the integral is over one period of length $latex 2\pi$, which is where the $latex 1/2\pi$ comes from. In the other normalization (cycles per sample, $latex F\in[-\tfrac12,\tfrac12]$) the constant is 1.
The DFT form, with the 1/N
Let $latex x[n]$, $latex n=0,\dots,N-1$, and use the convention nearly every FFT library follows:
$latex \displaystyle X[k]=\sum_{n=0}^{N-1}x[n]\,e^{-j2\pi kn/N},\qquad x[n]=\frac{1}{N}\sum_{k=0}^{N-1}X[k]\,e^{j2\pi kn/N}.$
Parseval for this DFT pair is
$latex \displaystyle \boxed{\sum_{n=0}^{N-1}|x[n]|^2=\frac{1}{N}\sum_{k=0}^{N-1}|X[k]|^2}$
and, for two sequences, $latex \sum_n x[n]y^{*}[n]=\frac{1}{N}\sum_k X[k]Y^{*}[k]$.
Derivation
Substitute the inverse DFT for $latex y[n]$ and swap the two finite sums:
$latex \displaystyle \sum_{n=0}^{N-1}x[n]y^{*}[n]=\sum_{n=0}^{N-1}x[n]\left(\frac{1}{N}\sum_{k=0}^{N-1}Y[k]e^{j2\pi kn/N}\right)^{*}=\frac{1}{N}\sum_{k=0}^{N-1}Y^{*}[k]\underbrace{\sum_{n=0}^{N-1}x[n]e^{-j2\pi kn/N}}_{X[k]}.$
Setting $latex y=x$ gives the energy form. The $latex 1/N$ comes from the inverse transform, which is the only place it appears in the ordinary convention.
Unitary DFT: no factor at all
Split the constant symmetrically: $latex X_u[k]=\frac{1}{\sqrt{N}}\sum_n x[n]e^{-j2\pi kn/N}$. Then forward and inverse transforms are both $latex 1/\sqrt N$ and the DFT matrix is unitary, so
$latex \displaystyle \sum_{n=0}^{N-1}|x[n]|^2=\sum_{k=0}^{N-1}|X_u[k]|^2.$
In NumPy this is np.fft.fft(x, norm="ortho"). Neither convention is wrong; they differ only in where the $latex N$ lives. The demo lets you flip between them and see the plotted spectrum rescale by $latex \sqrt N$ while the energy stays put.
Energy signals versus power signals
Parseval in the form above needs finite energy. That is a real restriction, and it is why the vocabulary of power and energy matters.
- Energy signal: $latex 0<E=\int|x(t)|^2dt<\infty$, so the average power is zero. Pulses, decaying exponentials, and any finite record are energy signals. Parseval and the energy spectral density apply directly.
- Power signal: infinite energy but finite average power $latex P=\lim_{T\to\infty}\frac{1}{2T}\int_{-T}^{T}|x(t)|^2dt$. Periodic signals and stationary noise are power signals. Their Fourier transform contains impulses (or does not exist), so you use Parseval for Fourier series, or a power spectral density, instead.
For a finite DFT record the two views meet. Divide the DFT Parseval identity by $latex N$ to get the average-power form:
$latex \displaystyle P=\frac{1}{N}\sum_{n=0}^{N-1}|x[n]|^2=\frac{1}{N^2}\sum_{k=0}^{N-1}|X[k]|^2.$
The root of $latex P$ is the RMS value, $latex x_{\mathrm{rms}}=\sqrt{P}$, which is why the RMS article is the natural next stop. For a record of a stationary random signal, $latex P$ estimates the variance plus the squared mean, and $latex \frac{1}{N^2}|X[k]|^2$ is the (raw periodogram) contribution of bin $latex k$ to it. For a pure tone $latex A\cos(2\pi k_0n/N)$ with integer $latex k_0$, all the power sits in bins $latex k_0$ and $latex N-k_0$: each has $latex |X|=NA/2$, so $latex P=2(NA/2)^2/N^2=A^2/2$, matching the continuous result.
Windows and ENBW: Parseval at work
Multiplying by a window $latex w[n]$ before the FFT gives a new sequence $latex x_w[n]=x[n]w[n]$. Parseval holds for that sequence, so $latex \sum|x_w|^2=\frac1N\sum|X_w[k]|^2$, and it is smaller than the raw energy whenever $latex w\le 1$.
Applying Parseval to the window itself ties the window’s energy to its spectrum, $latex \sum w^2[n]=\frac1N\sum|W[k]|^2$, and $latex W[0]=\sum w[n]$ is the DC (coherent) gain. The equivalent noise bandwidth in bins is the ratio of those quantities:
$latex \displaystyle \mathrm{ENBW}=\frac{N\sum_n w^2[n]}{\left(\sum_n w[n]\right)^2}\ \text{bins}.$
It equals 1 for the rectangular window and 1.5 for Hann: white noise passed through a Hann-windowed FFT looks like noise measured with a 1.5-bin-wide rectangular filter. The demo prints this number for the window you pick. See the ENBW article for the full table and the window demo to compare shapes.
Verify it in Python
import numpy as np
rng = np.random.default_rng(1)
x = rng.standard_normal(1024)
N = len(x)
E_time = np.sum(np.abs(x)**2)
X = np.fft.fft(x) # ordinary (unnormalized) DFT
E_ord = np.sum(np.abs(X)**2) / N # with 1/N
Xu = np.fft.fft(x, norm="ortho") # unitary DFT
E_uni = np.sum(np.abs(Xu)**2) # no extra factor
E_bug = np.sum(np.abs(X)**2) # forgot 1/N
print(E_time, E_ord, E_uni) # all equal to rounding error
print(E_bug / E_time) # ~ N = 1024
# Windowed: Parseval holds for x*w, not for x
w = np.hanning(N + 1)[:-1] # periodic Hann
xw = x * w
Xw = np.fft.fft(xw)
print(np.sum(xw**2), np.sum(np.abs(Xw)**2) / N)
print("ENBW (bins):", N * np.sum(w**2) / np.sum(w)**2) # ~1.5
A tiny hand check: $latex x=\{1,2,1,0\}$ has $latex E=6$ and DFT $latex X=\{4,\,-2j,\,0,\,2j\}$, so $latex \frac14(16+4+0+4)=6$. The same numbers are reproduced interactively in the demo with N = 16.
Common coding mistakes
- Forgetting the 1/N.
np.sum(abs(X)**2)overstates the energy by exactly $latex N$. Fix: divide by $latex N$, or usenorm="ortho". This is the single most common Parseval bug. - Applying 1/N twice, for example by using the orthonormal transform and then still dividing by $latex N$. Pick one convention and write it in a comment.
- Mixing $latex \omega$ and $latex f$. Integrating $latex |X(\omega)|^2$ without the $latex 1/2\pi$ gives a result $latex 2\pi$ too large. Integrating over $latex f$ needs no constant.
- Using
rfftand summing only half the spectrum. A real signal’s energy is split between positive and negative frequencies. If you keep only bins $latex 0\dots N/2$, double every bin except DC (and Nyquist, for even $latex N$). - Comparing windowed spectrum energy to unwindowed time energy. The window removes energy. Window both sides or compare against $latex \sum|x w|^2$.
- Zero padding surprises. Padding to $latex N_p$ points changes the divisor: use $latex \frac{1}{N_p}\sum|X_p|^2$. The energy itself is unchanged because the extra samples are zero.
- Squaring forgotten. Parseval concerns $latex |x|^2$ and $latex |X|^2$, not $latex |x|$ and $latex |X|$. Amplitude-sum checks will never balance.
- Expecting exact equality. In floating point you get a relative error near $latex 10^{-15}$, not zero.
Reproduce the first mistake in the browser: open the demo with N = 512 and read the “forget 1/N” row — it reads exactly 1/512.
FAQ
What is the DFT form of Parseval’s theorem? For the usual unnormalized DFT, $latex \sum|x[n]|^2=\frac1N\sum|X[k]|^2$. For the unitary DFT ($latex 1/\sqrt N$ on both transforms) the factor disappears: $latex \sum|x[n]|^2=\sum|X_u[k]|^2$.
Is Parseval the same as Plancherel? Plancherel is the rigorous statement that the Fourier transform is an isometry on $latex L^2$. Parseval is the same idea for Fourier series and sequences. Both also hold for inner products, not only energies.
Does Parseval apply to power signals like a sinusoid? Not in the finite-energy form. Use the Fourier-series version (average power equals $latex \sum|c_k|^2$) or work with a finite DFT record and the average-power form $latex P=\frac{1}{N^2}\sum|X[k]|^2$.
Why does ENBW cite Parseval? Because the window energy $latex \sum w^2$ in time equals $latex \frac1N\sum|W[k]|^2$ in frequency, and the ratio of that to the squared DC gain $latex (\sum w)^2$ is the noise bandwidth in bins.
Why is my FFT energy off by a factor of N? You omitted the $latex 1/N$ (or applied it twice). Check which normalization your library uses.
Where is the interactive tool? /tools/parseval-theorem-demo/ — also linked from the Energy & Spectra path box at the top of this page.
Similar articles
- Power and energy of a signal
- Significance of RMS (root mean square) value
- Equivalent noise bandwidth (ENBW) of window functions
- Interpreting FFT results: DFT bins and fftshift
- Fourier series tutorial
- Parseval’s theorem demo
References
A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing, 3rd ed., Pearson — DFT properties and Parseval’s relation.
A. V. Oppenheim, A. S. Willsky, and S. H. Nawab, Signals and Systems, 2nd ed. — Parseval for Fourier series and transforms.
F. J. Harris, “On the use of windows for harmonic analysis with the discrete Fourier transform,” Proc. IEEE, vol. 66, no. 1, 1978 — equivalent noise bandwidth of windows.
B. Delgutte and J. Greenberg, “The discrete Fourier transform,” MIT 6.555 lecture notes, web.mit.edu.