Inverse Discrete Fourier Transform Calculator
Convert frequency-domain components X[k] back into a time-domain sequence x[n] with this free Inverse Discrete Fourier Transform (IDFT) calculator. Enter comma-separated real or complex values and get the result instantly.
IDFT Time-Domain Signal Reconstructor
Inverse Discrete Fourier Transform Formula
Where:
- \(x[n]\) — time-domain sample at index \(n\)
- \(X[k]\) — frequency-domain (spectral) component at index \(k\)
- \(N\) — total number of samples, equal to the number of values entered
- \(j\) — imaginary unit, \(j^2 = -1\)
- \(n\) — sample index in the time domain (\(0 \le n \le N-1\))
- \(k\) — frequency-bin index (\(0 \le k \le N-1\))
This is the standard definition of the IDFT: each time-domain sample is a sum of all spectral components weighted by complex exponentials, scaled by \(1/N\). It exactly inverts the Discrete Fourier Transform (DFT).
Inverse DFT – Calculation Example
Example: the frequency-domain sequence \(X[k] = 1, 0, 0, 0\) (the calculator's default values), so \(N = 4\).
\[ x[n] = \frac{1}{4} \sum_{k=0}^{3} X[k]\, e^{j 2\pi kn/4} = \frac{1}{4} \left( X[0] \cdot e^{j 0} \right) = \frac{1}{4} \cdot 1 = 0.25 \]
Because only \(X[0]\) is non-zero, every sample receives the same contribution.
Result: \(x[n] = 0.25, 0.25, 0.25, 0.25\) — a constant (DC) sequence. A single non-zero bin \(X[0]\) always reconstructs a flat signal.
Second example (complex input): \(X[k] = 1+2j,\; 0,\; -1,\; 0\).
\[ x[0] = \tfrac{1}{4}\left[(1+2j) + 0 + (-1) + 0\right] = 0.5j \]
Result: \(x[n] = 0.5j,\; 0.5+0.5j,\; 0.5j,\; 0.5+0.5j\). Note the repeating pattern: bins 0 and 2 are the even (conjugate-symmetric) components of the spectrum.
How to Use the Calculator
- Enter your frequency-domain values in the Frequency domain values field as a comma-separated list, e.g.
1, 0, 0, 0or1+2j, 0, -1, 0. - Use plain real numbers (
3,-2.5) or complex numbers ina+bjform (1+2j,-1-1.5j). A purely imaginary value can be written as2j. Do not use spaces inside a complex number. - Click Calculate.
- Read the reconstructed sequence in the Time domain sequence x[n] result field. The output has exactly as many samples as values you entered, in order \(x[0], x[1], \ldots, x[N-1]\).
What Is the Inverse Discrete Fourier Transform?
The Inverse Discrete Fourier Transform (IDFT) is the operation that maps a signal's frequency-domain representation back to the time domain. Its counterpart, the DFT, decomposes a sequence of \(N\) time samples into \(N\) complex spectral coefficients; the IDFT reverses that process, rebuilding the original samples from the spectrum. Applying the DFT and then the IDFT (with the same \(1/N\) scaling used here) returns the original signal exactly, up to rounding error.
The IDFT matters because much of modern signal processing happens in the frequency domain. Filters are designed by shaping a magnitude response, communication systems modulate data onto specific frequency bins, and audio codecs (such as MP3 or AAC) store signals as spectral coefficients. At the end of all these operations, the IDFT is the step that turns the processed spectrum back into samples you can hear or transmit. In practice it is computed with the FFT algorithm, which produces identical results far faster; this calculator performs the direct sum, which is ideal for learning and verification.
Interpreting the output is straightforward once you know a few properties. Bin \(X[0]\) represents the DC (average) component, so a large \(X[0]\) yields a signal with a constant offset. Higher bins correspond to faster oscillations: bin \(k\) completes \(k\) full cycles across the \(N\) samples. If the input spectrum has conjugate symmetry — \(X[N-k] = X[k]^*\) — the reconstructed signal is purely real, which is why real-world signals produce symmetric spectra. Asymmetric input, like the second example above, produces complex-valued samples.
Assumptions, Limitations and Tips
- Normalization convention: the calculator applies the \(1/N\) factor on the inverse transform only (the "1/N backward" convention). If your DFT definition uses \(1/\sqrt{N}\) on both sides, scale the output by \(\sqrt{N}\) to compare.
- Number of points: \(N\) equals the number of comma-separated values you enter. Pad with zeros to reach a desired length — zero-padding in one domain interpolates in the other.
- Complex format: use
j(noti) for the imaginary unit, with no spaces:2-3jis valid,2 - 3iis not. - Precision: results are shown with 4 decimal places. Very small residual imaginary parts (e.g.
0.0000j) on theoretically real outputs are normal rounding artifacts. - Practical size: the direct \(O(N^2)\) computation is fine for sequences up to a few hundred points; for large spectra use an FFT implementation.
A good sanity check: enter a flat spectrum such as 1, 1, 1, 1 — the IDFT should return a single impulse \(1, 0, 0, 0\), since a constant spectrum is the DFT of an impulse.
WPCalc also offers a range of other engineering tools, from the parallel resistance calculator and the series inductance calculator to the real and reactive power calculator for AC circuit analysis.
Frequently Asked Questions
How do I compute the IDFT by hand?
For each output sample, multiply every spectral value by a complex exponential and add them up. For example, with N = 4 and X[k] = 2, 0, 1, 0: x[0] = (2 + 1)/4 = 0.75, while x[1] = (2 + 1·e^{jπ/2})/4 = (2 + j)/4 = 0.5 + 0.25j. Repeat for n = 2 and n = 3. Use Euler's formula \( e^{j\theta} = \cos\theta + j\sin\theta \) to evaluate each exponential, then divide every sum by N.
Why is my result complex when I expected a real signal?
The IDFT returns purely real samples only when the spectrum is conjugate-symmetric, meaning \( X[N-k] = X[k]^* \). For N = 8, X[7] must be the conjugate of X[1], X[6] the conjugate of X[2], and so on, with X[0] and X[4] real. If you enter an arbitrary list like 1, 2, 3, 4, that symmetry is broken, so the output legitimately contains imaginary parts. Very small residuals such as 0.0000j on otherwise real outputs are just rounding artifacts.
What is the difference between the IDFT and the IFFT?
They compute exactly the same thing. The IFFT is simply a fast algorithm (the inverse Fast Fourier Transform) that evaluates the IDFT sum in \( O(N \log N) \) operations instead of \( O(N^2) \). Results are identical up to floating-point rounding. This calculator uses the direct sum, so it is best for sequences of a few hundred points or fewer; for longer spectra, use FFT-based software.
Why are my values off by a factor of N or √N compared to other tools?
Different DFT/IDFT conventions place the scaling factor differently. This calculator uses the "1/N backward" convention, where the forward DFT is unscaled and the inverse carries the \( 1/N \) factor. Some tools (like NumPy's ifft) do the same, but others use \( 1/\sqrt{N} \) on both transforms, or put \( 1/N \) on the forward transform. If results differ, multiply or divide by N or \( \sqrt{N} \) to reconcile them.
What do negative or out-of-range frequency bins mean?
The DFT spectrum is periodic with period N, so a bin index beyond N-1 wraps around: \( X[N+k] = X[k] \). Negative frequencies are stored in the upper half of the array. For example, with N = 8, bin 6 represents the frequency -2, and bin 7 represents -1. If you have a two-sided spectrum listed from -N/2 to N/2-1, reorder it so that negative-frequency bins are moved to the end of the list before entering them.
Can I enter fewer values or an odd number of values?
Yes — N is simply the number of comma-separated values you type, and it can be odd or even. There is no requirement for a power of two (that restriction applies only to some FFT algorithms, not to the direct IDFT sum). A single value like 5 gives N = 1 and returns just that value divided by 1, i.e. 5. If you need a specific length, pad with zeros: zero-padding the spectrum interpolates the reconstructed signal.
How can I verify that the result is correct?
A quick check is to apply the forward DFT to the output — you should recover your original input exactly, up to 4-decimal rounding. Another test: enter 1, 1, 1, 1 and confirm the output is the impulse 1, 0, 0, 0, since a flat spectrum is the DFT of an impulse. Also check that the average of the output samples equals \( X[0]/N \), because bin zero always encodes the DC (mean) component.