Anti-Aliasing Filter Calculator
Anti-Aliasing Filter Calculator
How much attenuation your anti-aliasing filter has to reach before anything folds back into the band you care about — derived from the converter’s own resolution — and the filter order that gets there across the transition the sample rate leaves you, with the corner frequency it implies and what oversampling would save.
Anti-aliasing filter order
a 100 kHz sample rate, 10 kHz of signal, a 12-bit converter, 1 dB of droop allowed and a Butterworth response
From bit depth to filter order
Butterworth: n ≥ log₁₀[(10A/10 − 1) ÷ (10Ap/10 − 1)] ÷ (2 log₁₀(fstop/fm))
Chebyshev: n ≥ cosh⁻¹√[(10A/10 − 1) ÷ (10Ap/10 − 1)] ÷ cosh⁻¹(fstop/fm)
fc = fm ÷ (10Ap/10 − 1)1/2n
- N
- the converter’s resolution in bits. 6.02N + 1.76 dB is the signal-to-noise ratio of an ideal quantiser on a full-scale sine — measured here from a simulated quantiser, not quoted
- f m
- the top of the band of interest, which is the filter’s passband edge
- f stop
- the lowest frequency whose alias lands inside the band of interest: f s − f m. Requiring the attenuation by the Nyquist frequency instead is stricter and costs order
- Ap
- the droop allowed at f m — the passband ripple for a Chebyshev. Asking for less droop pushes the corner up and costs attenuation in the stop band
Worked example
a 100 kHz sample rate, 10 kHz of signal, a 12-bit converter, 1 dB of droop allowed and a Butterworth response
A 12-bit converter's own noise floor is 6.02 × 12 + 1.76 = 74.0 dB below full scale; there is no point attenuating an alias further than that
The lowest frequency that folds into the band of interest is 100 − 10 = 90 kHz, so the transition available is 9:1 — just over three octaves
Butterworth: n ≥ log₁₀[(107.4 − 1) ÷ (100.1 − 1)] ÷ (2 log₁₀ 9) = 4.185, so 5 poles — three second-order sections, with one of them doing very little
Five poles with 1 dB of droop at 10 kHz puts the −3 dB corner at 11.45 kHz
That filter reaches 89.6 dB at 90 kHz — 15.6 dB more than needed — and 64.0 dB at the Nyquist frequency itself
Sampling four times faster instead would need only 3 poles, and decimating back down would hand you another 0.5 bit of resolution
Poles needed to reach a converter’s own noise floor
| Resolution | Floor to clear | 2:1 transition | 4:1 | 9:1 |
|---|---|---|---|---|
| 8-bit | 49.9 dB | 10 / 6 | 5 / 4 | 3 / 3 |
| 10-bit | 62.0 dB | 12 / 7 | 6 / 5 | 4 / 3 |
| 12-bit | 74.0 dB | 14 / 8 | 7 / 5 | 5 / 4 |
| 14-bit | 86.0 dB | 16 / 9 | 8 / 6 | 5 / 4 |
| 16-bit | 98.1 dB | 18 / 10 | 9 / 7 | 6 / 5 |
| 18-bit | 110.1 dB | 20 / 11 | 10 / 7 | 7 / 5 |
| 20-bit | 122.2 dB | 22 / 12 | 11 / 8 | 7 / 6 |
| 24-bit | 146.2 dB | 26 / 14 | 13 / 9 | 8 / 7 |
What the filter actually has to do
Sampling folds. Any energy at a frequency above half the sample rate reappears in the digitised record at a lower frequency — mirrored about the Nyquist frequency — and once it is there, nothing downstream can separate it from a real signal, because it IS a real signal as far as the numbers are concerned. That is why the anti-aliasing filter is analogue and sits before the converter: it is the only place the distinction still exists. The folding rule was checked here rather than asserted: a tone at 55 kHz sampled at 48 kHz was synthesised, transformed, and its peak found at 7 kHz, exactly where |f − fs| says it should be.
How far down is far enough. Not “as far as possible” — as far as the converter’s own noise floor, because below that the alias is indistinguishable from quantisation noise and costs nothing. An ideal N-bit converter digitising a full-scale sine has a signal-to-noise ratio of 6.02N + 1.76 dB: 50 dB at 8 bits, 74 dB at 12, 98 dB at 16. That relation is not quoted here from a textbook — it is measured, by quantising a sine in software and comparing the residual with the signal, and it comes out within a few tenths of a decibel every time. This is the same floor the ADC resolution calculator derives, and it is the number this page turns into an order.
Where the stop band starts, and why it is not the Nyquist frequency. The lowest frequency whose alias lands inside the band you care about is fs − fm, not fs/2. Sampling at 100 kHz with a 10 kHz band of interest, a 90 kHz tone folds to exactly 10 kHz, while a 60 kHz tone folds to 40 kHz — inside the digitised spectrum, but outside the band you were looking at, where a digital filter can still remove it. So the honest transition band runs from 10 kHz to 90 kHz, and that is what this page uses by default. Analog Devices’ own tutorial states it the same way. If your application needs the whole digitised spectrum clean — because you are going to look at it, or because the decimation filter will not remove it — switch to the Nyquist criterion and expect to pay two or three poles for it.
Oversampling: trading silicon for op-amps. Raise the sample rate and the transition band widens, so the order collapses. The 12-bit example here needs five poles at 100 kHz and 3 at 400 kHz — an RC and one op-amp instead of three. Decimating back down to the rate you wanted then costs nothing but arithmetic and hands back resolution as well — half a bit for every factor of four, because the quantisation noise is spread over a wider band and the digital filter throws most of it away. Modern sigma-delta converters take this to its limit, oversampling by 64 or more, and it is why an audio codec can get away with a single-pole analogue filter in front of it. If the converter you have will run faster, that is almost always the cheaper design.
What this page does not do. It decides WHAT filter you need; it does not build it. Take the order and corner frequency from here to the Sallen-Key filter designer or the multiple-feedback filter calculator, which turn a corner frequency and a Q into real resistors and capacitors, section by section — an odd order is one real pole plus second-order sections, so five poles is an RC and two active stages. Two cautions for the handover. The Q of each section is not 0.707 except for a second-order Butterworth: a fifth-order Butterworth needs sections at Q = 0.618 and Q = 1.618, and those come from the pole table, not from this page. And group delay matters as much as attenuation if your signal is a pulse rather than a spectrum — a high-order Chebyshev rings badly, and a Bessel response, which this page does not compute because its attenuation has no closed form, needs roughly twice the order for the same stop-band figure but keeps the waveform’s shape. For a first-order RC as the last resort before the converter, the RC and RLC filter calculator.
Frequently asked questions
How much attenuation does an anti-aliasing filter need?
Enough to put an alias under the converter’s own noise floor, which for an ideal N-bit converter is 6.02N + 1.76 dB below full scale — 74 dB for 12 bits, 98 dB for 16. Attenuating further is wasted, and the real requirement can be lower still if you know the largest out-of-band signal that actually exists.
Where does the stop band start?
At f_s − f_m, the lowest frequency whose alias lands on the top of your band of interest. Sampling at 100 kHz with a 10 kHz band, that is 90 kHz. Requiring full attenuation by the Nyquist frequency (50 kHz) is a stricter criterion that keeps the whole digitised spectrum clean, and costs two or three extra poles.
What order anti-aliasing filter do I need?
It depends on the transition ratio and the depth. Sampling ten times the band of interest gives a 9:1 transition, where a 12-bit converter needs 5 Butterworth poles; sampling three times gives 2:1, where the same converter needs 14. This is why sample rate and filter order are one decision, not two.
Does oversampling remove the need for an anti-aliasing filter?
It reduces it, sometimes to a single RC, but never to nothing: something still has to attenuate whatever sits near the new, higher sample rate. What oversampling does is widen the transition band enormously, and decimation afterwards gives back half a bit of resolution for every factor of four.
Butterworth or Chebyshev for anti-aliasing?
Butterworth unless the order is uncomfortable. Its passband is flat, which matters if you are measuring amplitude, and its step response is far better behaved. A Chebyshev saves a pole or two for the same stop-band figure and pays with passband ripple and ringing.
Do I still need an anti-aliasing filter if my signal is slow?
Yes. The filter is there for what you are NOT interested in — mains hum harmonics, a switching regulator at 500 kHz, RF picked up on a sensor lead. A slow signal with a fast interferer aliases just as badly, and the interferer arrives at a frequency that looks entirely plausible.
Related calculators
References
- Analog Devices. MT-002 Tutorial: What the Nyquist Criterion Means to Your Sampled Data System Design. States the transition band as running from the corner frequency f_a to the stop-band frequency f_s − f_a with the required attenuation set by the system’s dynamic range, and gives the scale of the problem: “achieving 60-dB attenuation in a transition region between 1 MHz and 2 MHz (1 octave) requires a minimum of 10 poles — not a trivial filter.” It also sets out the oversampling trade this page computes, recommending an initial sample rate of 2.5 to 4 times f_a.
- Shannon CE. Communication in the Presence of Noise. Proceedings of the IRE, vol. 37 no. 1, January 1949, pp. 10–21. The sampling theorem itself: a band-limited signal is completely determined by samples taken at twice its highest frequency, and everything above that folds.
- The 6.02N + 1.76 dB relation is derived, not cited: a full-scale sine has RMS amplitude A/√2 and an ideal quantiser’s error is uniform over one LSB, giving an RMS of q/√12, and the ratio in decibels is 6.02N + 1.76. This build measures it instead — quantising a sine and comparing the residual RMS with the signal’s — and agrees to within 0.1 dB from 8 to 16 bits. The same figure is derived on this site’s ADC resolution page.
- Zverev AI. Handbook of Filter Synthesis. Wiley, 1967. The order formulas used here are the standard Butterworth and Chebyshev results from this literature; they are verified in this build against a direct search over the magnitude responses at 80 combinations of ripple, attenuation and transition ratio, which is what the page’s numbers actually rest on.
