What this calculator does
The first question in any filter design is how many reactive elements (poles) the filter needs. You describe the requirement as a mask:
- the passband may lose at most up to the passband edge ;
- the stopband must reject at least beyond the stopband edge .
The calculator then gives the minimum order for the three classical approximations. It also shows how much attenuation each one actually reaches at the stopband edge once you round its order up to a whole number.
Every case is reduced to the normalized low-pass prototype, where the passband edge sits at and the stopband edge at the selectivity :
| Type | Selectivity |
|---|---|
| Low-pass | |
| High-pass | |
| Band-pass |
For band-pass, the transformation is geometric about . The lower and upper stopband edges usually map to different values of , and the tighter one (the smaller ) sets the order.
With the discrimination ratio , the three order formulas are:
- Butterworth:
- Chebyshev (type I):
- Elliptic (Cauer): the degree equation , with selectivity modulus , discrimination modulus , the complete elliptic integral of the first kind, and .
The calculator evaluates and with the arithmetic–geometric mean. It forms directly from , so it keeps full precision even at 150 dB of stopband attenuation, where would lose digits.
Achieved attenuation
Each order is rounded up, which gives every design some margin. The calculator keeps the passband edge at exactly and reports the attenuation reached at :
- Butterworth:
- Chebyshev:
- Elliptic: the equiripple stopband floor . Here is recomputed for the integer from the nome relation , with and Jacobi theta functions.
The "exact" orders are the unrounded values. They show how close you are to the next integer. For example, an exact order of 4.02 means a small relaxation of the mask would save a whole section.
How to use solve-for
The exact orders change smoothly with the mask, so you can solve backwards from them:
- Stopband edge from an exact order: for a fixed attenuation spec, find how close to the passband the stopband can start with a given order. For instance, solve for "Elliptic order (exact)" = 5.
- Stopband attenuation from an exact order: find the most rejection a given order can provide. For instance, solve for "Chebyshev order (exact)" = 7.
Worked example
These are the default inputs. A low-pass with GHz, dB and GHz must have dB, so .
| Response | Exact order | Order | Attenuation at 2 GHz |
|---|---|---|---|
| Butterworth | 8.1612 | 9 | 45.050 dB |
| Chebyshev | 4.8218 | 5 | 42.039 dB |
| Elliptic | 3.5050 | 4 | 48.639 dB (stopband floor) |
The elliptic filter needs fewer than half the Butterworth sections, which is why it is the default choice when group delay is not a concern. Note that 0.5 dB at the passband edge of a Butterworth is not its 3 dB point. Its 3 dB frequency lies slightly above 1 GHz.
Pozar's maximally flat example (Example 8.3) asks for a 3 dB cutoff at 2 GHz and at least 15 dB at 3 GHz. Enter dB, GHz, GHz and dB. The Butterworth exact order is 4.2195, so with 17.684 dB at 3 GHz, which agrees with Pozar. A Chebyshev filter with the same 3.0103 dB ripple needs only (19.138 dB), and an elliptic filter needs (16.810 dB floor).
For band-pass, switch the type to band-pass to see the defaults: a passband of 950–1050 MHz with 0.5 dB, and 40 dB required at 850 MHz and 1200 MHz. The selectivity is , set by the upper edge. The orders are 5 (Butterworth, 41.856 dB), 4 (Chebyshev, 48.858 dB) and 3 (elliptic, 44.894 dB).
Accuracy and validity
The formulas are exact for the ideal approximations, so the only error is floating-point rounding. The golden vectors check:
| Check | Source | Agreement |
|---|---|---|
| Orders for 8 LP/HP/BP masks | scipy buttord, cheb1ord, ellipord (analog) | identical |
| Butterworth/Chebyshev attenuation at | scipy butter/cheby1 + freqs_zpk | < 10⁻¹⁴ relative |
| Elliptic stopband floor | mpmath qfrom/kfrom | < 10⁻¹⁴ relative |
| Pozar Example 8.3 | textbook | N = 5 |
| Butterworth , Chebyshev , elliptic Landen () boundaries | analytic | < 10⁻¹⁵ |
The results assume ideal, lossless components and the textbook definitions: equiripple Chebyshev type I (ripple in the passband only), and an elliptic response with equiripple in both bands. Inverse Chebyshev (type II) needs the same order as type I for the same mask.
Practical notes
- Add margin. Component tolerance, finite Q and layout parasitics all eat into the stopband and round off the band edge. Specify a few dB above the real requirement, or move slightly closer in.
- Odd orders for LC ladders. Even-order Chebyshev and elliptic ladders need unequal source and load resistances. If both ends must be 50 Ω, round up to the next odd order.
- Elliptic filters have finite zeros. Their stopband attenuation is a floor, not a monotonic skirt. In an LC ladder the transmission zeros become parallel-resonant series arms (or series-resonant shunt arms), which need extra capacitors.
- Butterworth and Bessel for phase. If group delay or step response matters, compare the delay of the candidate designs in the LC Filter Designer. A Bessel filter needs a noticeably higher order than a Butterworth for the same mask.
- Very sharp masks. When is close to 1, the orders climb steeply. A transition band narrower than about 5 % usually calls for a different technology: SAW/BAW, ceramic, cavity or crystal.