OhMyCalc

Discrete Fourier Transform Bin Calculator

Compute the frequency of a DFT bin and check whether a sinusoidal signal lands exactly on that bin from the sample rate, number of samples, signal frequency and target bin index.

How to Use the Discrete Fourier Transform Bin Calculator

  1. Enter the signal amplitude and frequency.
  2. Enter the sample rate and number of samples.
  3. Enter the target bin index k.
  4. Click Calculate to see the bin frequency and alignment.

使用场景

公式

X[k] = Σ x[n] · exp(−2π·i·k·n / N). The k-th bin has centre frequency f_k = f_s · k / N. A signal aligns on a bin when round(f · N / f_s) equals k.

常见问题

What is spectral leakage?
If the signal frequency does not coincide with a bin centre, its energy spreads into neighbouring bins. Windowing (Hann, Hamming, Blackman) attenuates but does not eliminate leakage.
How do I pick N?
Larger N gives finer frequency resolution f_s/N but longer acquisition. Choose N such that (f · N) / f_s is an integer for your test frequencies.
Why is amplitude an input?
It is carried through for completeness in later magnitude-spectrum calculators; this specific tool reports bin frequency and alignment only.