Toolvito

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

Your values

For band filters, the lower edge.

More taps give a sharper filter and more delay: (N − 1) ÷ 2 samples. High-pass and band-stop filters need an odd number.

More options

Optional: the gain and phase there.

Used only by the box below for least-squares and equiripple designs.

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.

Full design with plots and fixed-point check

Full design with plots and fixed-point check

Uses the filter of the result above. FIR mode: the server designs it by the method you choose here (window method, least squares or equiripple Parks-McClellan; the last two use the transition width under More options). Butterworth mode: the server designs an IIR filter of the same order and cut-off in the family you choose. Other modes: the server analyses the coefficients. You get the response with group delay, impulse and step responses, poles and zeros, optional fixed-point rounding, a plot, CSV and JSON files and the coefficients as C text.

More options

The calculator above works on your device. When you run a task in this section, Toolvito receives the values and result you submit to make the file or run the check. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

How to use the designer

  1. Choose the kind of filter and type the sampling rate and the cut-off frequency.
  2. 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.
  3. Press Calculate: you get the coefficients, the gain curve and the coefficients as code to copy or download.
  4. 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.

Related tools