Calculate sampling frequency from the sampling period (fs = 1/Ts), or find the period, Nyquist frequency, minimum sampling rate or FFT record length.
- All Physics Calculators
- All Frequency Calculators
- Nyquist Sampling Rate Calculator
- Sampling Rate Calculator
- Hz to Period Calculator
- Samples to Seconds Calculator
- Frequency of Oscillation Calculator
- Angular Frequency Calculator
Calculator Functions
| Function | What it does | What it requires |
|---|---|---|
| Frequency from period | Finds the sampling frequency from the time between samples | Requires the sampling period in s, ms, min or h |
| Period from frequency | Finds the time between samples from the sampling frequency | Requires the sampling frequency in Hz, kHz or MHz |
| Nyquist frequency | Finds the highest frequency a sampling rate can represent | Requires the sampling frequency. A signal band limit to compare is optional |
| Minimum sampling rate (Nyquist) | Finds the sampling rate that a signal's highest frequency calls for | Requires the highest signal frequency or an example band limit. A sampling rate to compare is optional |
| FFT record duration | Finds how long a block of samples lasts | Requires the sampling frequency and the sample count |
| FFT sampling rate | Finds the sampling rate that fits a sample count into a record duration | Requires the sample count and the record duration |
| FFT sample count | Finds how many whole samples cover a record duration | Requires the sampling frequency and the record duration |
The three FFT functions also report the FFT bin spacing. The example band limits, such as 20 kHz for audio or 150 Hz for an ECG, only fill in the highest signal frequency and can be replaced with the signal's real bandwidth.
Sampling Frequency Formulas
| fs | Sampling frequency (Hz), the number of samples taken per second |
| Ts | Sampling period (s), the time between one sample and the next |
Frequency from period
This is the formula above. A sample every 1 ms is 1 ÷ 0.001 = 1,000 Hz. A sample every 30 seconds is 0.0333 Hz.
Period from frequency
Audio sampled at 44.1 kHz has 1 ÷ 44,100 = 0.00002268 s, about 22.7 microseconds, between samples.
Nyquist frequency
The Nyquist frequency is half the sampling rate. Signal content above it shows up at a false lower frequency, which is called aliasing [2]. A 44,100 Hz rate has a Nyquist frequency of 22,050 Hz. Compared with a 20 kHz band limit, 44,100 Hz is above the 40,000 Hz threshold.
Minimum sampling rate (Nyquist)
A signal that contains no frequencies above fmax is completely determined by samples taken 1 ÷ (2 × fmax) seconds apart [1], so the sampling rate has to be more than twice the highest signal frequency. A 20 kHz band limit gives a threshold of 40,000 Hz. With the 150 Hz ECG example the threshold is 300 Hz, so a 250 Hz rate is below it and aliasing is possible.
FFT record duration
Δf = fs ÷ N = 1 ÷ T [2]
N is the number of samples in the block, T is the record duration and Δf is the spacing between FFT bins [2]. A block of 1,024 samples at 1,024 Hz lasts 1 s and has 1 Hz bins.
FFT sampling rate
Fitting 2,048 samples into 2 s takes a sampling rate of 1,024 Hz, with 0.5 Hz bins.
FFT sample count
A partial sample cannot be taken, so the count rounds up and the actual duration is reported. At 1,000 Hz, a 0.5005 s record needs 501 samples, which last 0.501 s and give bins 1.996 Hz apart.
Limits of This Estimate
- The 2 × rule is for an ideal signal with nothing above its band limit, sampled at even intervals. Real anti-alias filters roll off gradually, so practical sampling rates sit some way above the threshold.
- A sampling rate exactly equal to twice the highest frequency leaves no margin and does not guarantee the signal can be rebuilt.
- Bin spacing does not guarantee that two close tones can be told apart. Spectral leakage spreads energy into neighboring bins, and the window used changes how much [2].
- The example band limits are illustrations. They are not clinical or equipment settings.
Sources
- C. E. Shannon, Communication in the Presence of Noise, Proceedings of the I.R.E., vol. 37, January 1949: the sampling theorem: a signal with no frequencies above W is fixed by samples taken 1/2W seconds apart
- National Instruments, Application Note 041, The Fundamentals of FFT-Based Signal Analysis and Measurement: FFT bin spacing as sampling rate divided by the number of points, the Nyquist criterion, aliasing and spectral leakage
