Skip to content
View in the app

A better way to browse. Learn more.

TEST SITE

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Sampling Theory and Nyquist

Every ADC samples an analog signal at discrete moments in time. The Nyquist-Shannon sampling theorem states precisely how fast you must sample to capture a signal correctly — and what goes wrong if you do not sample fast enough. This theorem underpins every digital audio system, every digital receiver, and every digital modulation scheme. Violating Nyquist creates aliasing, a subtle form of interference that is impossible to remove after the fact.

What you will learn: The Nyquist theorem, minimum sample rate, aliasing and why it is destructive, anti-alias filters, oversampling, undersampling, and how these concepts govern capture bandwidth and digital audio quality.
Diagram showing Nyquist sampling theorem with correct sampling above the Nyquist rate, aliasing below the Nyquist rate, and frequency-domain plots comparing the two cases

Top: sampling a 1 kHz tone at 8 kHz correctly captures it. Bottom: sampling the same tone at only 1.5 kHz aliases it to a different (incorrect) frequency. Both the time-domain and frequency-domain effects are shown.

View Larger

The Nyquist Theorem

The Nyquist-Shannon sampling theorem states: to perfectly reconstruct an analog signal from digital samples, the sample rate must be at least twice the highest frequency present in the signal.

Nyquist rate:

fs ≥ 2 × fmax

Where fs is the sample rate and fmax is the highest frequency in the signal. The minimum allowed sample rate (fs = 2 × fmax) is called the Nyquist rate. Half the sample rate (fs/2) is the Nyquist frequency — the highest frequency that can be correctly represented.

The reasoning is geometrical: to define a sine wave unambiguously you need at least two samples per cycle — one for the peak and one for the trough. At exactly two samples per cycle (the Nyquist rate), a sine wave is minimally defined. In practice, you always sample faster than the Nyquist rate to leave headroom for the anti-alias filter.

Why the theorem is exact. Claude Shannon proved in 1949 that if the signal is strictly band-limited (contains no frequency above fmax) and you sample at exactly 2 × fmax, the original signal can be perfectly reconstructed using a sinc interpolation function. The result is mathematically exact — not an approximation. This is why high-fidelity digital audio works: a 44.1 kHz sample rate perfectly represents any signal up to 22.05 kHz (well above the 20 kHz limit of human hearing).

Aliasing: What Goes Wrong

When a signal contains a frequency above the Nyquist frequency and the ADC samples it anyway, the high-frequency component folds back into the spectrum and appears as a lower-frequency alias. The alias frequency is:

Alias frequency:

falias = | fsignal − n × fs |

Where n is the integer that brings the result into the range 0 to fs/2. The alias appears at a completely different frequency from the original signal and is indistinguishable from a real signal at that frequency.

Example: Aliasing of a 7 kHz tone with a 8 kHz sample rate

Nyquist frequency = 8000 / 2 = 4000 Hz. The 7 kHz tone is above the Nyquist frequency.

Alias = |7000 − 8000| = 1000 Hz

The 7 kHz signal appears in the recorded data as a 1 kHz tone. It is impossible to determine from the samples alone whether a recorded 1 kHz tone is a real 1 kHz signal or an aliased 7 kHz signal. This contamination cannot be removed after sampling.

Aliasing is insidious because the alias looks like a real signal at the aliased frequency. There is no way to recover the true signal once aliasing has occurred — the information about the original frequency is permanently lost. This is why preventing aliasing before sampling is critical, and why anti-alias filters are always placed before the ADC input.

Anti-Alias Filtering

An anti-alias filter is a low-pass filter placed immediately before the ADC input. It attenuates all signal components above the Nyquist frequency before they reach the ADC. The filter's cutoff frequency is set at or below fs/2 so that any signal that passes through the ADC has already been band-limited.

Anti-alias filters need steep roll-off to provide adequate attenuation just above the cutoff. A filter that cuts off at 20 kHz (for a 44.1 kHz audio ADC) must reject frequencies at 22 kHz and above. Early CD players used sharp analog filters with unfortunate phase distortion near the cutoff — a common criticism of first-generation digital audio. Modern systems use high oversampling rates to push the Nyquist frequency far above 22 kHz so the required anti-alias filter cutoff is much higher and a gentle-slope filter can be used.

Oversampling and Its Benefits

Oversampling means sampling at a rate significantly higher than the minimum Nyquist rate. A signal with a 20 kHz bandwidth requires only 40 kHz sampling (Nyquist), but modern audio ADCs sample at 192 kHz or higher — an oversampling ratio of 4× to 10×. Digital receivers often oversample by 10× to 100×.

Oversampling provides three practical benefits:

  1. Gentler anti-alias filter requirements. If fs = 192 kHz, the Nyquist frequency is 96 kHz. The anti-alias filter only needs to roll off between 20 kHz and 96 kHz — a very gradual slope — rather than between 20 kHz and 22 kHz.
  2. Noise shaping and improved SNR. Each doubling of the sample rate reduces noise in the signal band by 3 dB (half a bit of effective resolution). With digital decimation filtering, oversampling can improve effective ADC resolution significantly.
  3. Wider capture bandwidth for digital receivers. A digital receiver sampling at 2 MHz captures a 1 MHz bandwidth of RF spectrum simultaneously. Every signal in that 1 MHz window is captured and can be decoded by the DSP.

Undersampling and Bandpass Sampling

The Nyquist theorem says the sample rate must exceed twice the highest frequency — but it also has a more general form: the sample rate must exceed twice the bandwidth of the signal, provided the signal occupies a known frequency band. This is called bandpass sampling or undersampling.

A bandpass signal centered at 10 MHz with 1 MHz bandwidth has fmax = 10.5 MHz. Naively, you would need a 21 MHz sample rate. But bandpass sampling says: because the signal occupies only 1 MHz of bandwidth, you only need a 2 MHz sample rate — the ADC intentionally aliases the 10 MHz signal down to baseband. The alias is the desired result: the signal appears in the ADC output as a 0–1 MHz baseband signal, ready for DSP processing.

Bandpass sampling is widely used in digital receivers and in digital IF (intermediate frequency) stages of modern receivers. The ADC sample rate determines the signal bandwidth it can capture, not the center frequency. A 20 MS/s ADC sampling an IF of 30 MHz captures a 10 MHz bandwidth centered at 30 MHz, provided an analog band-pass filter removes everything outside that band first.

Nyquist Rate Calculator

Nyquist Rate Calculator

Enter the highest signal frequency (or bandwidth for bandpass sampling) to find the minimum required sample rate and the Nyquist frequency.

Results will appear here.

Sampling in Real Systems

Telephone and voice. Speech occupies roughly 300 Hz to 3.4 kHz, so telephone systems and many voice codecs sample at 8 kHz, giving 4 kHz of usable bandwidth and room for the anti-alias filter's transition band. Wideband (“HD”) voice samples at 16 kHz.

Music. CDs sample at 44.1 kHz to capture audio up to 20 kHz, leaving only a narrow transition band from 20 to 22.05 kHz — which is why early CD players needed very steep analog filters, and why modern converters oversample and filter digitally instead.

Sensors and data loggers. A temperature sensor needs only a sample every few seconds; a vibration sensor monitoring a motor at 3,000 rpm (50 Hz) with harmonics to 1 kHz needs at least 2 kHz, and in practice 5–10 kHz with an anti-alias filter. Sampling too slowly without a filter turns vibration into false low-frequency readings.

Digital receivers. A low-cost USB receiver samples at about 2.4 MS/s, capturing 2.4 MHz of spectrum at once (as I and Q samples); higher-end digitizers sample at 100 MS/s or more and capture a very wide band at once. Bandpass sampling and digital decimation let them work at frequencies far above their sample rate.

Frequently Asked Questions

If I sample at exactly twice the highest frequency, can I really reconstruct the signal perfectly?

Mathematically yes, but in practice no. At exactly the Nyquist rate, a sine wave at fmax could be sampled at its zero crossings, giving you all zeros — meaning you would see nothing even though the signal is present. You need to sample slightly faster than twice fmax, and the signal's phase relative to the sampling clock must be known to guarantee reconstruction. Real systems sample at 2× to 10× or more above the Nyquist frequency and rely on anti-alias filters to ensure no signal energy reaches fmax = fs/2.

Does sample rate affect audio quality once it is above 44.1 kHz?

For playback on normal speakers or headphones, no — there is no scientific evidence that humans can hear content above 20 kHz. The main benefit of high sample rates (96 kHz, 192 kHz) in audio production is that it allows more gentle anti-alias filters and gives processing headroom during digital effects (pitch shifting, time stretching). For a digital receiver, a higher sample rate directly equals more captured bandwidth, which has an unambiguous benefit.

Test Your Knowledge

Answer the questions below to check your understanding of this lesson. Every answer can be found in the lesson above.

Loading questions...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.