Skip to content
Omnikalc

Are you sampling fast enough?

Enter the signal frequency, the sampling rate and the number of samples: get the Nyquist frequency, the minimum rate, the alias frequency and the FFT resolution.

Updated on
Your inputs

Value out of range

Value out of range

Value out of range

Results

Minimum sampling rate for this signal

3,000.00 Hz

Apparent frequency after sampling

500.00 Hz

Aliasing: the signal will appear at a lower, false frequency
Nyquist frequency (half the sampling rate)
1,000.00 Hz
Samples per cycle
1.33
Frequency resolution of an FFT
1.953 Hz
Duration of the recording
0.5120 s

The Nyquist sampling theorem tells you how fast you must sample a signal so that no information is lost: more than twice the highest frequency it contains. Sample slower, and high frequencies fold back as false low ones, an effect called aliasing. This calculator takes the signal frequency, the sampling rate and the number of samples, and returns the Nyquist frequency, the minimum rate, the apparent frequency after sampling and the resolution of a Fourier transform.

How the calculation works

  • Nyquist frequency = sampling rate ÷ 2
  • Minimum sampling rate = 2 × signal frequency
  • Alias frequency = |f − fs × round(f ÷ fs)|
  • Samples per cycle = fs ÷ f
  • FFT resolution = fs ÷ number of samples, and duration = samples ÷ fs

Example

A 1,500 Hz tone is sampled at 2,000 Hz, which gives only 1.33 samples per cycle. The Nyquist frequency is 1,000 Hz, so the tone is above the limit and aliases to 500 Hz: |1,500 − 2,000| = 500. At least 3,000 Hz would be needed. A recording of 1,024 samples lasts 0.512 s and has a frequency resolution of 1.953 Hz.

Where it is used

Audio recording, oscilloscopes, sensors, radio receivers and data loggers all depend on it. CD audio uses 44.1 kHz to cover the 20 kHz limit of human hearing. A vibration measurement system chooses the sampling rate from the highest frequency of interest, and a video camera can show wheels and propellers turning at the wrong speed when frames are too slow.

Good to know

Real signals have energy above their nominal band, so the sampling rate is chosen with a margin, typically 2.5 to 5 times the highest frequency. An analog anti-aliasing filter is essential, because aliasing cannot be removed after the signal has been sampled. A longer record gives a finer frequency resolution, while a higher sampling rate gives a wider frequency range. Bandpass signals can sometimes be sampled below the Nyquist rate on purpose, which is called undersampling.

For the resolution of an analog-to-digital converter, use the ADC resolution calculator. The channel capacity calculator covers the maximum data rate, and the RC filter calculator helps to design an anti-aliasing filter.

Frequently asked questions

What is the Nyquist theorem?

A signal can be reconstructed exactly from its samples if the sampling rate is more than twice its highest frequency. Half the sampling rate is called the Nyquist frequency.

What is aliasing?

When a signal is sampled too slowly, frequencies above the Nyquist frequency fold back and look like lower frequencies. Wagon wheels that seem to turn backwards on film are a classic example.

How do I avoid aliasing?

Sample faster than twice the highest frequency, and place an anti-aliasing low-pass filter before the converter to remove what lies above the Nyquist frequency.

How many samples per cycle are practical?

The theoretical minimum is two, but practical systems use five to ten or more, so that the shape of the waveform can be seen and filters are easy to build.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.