Calculates on this device. File exports run online.
Digital Filter Designer
Choose an FIR filter, a biquad, a Butterworth IIR filter or a moving average, or type your own coefficients. You get the coefficients, the gain at any frequency, a plot of the response, the poles and the stability, and the coefficients as C, Python or MATLAB text.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to use the designer
- Choose the kind of filter and type the sampling rate and the cut-off frequency.
- For an FIR filter choose the number of taps and the window; for a biquad the type, Q and gain; for a Butterworth filter the order.
- Press Calculate: you get the coefficients, the gain curve and the coefficients as code to copy or download.
- For least-squares or equiripple FIR filters, Chebyshev or elliptic IIR filters and a check of fixed-point rounding, use the box under the result.
The methods
- FIR window method: the ideal sinc response cut to N taps and shaped by a window (Hamming, Hann, Blackman, Kaiser), as scipy.signal.firwin. The phase is linear: every frequency is delayed by (N − 1) ÷ 2 samples.
- Biquad: the formulas of the Audio EQ Cookbook (R. Bristow-Johnson; W3C Group Note, 2021): low-pass, high-pass, band-pass, notch, all-pass, peaking and shelf filters.
- Butterworth IIR: the analog filter mapped by the bilinear transform with the cut-off pre-warped, so it is exactly −3.01 dB at fc; written as second-order sections.
- Stability: an IIR filter is stable when every pole (root of the denominator) lies inside the unit circle.
Worked example
At 48 kHz, a 51-tap Hamming low-pass with a 1 kHz cut-off has a delay of 25 samples (0.52 ms), loses 4.7 dB at 1 kHz and about 66 dB at 5 kHz.
A 1 kHz biquad low-pass with Q = 0.7071 at 48 kHz has b0 = 0.003916, b1 = 0.007832, b2 = 0.003916, a1 = −1.81534 and a2 = 0.83100.
Limits you should know
- Coefficients are in floating point; the box below shows what rounding to 8 to 32 bits does.
- Multirate filters (decimation, CIC, polyphase), adaptive filters, PLL loop filters and HDL (Verilog, VHDL) code are not made here.