A biquad is five numbers. Pick the filter, and the calculator writes b0, b1, b2, a1 and a2 for your sample rate and draws what they do to magnitude, phase and delay.
Filter types and what Q means in each
The eight second-order types follow Robert Bristow-Johnson’s Audio EQ Cookbook. The two first-order types are bilinear transforms of a one-pole filter and roll off at 6 dB per octave.
| Type | Frequency is | Q controls |
|---|---|---|
| Low-pass, high-pass | the −3 dB corner at Q 0.7071 | the peak at the corner; 0.7071 is Butterworth |
| Band-pass | the centre, at 0 dB | the width, roughly frequency / Q |
| Notch | the null | the width of the cut |
| All-pass | where phase reaches −180° | how fast the phase turns |
| Peaking | the centre of the bell | the width of the bell |
| Low shelf, high shelf | the midpoint of the slope | the slope; above 0.7071 it overshoots |
Gain applies to the peaking and shelf types only. At 0 dB all three reduce to a pass-through.
A worked example
A low-pass at 1000 Hz with Q 0.7071 at 48000 Hz comes out as:
b0 = 0.00391612348716
b1 = 0.00783224697431
b2 = 0.00391612348716
a1 = -1.81533961166
a2 = 0.831004105611
Run it as y[n] = b0 x[n] + b1 x[n-1] + b2 x[n-2] - a1 y[n-1] - a2 y[n-2]. The same filter at 44100 Hz needs different numbers, which is why the sample rate is an input and not a footnote.
Output formats
- Plain lists the five values by name.
- Web Audio builds an
IIRFilterNodewithfeedforwardandfeedbackarrays. - C arrays writes
b[3]anda[3]with a leading 1 for a0. - CMSIS-DSP writes
{ b0, b1, b2, -a1, -a2 }, the order and signsarm_biquad_cascade_df1_f32expects. - SciPy / MATLAB SOS writes one row
[b0, b1, b2, 1, a1, a2]forsosfilt.
Frequency warping near Nyquist
The cookbook maps an analog prototype onto the unit circle with the bilinear transform, which squeezes the whole analog axis into 0 to Nyquist. The design pre-warps the centre frequency, so the corner or peak lands where you set it. The width does not get the same correction: a bell at 15 kHz and 44100 Hz is narrower on its upper side than the same Q at 1 kHz. Read the plot, not the Q, when a filter sits in the top octave.
Low frequencies and coefficient precision
A 20 Hz high-pass at 96000 Hz has poles at radius 0.99907, and a1 is −1.99815, within 0.002 of −2. All the information about the corner lives in the last digits. Stored as 32-bit floats and run in direct form, such a section is noisy and drifts off frequency. Keep these coefficients in doubles, or use a structure built for low corners, and check the result by pasting the rounded values back into the calculator.
Group delay
The second plot switches between phase and group delay. Delay is shown in samples, with milliseconds in the reading under the cursor. It is computed from the coefficients directly, not from differences of the phase curve, so it stays correct beside a sharp resonance. At the exact frequency of a notch the delay has no value, and the line breaks there.