Frequency Error Calculator
Calculate FFT frequency resolution, bin width, Nyquist frequency, and measurement uncertainty based on your sample rate and FFT size. Get lab-report-ready formatted results.
Parameters
FFT Analysis Results
Windowing Function Impact
| Window | Mainlobe Width (bins) | Effective Resolution | Sidelobe Level | Best For |
|---|
Recommended FFT Sizes for Target Resolutions
| Target Resolution | Required FFT Size | Actual Resolution | Time Window |
|---|
Frequency Bin Width Diagram
How to Use This Calculator
- Set your sample rate — Enter the sample rate of your audio system or select a common preset (44100 Hz for CD quality, 48000 Hz for professional audio, 96000 Hz for high-resolution recording).
- Choose an FFT size — Select the number of samples per FFT frame. Larger sizes give finer frequency resolution but require more processing time and longer time windows.
- Select a window function — The windowing function affects the trade-off between frequency resolution and spectral leakage. Hanning is a solid default for most applications.
- Read your results — The calculator instantly shows frequency resolution, bin width, Nyquist frequency, total bins, and time window duration. Use the copy button for lab-report-ready formatted output.
Understanding the Results
- Frequency Resolution (Hz/bin) — The minimum frequency difference that can be distinguished between two spectral components. Equal to Sample Rate / FFT Size.
- Bin Width — Identical to frequency resolution; each FFT output bin spans this many Hz. A 10.77 Hz bin width means the FFT cannot distinguish two tones less than 10.77 Hz apart.
- Nyquist Frequency — The highest frequency that can be accurately represented, equal to half the sample rate. Frequencies above Nyquist alias to lower frequencies.
- Total Bins — The number of unique frequency bins in the FFT output, equal to FFT Size / 2. Each bin represents one frequency resolution step.
- Time Window Duration — The length of audio needed to fill one FFT frame: FFT Size / Sample Rate. Longer windows give better frequency resolution but worse time resolution.
- Effective Resolution — The actual resolving power after windowing. Non-rectangular windows widen the mainlobe, reducing resolution by a factor proportional to the window's mainlobe width.
Technical Background
The Fast Fourier Transform (FFT) converts a discrete time-domain signal into its frequency-domain representation. The fundamental relationship governing FFT frequency resolution is:
This means that for a 44100 Hz sample rate with an FFT size of 4096, the frequency resolution is 44100 / 4096 = 10.77 Hz. You cannot resolve two frequency components closer than 10.77 Hz apart. To improve resolution, you must either increase the FFT size (which requires a longer time window) or decrease the sample rate (which reduces the maximum representable frequency).
The Nyquist-Shannon sampling theorem establishes that a signal must be sampled at a rate at least twice its highest frequency component to avoid aliasing. The Nyquist frequency (Sample Rate / 2) therefore defines the upper bound of your frequency analysis. Any energy above Nyquist folds back into the spectrum as aliased artifacts.
Windowing functions are applied to the time-domain signal before the FFT to reduce spectral leakage. When a signal's frequency does not align exactly with an FFT bin center, energy "leaks" into adjacent bins. A rectangular window (no windowing) has the narrowest mainlobe (best resolution) but the highest sidelobes (worst leakage). The Hanning window doubles the mainlobe width but suppresses sidelobes by about 31 dB. The Blackman window triples the mainlobe width with sidelobes down 58 dB, making it excellent for detecting weak signals near strong ones.
There is always a fundamental trade-off: finer frequency resolution requires longer time windows. A 1 Hz resolution at 44100 Hz sampling requires an FFT size of at least 44100 samples, corresponding to a 1-second time window. This means you cannot track frequency changes faster than once per second at that resolution. This time-frequency uncertainty principle is analogous to the Heisenberg uncertainty principle in quantum mechanics and is inherent to all Fourier analysis.