Tech & Digital
Nyquist Sampling Rate and Aliasing Calculator
When an analogue signal such as sound, vibration or a radio waveform is converted into digital samples, the sampling rate decides which frequencies can be captured faithfully. The Nyquist–Shannon sampling theorem says that a signal containing no frequencies above a certain limit can be reconstructed exactly from its samples if the sampling rate is more than twice that highest frequency. Half the sampling rate is called the Nyquist frequency, and it marks the upper edge of what a digital system can represent. Any content above the Nyquist frequency does not simply disappear: it folds back into the lower range and appears as a false frequency called an alias. Once aliasing has happened it cannot be separated from genuine signals, which is why analogue-to-digital converters are preceded by anti-aliasing filters that remove frequencies above the Nyquist limit. This calculator gives the Nyquist frequency for any sampling rate, the minimum sampling rate needed for a signal with a known highest frequency, and the apparent frequency of a test tone after sampling. For CD audio at 44.1 kilohertz, the Nyquist frequency is 22.05 kilohertz, comfortably above the roughly 20 kilohertz limit of human hearing, while a 30 kilohertz tone that slipped through without filtering would appear at 14.1 kilohertz, well inside the audible band. The same principle applies to oscilloscopes, sensors, control systems and software-defined radios, and explains the wagon-wheel effect in films, where spokes seem to turn slowly backwards.
How to use this calculator
- Enter the sampling rate in kilohertz, for example 44.1 or 48 for audio.
- Enter the highest frequency your signal contains to check whether the rate is sufficient.
- Optionally enter a test frequency to see where it will appear after sampling.
- Read the Nyquist frequency, the minimum rate and the alias frequency.
- Choose a sampling rate with a margin above twice the highest frequency so that a practical filter can work.
Why practical systems sample faster than twice
The theorem assumes an ideal filter that passes everything below the Nyquist frequency and removes everything above it, but real filters need a transition band. Sampling a little faster than twice the highest frequency leaves room for that transition. CD audio's 44.1 kilohertz rate gives about 2 kilohertz of space above the 20 kilohertz audio band, and professional audio often uses 48 kilohertz or higher.
Many modern converters use oversampling, running at a much higher internal rate and then filtering digitally, which allows gentle analogue filters and reduces noise in the band of interest.
Aliasing outside audio
Aliasing affects any sampled measurement. A vibration sensor sampled too slowly may report a low-frequency wobble that does not exist, and an oscilloscope set to a slow timebase can show a misleading waveform. Video cameras sample motion at their frame rate, which is why rotating propellers and wheels can appear frozen or reversed.
Engineers sometimes use aliasing deliberately. In undersampling or bandpass sampling, a narrow radio signal at a high frequency is sampled at a lower rate so that its alias lands at a convenient intermediate frequency, provided the band is carefully filtered first.
Formula & method
Nyquist–Shannon: sample at more than twice the highest frequency, fs > 2 × fmaxNyquist frequency = fs ÷ 2Alias frequency = |f − fs × round(f ÷ fs)|Anti-aliasing filters remove content above the Nyquist frequency before samplingNyquist frequency = fs / 2. Requirement: fs > 2 × fmax. Alias frequency = |f − fs × round(f / fs)|, which always lies between 0 and fs/2.
Worked example
A 30 kHz tone sampled at 44.1 kHz
- Nyquist frequency = 44.1 / 2 = 22.05 kHz.
- round(30 / 44.1) = 1, so alias = |30 − 44.1| = 14.1 kHz.
- The tone is above Nyquist, so it appears as an alias.
Answer: The 30 kHz tone would be heard as a false 14.1 kHz tone.
Frequently asked questions
What is the Nyquist frequency?
Half the sampling rate. It is the highest frequency a sampled system can represent without aliasing.
Why is sampling at exactly twice the frequency not enough?
At exactly twice, the samples can fall on the zero crossings of a sine wave and miss it entirely. The rate must be strictly higher, and in practice comfortably higher.
Can aliasing be removed after recording?
No. Once a high frequency has folded into the lower band it looks identical to a genuine signal there, so it must be filtered out before sampling.
Why is 48 kHz common in video and professional audio?
It gives a little more room above the audible band than 44.1 kHz and divides conveniently for many broadcast and video systems.
Does a higher sampling rate always sound better?
Not necessarily. Once the rate covers the audible band with a good filter margin, higher rates mainly help with processing headroom rather than audible detail.
What is the wagon-wheel effect?
A visual alias: a camera's frame rate samples a spinning wheel too slowly, so its spokes appear to rotate slowly or backwards.