Sample Rate to Frequency Calculator
Calculate Nyquist limits, frequency resolution, and bin values for digital signals.
Understanding Sample Rate and Frequency
In digital signal processing (DSP), the Sample Rate (or sampling frequency) is the number of samples of audio (or any signal) carried per second. When working with Fast Fourier Transforms (FFT) or digital oscillators, we often need to know the relationship between a specific digital point (a "bin" or index) and its corresponding real-world frequency in Hertz.
The Nyquist-Shannon Theorem
The most critical concept in sampling is the Nyquist Frequency. This is exactly half of the sample rate. According to the theorem, a signal can be perfectly reconstructed only if the sampling rate is at least twice the highest frequency component of the signal. If you sample at 44,100 Hz, the highest frequency you can accurately represent is 22,050 Hz.
Frequency Resolution and Bin Calculation
When performing spectral analysis, the Frequency Resolution determines how "fine" your analysis is. It is the width of each frequency bin in an FFT. To find the frequency of a specific bin, you use the following formula:
- f: The resulting frequency.
- k: The bin index or cycle count.
- Fs: The Sample Rate.
- N: The total number of samples (Window size).
Practical Examples
Example 1: Audio CD Quality
A CD uses a sample rate of 44.1 kHz. If you take a 1024-sample window and look at the first bin (k=1), the frequency resolution is 44,100 / 1024 ≈ 43.07 Hz. This means each step in your spectrum represents roughly 43 Hz.
Example 2: High Resolution Audio
For a sample rate of 96 kHz and a buffer size of 2048 samples, the Nyquist frequency is 48 kHz. The frequency resolution would be 96,000 / 2048 ≈ 46.88 Hz. This is why larger buffer sizes (N) lead to better frequency resolution but higher latency.
Why Is This Important?
Engineers use these calculations to prevent Aliasing—a distortion that occurs when frequencies higher than the Nyquist limit "fold back" into the lower spectrum. It is also vital for tuning digital synthesizers, designing crossovers, and implementing noise reduction algorithms in communications software.