Sampling Rate Calculator Formula
Understand the math behind the sampling rate calculator. Each variable explained with a worked example.
Formulas Used
Minimum Sampling Rate (Nyquist)
min_sampling_rate = 2 * max_signal_freq_hzPractical Sampling Rate
practical_rate = oversampling_ratio * max_signal_freq_hzData Rate (16-bit mono)
data_rate_16bit = oversampling_ratio * max_signal_freq_hz * 16Variables
| Variable | Description | Default |
|---|---|---|
max_signal_freq_hz | Maximum Signal Frequency(Hz) | 20000 |
oversampling_ratio | Oversampling Ratio | 2 |
How It Works
How to Determine Sampling Rate
The Nyquist theorem states the minimum sampling rate is twice the highest signal frequency.
Formulas
f_sample_min = 2 x f_max
f_sample_practical = Oversampling Ratio x f_max
In practice, engineers oversample (4x to 8x or more) because:
Worked Example
Capture audio up to 20 kHz with 2x oversampling.
max_signal_freq_hz = 20000oversampling_ratio = 2
- 01Minimum (Nyquist): 2 x 20,000 = 40,000 Hz
- 02Practical rate: 2 x 20,000 = 40,000 Hz
- 03Data rate (16-bit): 40,000 x 16 = 640,000 bits/s = 640 kbps
Ready to run the numbers?
Open Sampling Rate Calculator