Online FFT Calculator: How to Compute the Fast Fourier Transform of Any Signal
About the Author

An online FFT calculator takes a list of numbers sampled over time and tells you which frequencies are hiding inside them. Feed it a messy-looking waveform and it hands back a clean spectrum: a 2 Hz spike here, a 5 Hz spike there, everything else flat. That single move — turning a wall of time-domain numbers into a short list of frequencies — is why the Fast Fourier Transform shows up in audio software, vibration sensors, ECG machines, and radio receivers. This guide explains what the FFT is really doing, how to read every number it produces, and where the calculation usually goes sideways.
From Wiggles to Frequencies: What the FFT Actually Does
Picture a microphone recording a chord. The raw signal is just air pressure measured thousands of times a second — one long column of numbers that looks like noise on a graph. Your ear, though, hears three distinct notes. The FFT does mathematically what your ear does naturally: it decomposes that tangled waveform into the pure sine waves that add up to make it.
Underneath, the FFT is a fast way to compute the Discrete Fourier Transform (DFT). The DFT compares your signal against sine and cosine waves at a fixed set of frequencies and measures how strongly each one is present. The formula is X[k] = Σ x[n]·e-j2πkn/N, summed over all N samples. You do not need to evaluate that by hand — that is exactly the busywork this calculator removes — but the shape matters: each output bin k is a complex number whose size tells you the amplitude of that frequency and whose angle tells you the phase. For the continuous, symbolic version of the same idea, the Fourier transform calculator handles functions instead of sampled data.
Reading the Online FFT Calculator Output: Bins, Magnitude, and Phase
The FFT does not give you frequencies in Hz directly — it gives you bins, numbered 0, 1, 2, and so on. Each bin maps to a real frequency through one tidy equation:
frequency of bin k = k × (sample rate ÷ N)
So with a 32 Hz sample rate and 32 samples, bin 1 is 1 Hz, bin 2 is 2 Hz, and so on. Each bin carries two numbers. Magnitude is how much of that frequency is present — the height of the bar in the spectrum chart above. Phase is where in its cycle that sine wave starts, in degrees. Magnitude is what most people care about; phase matters when you need to reconstruct or align signals. Note that the spectrum is one-sided here: it runs from 0 Hz up to the Nyquist frequency (half the sample rate), because everything above Nyquist is a mirror image and carries no new information.
Worked Example: Two Sine Waves Hiding in One Signal
Load the default "2 Hz + 5 Hz tones" preset. It builds 32 samples of the signal x(t) = sin(2π·2·t) + 0.6·sin(2π·5·t), captured at 32 Hz over exactly one second. On the time graph it just looks like an irregular wobble. Run the FFT and two things jump out:
- A tall bar at 2 Hz with amplitude near 1.0 — the first sine wave.
- A shorter bar at 5 Hz with amplitude near 0.6 — exactly the 0.6 weighting we mixed in.
- Every other bin sits at essentially zero.
That is the payoff: the calculator recovered both the frequencies and their relative strengths from numbers that gave no hint of either. Notice the amplitudes match the original sine coefficients because the spectrum is normalized — bin magnitudes are scaled by 2/N (and the 0 Hz and Nyquist bins by 1/N). Change the 0.6 to 0.3 in your own data and the 5 Hz bar drops to half its height, while the 2 Hz peak stays put. If you only need the period or frequency of a single repeating signal, the simpler frequency calculator gets you there without the full spectrum.
Why fs/N Is the Number That Controls Everything
Frequency resolution — the Δf shown in the results — equals the sample rate divided by the number of points: Δf = fs/N. It is the spacing between adjacent bins, and it decides whether two close frequencies show up as separate peaks or blur into one. With 32 samples at 32 Hz, Δf is 1 Hz, so you can cleanly separate a 4 Hz tone from a 5 Hz tone. But a 4.0 Hz and a 4.3 Hz tone would land in the same bin and merge.
There is only one real fix: record for longer. Doubling your capture time from 1 second to 2 seconds doubles N, which halves Δf to 0.5 Hz — finer resolution. Raising the sample rate does not help resolution; it only pushes the Nyquist ceiling higher so you can see faster frequencies. This trade-off trips up almost everyone the first time. Here is how the key numbers move together:
| Sample rate | Samples (N) | Duration | Δf (resolution) | Nyquist |
|---|---|---|---|---|
| 32 Hz | 32 | 1.0 s | 1.0 Hz | 16 Hz |
| 32 Hz | 64 | 2.0 s | 0.5 Hz | 16 Hz |
| 64 Hz | 64 | 1.0 s | 1.0 Hz | 32 Hz |
| 256 Hz | 1024 | 4.0 s | 0.25 Hz | 128 Hz |
Windowing and Spectral Leakage
The FFT secretly assumes your signal repeats forever, looping the captured chunk end to end. When a frequency does not fit a whole number of cycles into your sample window, that loop has a jump at the seam — and the FFT smears the energy of that one frequency across many neighboring bins. This is spectral leakage, and it turns a sharp peak into a fat, skirted hump.
Window functions fix this by tapering the signal smoothly to zero at both ends before the transform, so there is no seam to leak from. Switch the window selector to Hann or Hamming and watch a leaky peak tighten up. The trade-off: windowing slightly widens the main peak and lowers its measured height, so for clean, perfectly periodic test data you are better off leaving the window on "None." Use a window when your data is real-world and noisy; skip it when you control the signal exactly.
DFT vs FFT: Same Answer, Very Different Speed
The FFT and the DFT compute the identical result. The difference is purely speed. A direct DFT compares the signal against every frequency one at a time, costing roughly N² operations. The FFT — the Cooley–Tukey algorithm this calculator runs — uses a divide-and-conquer trick to cut that to about N·log₂N. For small data the gap is invisible, but it explodes as N grows:
| Samples (N) | DFT ops (≈N²) | FFT ops (≈N·log₂N) | Speedup |
|---|---|---|---|
| 64 | 4,096 | 384 | ~11× |
| 1,024 | ~1.05M | 10,240 | ~100× |
| 1,048,576 | ~1.1 trillion | ~21M | ~52,000× |
This is why classic FFT routines want N to be a power of two — the splitting works cleanest then. If your sample count is not a power of two, this calculator zero-pads it up to the next one automatically, which is also a handy way to interpolate the spectrum onto a finer frequency grid. The FFT is closely related to the Fourier series, which represents periodic functions as sums of harmonics.
Where Engineers Actually Reach for an FFT
The FFT is rarely the end goal — it is the lens you look through to find a problem. A few concrete cases:
- Vibration diagnostics: a peak at exactly the motor's rotation frequency points to imbalance; a peak at twice that often means misalignment. The frequency is the diagnosis.
- Audio and music: equalizers, auto-tune, and noise removal all work in the frequency domain, killing or boosting specific bins before transforming back.
- Power quality: spotting 60 Hz line hum and its harmonics (120 Hz, 180 Hz) in a sensor reading — these line up neatly with the wavelength of the corresponding electromagnetic interference.
- Communications: modern Wi-Fi and 4G/5G split data across hundreds of frequency sub-carriers, and an FFT is what packs and unpacks them.
For a deeper, formal treatment of the algorithm and its history, the Wikipedia entry on the Fast Fourier Transform is a solid reference. But the fastest way to build intuition is to change the numbers above and watch the spectrum react.



