Discrete Fourier transform calculator
Compute the complex frequency bins and magnitudes of a real sample sequence. Your inputs stay on your device.
Set up your task
Starting local processing
Ready. Processing stays in this browser.
2 Your result
Your result updates in this browser. Check your input if the result looks unexpected.
How to use Discrete Fourier transform calculator
Compute the complex frequency bins and magnitudes of a real sample sequence. The pre-filled problem gives you a worked starting point. Compare the response with your own working before trying the self-check below.
- Check the example inputs: Samples in time order.
- Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.
- Use the working to check an intermediate value or assumption. Then change the example as suggested in the self-check and compare the result.
Supported inputs and limits
Use one to 64 equally spaced real values. The forward transform uses a negative imaginary exponent with no normalisation.
How it works
A discrete Fourier transform rewrites equally spaced real samples as complex coefficients at discrete frequency bins. It compares the sample sequence against rotating sinusoids. The real and imaginary components together represent both the strength and phase of each component. Magnitude is the length of that complex coefficient.
The forward transform here uses the negative sign in the exponential and leaves the coefficients unnormalised. Bin zero is the sum of all samples. For real inputs, bins at conjugate frequencies have the same magnitude and opposite imaginary parts. To convert a bin index into hertz, the sampling rate is needed.
Example
Run the pre-filled example. Its first result is “DFT bins: 4”.
- Samples in time order
- 1 0 -1 0
DFT bins: 4 Bin k: real imaginary magnitude 0: 0 0 0 1: 2 0 2 2: 0 0 0 3: 2 0 2
Questions about Discrete Fourier transform calculator
Can I enter complex samples?
This tool takes real time-domain samples and reports complex frequency coefficients. Enter one real value per sample in time order.
Is the magnitude a normalised one-sided spectrum?
The displayed magnitude is from the raw two-sided DFT. Scaling for amplitude or power depends on which spectral convention the problem uses.
Enter 1 1 1 1.
The zero-frequency bin has magnitude 4. Every other bin cancels to zero, as expected for a constant signal.
Related tools
Last updated