Sound & Audio
FFT Bin Spacing & Observation Window Calculator
Compare acquired-signal observation time, FFT grid spacing and the nearest frequency bin with optional zero padding.
How the calculation works
Observation duration = samples/sample_rate s. Reciprocal observation duration = sample_rate/samples Hz. FFT bin spacing = sample_rate/fft_size Hz. Number of nonnegative bins for real input = floor(fft_size/2)+1 bins. Nearest nonnegative frequency bin = min(floor(fft_size/2),floor(frequency*fft_size/sample_rate+0.5)) bin index. Nearest bin center frequency = min(floor(fft_size/2),floor(frequency*fft_size/sample_rate+0.5))*sample_rate/fft_size Hz. Frequency minus nearest bin = frequency-min(floor(fft_size/2),floor(frequency*fft_size/sample_rate+0.5))*sample_rate/fft_size Hz.
Worked example
Example inputs — Sample rate (samples/s): 48000; Acquired samples: 4800; FFT length including zero padding: 8192; Frequency of interest (Hz): 1000. Expected results — Observation duration: 0.1 s; Reciprocal observation duration: 10 Hz; FFT bin spacing: 5.859375 Hz; Number of nonnegative bins for real input: 4097 bins; Nearest nonnegative frequency bin: 171 bin index; Nearest bin center frequency: 1001.953125 Hz; Frequency minus nearest bin: -1.953125 Hz.
Assumptions and limits
One contiguous uniformly sampled record, with optional zero padding to FFT length. The grid spacing fs/NFFT is not the resolving power of the original record: zero padding interpolates the sampled spectrum and does not add observation time. Window shape, leakage, noise, peak interpolation, odd-length Nyquist convention and amplitude scaling affect real measurements. Bin indices are zero-based for a real-input one-sided spectrum.
Reference and further reading
Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.
Related calculators
- Sound Pressure, Intensity & Particle Velocity Calculator
- Multiple Incoherent Sound Level Calculator
- Background Sound Level Subtraction Calculator
- Free-Field Sound Level versus Distance Calculator
- Sabine & Eyring Room Reverberation Calculator
Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.