Digital Filter Order Calculator
Calculate minimum filter order for Butterworth, Chebyshev, and elliptic designs. Determine order from passband ripple and stopband attenuation specs. Free, instant results.
Analog-prototype order equations · the elliptic degree equation K(k)K′(k₁)/(K′(k)K(k₁))API slug digital-filter-order
Inputs
Frequency plan
The tone and its harmonics, nearest the passband first
passband ≤ f_p < transition < f_s ≤ stopband| Frequency | n·f₀ | Order | Δ to band | Note | Status |
|---|---|---|---|---|---|
| 1 000.0 | f₀ | 1 | in band | — | DESIRED |
| 2 000.0 | 2·f₀ | 2 | +1 000.0 | — | OK |
| 3 000.0 | 3·f₀ | 3 | +2 000.0 | — | OK |
| 4 000.0 | 4·f₀ | 4 | +3 000.0 | — | OK |
| 5 000.0 | 5·f₀ | 5 | +4 000.0 | — | OK |
- Elliptic OrdernEL
- 3
- Transition RatioΩs/Ωp
- 2
- Lowest Harmonic Above the Passbandfh
- 2kHz
- Chebyshev Attenuation at f_hACH(f_h)
- 51.2dB
Formula
| Symbol | Quantity | Your value |
|---|---|---|
| n | Filter order | — |
| Ap | Passband ripple (dB) | 3.0 dB |
| As | Stopband attenuation (dB) | 40.0 dB |
| Ωs/Ωp | Transition ratio | 2 |
| ε | Ripple factor (√(10^(A/10)−1)) | — |
Assumptions
5 items
- 01The orders are the analog prototype's, from the passband edge f_p with ripple A_p and the stopband edge f_s with attenuation A_s: Butterworth log₁₀(ε_s²/ε_p²)/(2·log₁₀(f_s/f_p)) and Chebyshev acosh(ε_s/ε_p)/acosh(f_s/f_p), with ε² = 10^(A/10) − 1, each rounded up.
- 02The elliptic order solves the degree equation K(k)·K′(k₁)/(K′(k)·K(k₁)), with the selectivity k = f_p/f_s and the discrimination k₁ = ε_p/ε_s, K the complete elliptic integral by the arithmetic-geometric mean.
- 03A digital filter designed by the bilinear transform needs its band edges prewarped by tan(πf/f_sample) first; with no sampling rate, the orders here are those of the prototype, and a digital design near half the sampling rate can need fewer.
- 04The plan follows a tone's harmonics up to the order you give: one inside the passband fails, one in the transition band is only partly rejected, a check.
- 05The attenuation of the first harmonic above the passband is the Butterworth's 10·log₁₀(1 + ε_p²·(f/f_p)^(2n)) and the Chebyshev's 10·log₁₀(1 + ε_p²·cosh²(n·acosh(f/f_p))) at the orders above.
Worked example
60 Hz with the stopband at 130 Hz
A 60 Hz measurement keeps its passband to 65 Hz with 0.5 dB ripple and wants 40 dB by 130 Hz. What order does each response need, and what happens to the 120 Hz second harmonic?
| Step | Expression | Result |
|---|---|---|
| Transition ratio | 130 / 65 | 2 |
| Butterworth | ceil(log10((10^(40/10) − 1) / (10^(0.5/10) − 1)) / (2 × log10(2))) | 9 |
| Chebyshev | ceil(acosh(√((10^(40/10) − 1) / (10^(0.5/10) − 1))) / acosh(2)) | 5 |
| Elliptic, the degree equation | ceil(K(k)·K′(k₁) / (K′(k)·K(k₁))), k = 1/2 | 4 |
| Harmonics in the transition band | 65 Hz < 120 Hz < 130 Hz | 1 |
| The Butterworth's attenuation at 120 Hz | 10·log10(1 + (10^(0.5/10) − 1) × (120/65)^(2 × 9)) | 38.8 dB |
How it works
The Digital Filter Order Calculator computes required IIR/FIR filter order for specified frequency response — essential for DSP algorithm design, audio processing, and communication system development. Embedded engineers, DSP developers, and audio software architects use this to balance performance against computational cost. Per Oppenheim "Discrete-Time Signal Processing" (3rd ed., Ch. 7), IIR filters achieve sharp rolloff with low order (N=4-8 typical) but have nonlinear phase. FIR filters require higher orders (N=50-500) but achieve linear phase essential for audio and data communications. Butterworth IIR order formula: N = ceil(log((10^(As/10)-1)/(10^(Ap/10)-1))/(2*log(ws/wp))), where As = stopband attenuation, Ap = passband ripple. A 60 dB stopband at 2x passband requires N=10 Butterworth or N=6 Chebyshev. Per Parks-McClellan algorithm, optimal FIR order approximates N = (-20*log10(sqrt(dp*ds))-13)/(2.324*(ws-wp)/fs).
Practical tips
- Per Oppenheim, use IIR for sharp transitions with magnitude-only requirements; FIR for linear phase applications
- Parks-McClellan FIR achieves equiripple optimal response — use MATLAB/SciPy remez() for coefficient calculation
- Budget 2N+1 multiply-accumulates per sample for Nth-order IIR (direct form II) per Lyons "DSP Guide"
- For real-time audio (< 10 ms latency), limit FIR order to N < fs/1000 per Audio Engineering Society recommendation
Common mistakes
- Overspecifying filter order — N=20 IIR uses 4x computation vs. N=10 with often negligible improvement
- Neglecting Nyquist constraint — digital filter cannot reject aliases above fs/2 per sampling theorem
- Ignoring IIR phase distortion — group delay varies 10x across passband for high-order Butterworth per Oppenheim
Frequently asked questions
3 questions
What determines the optimal filter order?
Per Parks & Burrus: Order = f(transition bandwidth, stopband attenuation, passband ripple, filter type). Tighter specs require higher order. Doubling transition bandwidth halves required order. Rule of thumb per Lyons: N_FIR ~ 4*fs/(transition_BW) for 60 dB stopband. N_IIR ~ N_FIR/10 for equivalent magnitude response.
How does filter order affect signal processing?
Per Oppenheim: (1) Higher order = sharper transition but more computation (O(N) per sample). (2) IIR N=10 requires ~20 MACs; FIR N=100 requires ~100 MACs. (3) Higher IIR order increases phase distortion — group delay varies 50% across passband at N=8. (4) Higher FIR order adds latency = N/2 samples.
Can filter order be non-integer?
No — order represents number of delay elements (z^-1). Calculated values must be rounded UP to next integer. Per Oppenheim, ceiling function ensures specifications are met: floor would under-design. Half-order fractional delay filters exist but serve different purpose (sample rate conversion).
Shop Components
As an Amazon Associate we earn from qualifying purchases.