Understanding the Nyquist and aliasing frequency calculator — concept and principle
When a signal is sampled, any frequency above half the sample rate cannot be represented faithfully. Instead it "folds" back and appears as a lower, false frequency called an alias. This calculator shows the Nyquist frequency for a given sample rate and where a given input frequency will appear after sampling. It is used in audio, data acquisition, vibration analysis and when checking whether an anti-aliasing filter is needed.
How it is calculated
- Nyquist frequency: f_N = f_s / 2.
- Alias frequency: f_alias = |f − k × f_s|, where k is the integer nearest to f / f_s.
Both are in hertz. If f is already below f_N, k = 0 and the alias is simply f itself.
The principle
A sampled sequence only knows the signal's value at discrete moments. A sine wave at f and one at f + f_s (or f − f_s) pass through exactly the same sample points, so after sampling they are indistinguishable. The spectrum of a sampled signal therefore repeats every f_s, and each copy is mirrored around multiples of f_s/2. The Nyquist–Shannon theorem says that if the signal contains nothing above f_s/2, the original can be reconstructed exactly; anything above that limit lands somewhere in the 0 to f_N band, reflected like light between two mirrors.
Worked example
- Inputs: f_s = 44,100 Hz, f = 30,000 Hz.
- Nyquist: 44,100 / 2 = 22,050 Hz. The signal is above it, so it will alias.
- f / f_s = 30,000 / 44,100 = 0.680, nearest integer k = 1.
- Alias: |30,000 − 1 × 44,100| = 14,100 Hz.
So a 30 kHz tone recorded at 44.1 kHz without filtering appears as an audible 14.1 kHz tone.
| Sample rate (Hz) | Nyquist (Hz) |
|---|---|
| 11,025 | 5,512.5 |
| 22,050 | 11,025 |
| 33,075 | 16,537.5 |
| 44,100 | 22,050 |
| 55,125 | 27,562.5 |
| 66,150 | 33,075 |
| 88,200 | 44,100 |
How to read the result
The alias always lies between 0 and f_N. An alias that falls inside your band of interest is a real problem because no later filter can separate it from genuine content. A signal exactly at f_N is ambiguous: depending on phase it may be captured at full amplitude or not at all. Leave margin: practical systems sample at least about 2.2 to 2.5 times the highest frequency of interest so the anti-aliasing filter has room to roll off.
Common mistakes
- Thinking aliasing only matters for frequencies you can hear; ultrasonic noise and harmonics alias into the audio band.
- Filtering after the converter: anti-aliasing must happen before sampling.
- Forgetting that downsampling or decimation in software also needs a low-pass filter first.
Frequently asked questions
Why do CDs use 44.1 kHz?
It places Nyquist at 22.05 kHz, just above the roughly 20 kHz limit of hearing, leaving a narrow band for the anti-aliasing filter.
Is the wagon-wheel effect in films aliasing?
Yes. A camera samples motion at its frame rate, so a wheel spinning near a multiple of that rate seems slow, still or backward.
Can aliasing be removed afterwards?
Generally no; once folded, the alias overlaps real content. Prevention with filtering or a higher sample rate is the only reliable cure.
Sources: C. E. Shannon, "Communication in the Presence of Noise," Proceedings of the IRE, 1949 · A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing, Pearson