FFT Resolution Calculator Formula

Understand the math behind the fft resolution calculator. Each variable explained with a worked example.

Formulas Used

Frequency Resolution

freq_resolution = sample_rate_hz / fft_size

Useful Frequency Bins

num_bins = fft_size / 2 + 1

Maximum Frequency

max_freq = sample_rate_hz / 2

Time Window Duration

time_window = fft_size / sample_rate_hz * 1000

Variables

VariableDescriptionDefault
sample_rate_hzSampling Rate(Hz)48000
fft_sizeFFT Size (points)1024

How It Works

FFT Frequency Resolution

The FFT converts time-domain data into frequency-domain bins. The resolution depends on how long you observe the signal.

Formulas

Frequency Resolution = Sample Rate / FFT Size

Time Window = FFT Size / Sample Rate

Useful Bins = FFT Size / 2 + 1 (for real signals)

Trade-off

Better frequency resolution requires longer observation windows. This is the time-frequency uncertainty principle.

  • Larger FFT = finer frequency resolution but slower updates
  • Smaller FFT = coarser resolution but faster updates
  • Worked Example

    1024-point FFT at 48 kHz sampling rate.

    sample_rate_hz = 48000fft_size = 1024
    1. 01Resolution: 48,000 / 1,024 = 46.875 Hz
    2. 02Useful bins: 1024/2 + 1 = 513
    3. 03Max frequency: 48,000 / 2 = 24,000 Hz
    4. 04Time window: 1024/48,000 x 1000 = 21.33 ms

    Frequently Asked Questions

    Why must FFT size be a power of 2?

    The Cooley-Tukey FFT algorithm requires powers of 2 for efficiency (O(N log N) vs O(N^2)). Some implementations support other sizes.

    How do I improve frequency resolution?

    Increase the FFT size (longer time window) or use zero-padding. Note: zero-padding interpolates but does not add actual resolution.

    What is spectral leakage?

    Signals that do not fit exactly into the FFT window spread energy across adjacent bins. Window functions (Hann, Hamming) reduce leakage.

    Ready to run the numbers?

    Open FFT Resolution Calculator