NewAI Part GeneratorFree to get started
FREE TOOL

Nyquist frequency formula and aliasing calculator

The Nyquist frequency formula is one line: fN = fs ÷ 2. Enter a sample rate and a tone to see where it lands after sampling, which Nyquist zone it is in and whether its spectrum is inverted. Then size the anti-aliasing filter: the attenuation your ADC resolution needs at fs − fmax and the Butterworth order that delivers it.

Solve for
Examples
Hz
Hz

Alias frequency (what you see)

200 Hz

Nyquist frequency fs/2
500 Hz
Nyquist zone
3
Spectrum
not inverted (odd zone)
Nearest multiple of fs
1 kHz 1 × fs

⚠ Aliased: a tone at 1.2 kHz is indistinguishable from one at 200 Hz after sampling. Filter it out before the ADC.

Folding: input frequency to the frequency you see
010020030040050005001k1.5k2kInput frequency (Hz)Alias frequency (Hz)seen at 200 Hzf 1.2 kHz

Inputs that all land on 200 Hz at fs = 1 kHz

Nyquist zoneInput frequencySpectrum
1200 Hznormal
2800 Hzinverted
31.2 kHznormal
41.8 kHzinverted
52.2 kHznormal
62.8 kHzinverted

How to calculate Nyquist frequency and where a tone aliases

The Nyquist frequency is half the sample rate, fs/2. A tone above it appears at f_alias = |f − k·fs|, where k is the whole number nearest f ÷ fs. Sampled at 1 kS/s, the Nyquist frequency is 500 Hz and a 1.2 kHz tone shows up at 200 Hz. To prevent this, filter before the ADC: for a 12-bit converter the filter needs about 74.0 dB of attenuation by fs − fmax.

Nyquist frequency and aliasing formulas

The Nyquist frequency equation just halves the sample rate. An ideal sampler at fs also produces images of a tone at |±K·fs ± f| for every whole K (ADI MT-002). The one between dc and fs/2 is the frequency you see, and the aliased frequency formula below picks it out.

fN = fs ÷ 2     f_alias = |f − k·fs|     zone = floor(f ÷ (fs/2)) + 1
fs
sample rate in Hz (S/s)
f
input frequency in Hz
k
whole number nearest f ÷ fs

Signals in even Nyquist zones come out with their spectrum reversed. For a baseband system that only needs dc to fmax, the anti-aliasing filter must reach the required dynamic range by fs − fmax, the lowest frequency that folds onto fmax (ADI MT-002). This calculator takes the ideal SNR of the ADC as that dynamic range and sizes a Butterworth filter whose loss at fmax is Ap (3.01 dB puts its corner at fmax):

A = 6.02N + 1.76 − X     n ≥ log10((10^(A/10) − 1) ÷ ε²) ÷ (2·log10(f_stop ÷ fmax))
A
attenuation needed at the stopband edge, dB
X
how far below full scale the largest out-of-band content is, dB
n
Butterworth order (number of poles)
ε²
10^(Ap/10) − 1, which is 1 for a 3.01 dB corner

Worked examples: alias frequency and anti-aliasing filters

Example 1: 60 Hz hum in a 100 S/s data logger

fs/2 = 50 Hz, so 60 Hz is in Nyquist zone 2. |60 − 1 × 100| = 40 Hz: mains pickup shows up as a 40 Hz tone that no digital filter can tell apart from a real 40 Hz signal. Filter it in analog before the ADC, or sample fast enough to remove it digitally.

Example 2: a 12-bit ADC at 1 kS/s for signals up to 100 Hz

The stopband edge is fs − fmax = 900 Hz and the filter needs 74.0 dB there. A single RC pole with its corner at 100 Hz gives only 19.1 dB. A 4-pole Butterworth gives 76.3 dB, which is enough.

Example 3: why 16-bit audio converters oversample

At 48 kHz with a 20 kHz band, the stopband edge is 28 kHz, only 0.49 octave above fmax, and 98.1 dB is needed: a 34-pole Butterworth, which nobody builds. Sampling at 384 kHz (8×) moves the edge to 364 kHz and the requirement drops to 4 poles; a digital filter then removes the rest before decimating back to 48 kHz.

Butterworth anti-aliasing filter order by resolution and oversampling

Poles needed to reach 6.02N + 1.76 dB at fs − fmax, with the filter corner (−3.01 dB) at fmax. Columns are the sample rate as a multiple of fmax.

ADC bitsAttenuationfs = 2.5 × fmaxfs = 4 × fmaxfs = 8 × fmaxfs = 16 × fmaxfs = 64 × fmax
849.9 dB156332
1062.0 dB187432
1274.0 dB228543
1486.0 dB2510643
1698.1 dB2811653
20122.2 dB3513864
24146.3 dB4216975

Alias frequency table at 1 kS/s

The alias frequency and Nyquist zone for a range of inputs sampled at 1 kS/s. Every input folds into 0 to 500 Hz. For another sample rate, use the Nyquist frequency calculator at the top of the page.

InputSeen atNyquist zoneSpectrum
100 Hz100 Hz1normal
400 Hz400 Hz1normal
499 Hz499 Hz1normal
600 Hz400 Hz2inverted
900 Hz100 Hz2inverted
1.05 kHz50 Hz3normal
1.1 kHz100 Hz3normal
1.6 kHz400 Hz4inverted
2.3 kHz300 Hz5normal
2.95 kHz50 Hz6inverted

Anti-aliasing in practice

Aliasing has to be stopped before the ADC; once a tone has folded into the band, it is indistinguishable from a real signal. Noise counts too: the wideband noise of an op amp or sensor above fmax folds back and raises the noise floor, so the filter matters even when there are no interfering tones. A Butterworth corner placed at fmax loses 3 dB at fmax; enter a smaller passband loss to keep the band flat, at the cost of more poles. When the order gets high, raise the sample rate first: each doubling of fs widens the transition band and saves poles, and sigma-delta converters oversample internally for this reason (ADI MT-002). Elliptic filters reach the same attenuation with fewer poles, at the cost of passband ripple and phase distortion; Bessel filters keep pulse shape but need more poles than a Butterworth.

Glossary

Sample rate (fs)
How many samples per second the ADC takes, in S/s or Hz.
Nyquist frequency
fs/2, the top of the band a sampler can represent without ambiguity.
Alias
A frequency above fs/2 that, after sampling, is indistinguishable from one below it.
Nyquist zone
A band fs/2 wide: zone 1 is dc to fs/2, zone 2 is fs/2 to fs, and so on.
Anti-aliasing filter
An analog low-pass (or band-pass) filter before the ADC that removes content that would alias into the band.
Oversampling
Sampling well above twice the signal bandwidth, which relaxes the anti-aliasing filter.

Related guides

Frequently asked questions

What is the Nyquist frequency?

Half the sample rate, fs/2. It is the highest frequency a sampled system can represent without ambiguity: 24 kHz for 48 kHz audio and 500 Hz for a 1 kS/s data logger. Anything above it folds back below it.

What is the difference between the Nyquist frequency and the Nyquist rate?

The Nyquist frequency is fs/2, a property of the sampler. The Nyquist rate is twice the highest frequency in the signal, a property of the signal: the minimum sample rate that avoids aliasing.

What is the Nyquist rate formula?

Nyquist rate = 2 × fmax, twice the highest frequency in the signal. A band up to 20 kHz has a Nyquist rate of 40 kHz, and the 48 kHz sample rate in Example 3 leaves only a narrow margin above that for the filter.

How do I calculate the sampling frequency for a signal?

Take the highest frequency you need and sample faster than twice that, with margin for the anti-aliasing filter: ADI MT-002 suggests starting at 2.5 to 4 times the highest frequency of interest. For a 100 Hz band that is 250 Hz to 400 Hz.

What is the alias frequency formula?

Subtract the nearest whole multiple of the sample rate and take the magnitude: f_alias = |f − k·fs|, with k = round(f ÷ fs). A 1.2 kHz tone sampled at 1 kHz appears at |1200 − 1000| = 200 Hz.

Is sampling at exactly twice the signal frequency enough?

No. A tone at exactly fs/2 gives samples whose amplitude depends on where they fall on the wave, and can be zero. A real anti-aliasing filter also needs room to roll off between fmax and fs − fmax; ADI MT-002 suggests starting at 2.5 to 4 times the highest frequency of interest.

How much attenuation does an anti-aliasing filter need?

Enough that full-scale content at fs − fmax lands below the converter’s noise floor: the ideal SNR, 6.02N + 1.76 dB, which is 74.0 dB for 12 bits and 98.1 dB for 16 bits. If nothing above fmax ever exceeds −X dBFS, you can relax it by X dB (ADI MT-002).

How many poles does an anti-aliasing filter need?

Each pole adds about 6 dB per octave beyond the corner. ADI MT-002’s example, 60 dB between 1 MHz and 2 MHz, needs 10 Butterworth poles. Sampling faster widens the transition band and cuts the order sharply, which is why audio converters oversample.

What is undersampling?

Deliberately sampling a band that sits in a higher Nyquist zone, for example an IF signal, so that its alias lands in the first zone. It works as long as the whole band fits inside one zone and the ADC’s input bandwidth covers it; bands in even zones come out spectrally reversed (ADI MT-002).

More free PCB tools

See all free electronics tools →

Sources

Design the whole board, not one number

ProtoFlow is free AI PCB design software: describe a circuit and get a schematic with real parts, PCB layout with an autorouter, SPICE simulation and Gerber files. Native KiCad, Altium and EAGLE import and export. Free on macOS, Windows and Linux.

Get for Mac

Free to start. No card required.