fft bin frequency calculator
FFT Bin Frequency Calculator guide
Translate an index from a full, unshifted FFT array into frequency. The calculator shows both k × Fs / N and the signed frequency that places the upper indices in the negative-frequency range.
Play the instrument ↑- Input reference
- For zero-based index k, raw grid frequency is k × Fs / N.
Formula and input units
For zero-based index k, raw grid frequency is k × Fs / N. For k greater than N/2, signed frequency is (k − N) × Fs / N. The accepted index range is 0 through N − 1. For even N, the exact Nyquist index N/2 is labeled +Fs/2 on this page.
Worked examples
At 48,000 Hz with N = 4,096, bin 100 corresponds to 1,171.875 Hz. Bin 0 is DC. Bin 2,048 is the Nyquist bin at 24,000 Hz under the positive-Nyquist convention stated here.
Using the same transform, bin 4,095 has raw grid value 47,988.28125 Hz and signed frequency −11.71875 Hz. It is the negative-frequency partner of bin 1 for a real-valued input, whose Fourier coefficients have conjugate symmetry.
Using the result
Confirm whether your array is a complete complex FFT, a one-sided real transform, or an fftshift result. Enter the original full transform length, not the number of entries retained in a one-sided plot. Match zero-based indexing to your programming environment.
For a transform that has already been shifted, recover the original index mapping or use the shifted frequency axis supplied by your library. Applying an unshifted formula to a shifted array moves DC and gives incorrect labels even if the sample rate is right.
Check the array convention with a small transform
Use a sample rate of 8,000 Hz and N = 8 to inspect every index. The signed frequencies are 0, 1,000, 2,000, 3,000, 4,000, −3,000, −2,000 and −1,000 Hz. This short example makes the wrap in the upper half visible. It also checks that the chosen programming environment uses zero-based indices rather than counting the first coefficient as one.
For N = 5 at 10,000 Hz, the represented signed frequencies are 0, 2,000, 4,000, −4,000 and −2,000 Hz. There is no exact 5,000 Hz Nyquist coefficient. An odd transform therefore needs different endpoint handling from an even one when constructing a one-sided view. The general k × Fs/N grid remains valid for both.
Some libraries label the even-length Nyquist coefficient as negative Fs/2 in a two-sided frequency array. This page deliberately labels that same endpoint positive. For the sampled sequence, the two endpoint descriptions coincide, but an array comparison should use a consistent convention. The output detail states the rule so a sign difference at that one bin can be recognized.
If an analyzer stores only one-sided magnitudes, its last index is usually floor(N/2). Its stored array length is therefore smaller than N. Copying that stored length into the transform-length field changes every calculated frequency. Verify the original time-domain transform length from the analyzer configuration before mapping an index. Also check whether amplitude scaling differs at DC and Nyquist when interpreting the associated coefficient.
Assumptions and limits
This page maps indices to bin-center frequencies. A spectral peak between bins can have a frequency that differs from either neighboring center. Interpolation, windowing and estimation methods are separate analysis steps.
A sampled signal above the Nyquist limit may alias into the represented range. A frequency label for the resulting bin cannot identify the original analog frequency without additional information. Enter a valid index smaller than N; the calculator rejects an index outside that array.
Music theory tools → · FFT Frequency Resolution Calculator → · National Instruments FFT frequency grid →
Answers before you play
Common questions
Should I enter N/2 + 1 for a real FFT?
Enter the full time-domain transform length N. A one-sided array often has floor(N/2) + 1 stored entries.
Why are upper indices negative?
They represent the negative-frequency portion when the DFT frequency axis is interpreted modulo the sample rate.
How are odd lengths handled?
Indices up to floor(N/2) remain positive. The following indices map to negative frequencies, with no exact Nyquist bin.
Why can library output use a negative Nyquist label?
For even lengths, +Fs/2 and −Fs/2 represent the same sampled endpoint. Libraries choose a frequency-axis convention. This calculator labels the endpoint positive and states that choice in the result, while upper indices after it map to negative frequencies.