- Authors

- Name
- Desi Ilieva
Previous Article

Filters are everywhere in audio DSP — EQs, crossovers, anti-alias filters, room correction, effects. Almost all of them are either FIR or IIR. The two work very differently, have different tradeoffs, and are good at different things.
Introduction
FIR (Finite Impulse Response) and IIR (Infinite Impulse Response) are the two main families of digital filters. Both take an input signal and produce a filtered output. But the way they do it is different enough that choosing between them is a real design decision.
The names describe what happens when you feed an impulse — a single sample of value 1 followed by silence — into each filter type.
- What a Filter Actually Does
- FIR Filters
- IIR Filters
- Phase — The Big Difference
- Stability
- Computational Cost
- When to Use Which
- Summary
What a Filter Actually Does
A digital filter takes past and present input samples, combines them with some coefficients, and produces an output sample. The general difference equation for any discrete-time filter is:
y[n] = b0*x[n] + b1*x[n-1] + b2*x[n-2] + ...
- a1*y[n-1] - a2*y[n-2] - ...
The b coefficients operate on input samples — these are called feedforward terms. The a coefficients operate on output samples — these are called feedback terms.
Whether a filter has feedback terms or not is exactly what separates FIR from IIR.
FIR Filters
An FIR filter has no feedback. Only the b coefficients — only input samples:
y[n] = b0*x[n] + b1*x[n-1] + b2*x[n-2] + ... + bN*x[n-N]
The output at any point is just a weighted sum of the last N input samples. When you feed an impulse into it, the impulse propagates through the delay line and after N samples it's gone. The response is finite — hence the name.
FIR filters have a few properties that follow directly from this:
They are always stable. With no feedback, there's no way for the output to feed back and grow out of control. You can use any coefficient values and the filter won't blow up.
They can have linear phase. If the coefficients are symmetric — b0 = bN, b1 = bN-1, and so on — the filter delays all frequencies by exactly the same amount of time. Every frequency arrives at the output shifted by the same number of samples. No frequency smearing, no warping of transients. This is a significant property for certain applications.
They need a lot of taps for steep slopes. A sharp lowpass filter — say a brick-wall cutoff — might need hundreds or thousands of coefficients. Each coefficient is one multiply-and-add operation per sample. That adds up.
IIR Filters
An IIR filter has feedback. The output feeds back into itself:
y[n] = b0*x[n] + b1*x[n-1] + b2*x[n-2]
- a1*y[n-1] - a2*y[n-2]
Because the output depends on past outputs, and those past outputs depended on their own past outputs, the impulse response theoretically extends forever — the effect of a single impulse never fully reaches zero, it just gets smaller and smaller. That's the infinite in IIR.
The biquad — a second-order IIR section with 5 coefficients (b0, b1, b2, a1, a2) — is the standard building block. Here's a Direct Form I–style sketch (production code often uses Direct Form II / transposed forms and careful coefficient conventions):
float biquad(float x) {
float y = b0*x + b1*x1 + b2*x2
- a1*y1 - a2*y2;
x2 = x1; x1 = x;
y2 = y1; y1 = y;
return y;
}
Six lines and five multiplications per sample. Chain a few of these together and you have a full parametric EQ. That compactness is the main appeal of IIR.
IIR filters are modeled directly on analog filter designs — Butterworth, Chebyshev, Linkwitz-Riley — using transforms that map the analog prototype into the digital domain. This is also why analog-modeled plugins work the way they do: the analog filter topology maps to IIR coefficients.
Phase — The Big Difference
This is where the two types diverge the most in practice.
FIR filters with symmetric coefficients have linear phase — every frequency is delayed by the same number of samples. The shape of the waveform is preserved in time. Transients stay sharp. Stereo imaging stays intact.
IIR filters have nonlinear phase — different frequencies are delayed by different amounts. Run a snare hit through a steep IIR highpass and the attack smears slightly. This is called phase dispersion, and it's the same thing that happens in analog filters. It's not always audible, but it's there.
For applications where phase matters — linear-phase EQ for mastering, crossovers in speaker systems, hearing aid processing — FIR is often the right choice specifically because of this.
For applications where it doesn't — a regular mixing EQ, a resonant filter in a synth, a highpass on a vocal track — the phase behavior of IIR is either inaudible or actually desirable. Analog-modeled filters sound the way they do partly because of the phase behavior.
Offline you can run a filter forward then backward (FIR or IIR) to cancel phase shift entirely — sometimes called zero-phase filtering. That only works on a finished buffer, not in real-time streaming.
Stability
FIR filters are unconditionally stable. Any coefficient values work. There's no risk of the filter oscillating or exploding.
IIR filters can be unstable. Because output feeds back into the input, if the feedback coefficients push energy into the system faster than it decays, the output grows without bound. In practice, filters designed from established analog prototypes are stable, but if you're computing coefficients yourself from a parametric design — especially at extreme Q values or near the Nyquist frequency — poles can end up outside the unit circle and the filter blows up.
This is worth knowing if you're doing real-time filter design. Extreme settings on a parametric EQ at high sample rates are where IIR instability tends to show up.
Computational Cost
IIR is significantly cheaper for the same frequency selectivity.
A steep lowpass with a sharp rolloff:
| Coefficients | Operations/sample | |
|---|---|---|
| IIR (4 cascaded biquads) | 20 | ~20 multiply-add |
| FIR (equivalent selectivity) | 500–2000+ | 500–2000+ multiply-add |
This is why real-time effects — EQs, filters in synths, crossovers — almost always use IIR. The efficiency is too good to ignore.
FIR at that length is normally computed with FFT convolution instead of direct convolution, which brings the cost down from O(N) per sample to something closer to O(log N) amortized. Room correction, convolution reverb, and linear-phase EQ all work this way — large FIR kernels computed in the frequency domain.
When to Use Which
Use IIR when:
- you need a real-time filter and efficiency matters
- you're modeling an analog filter — Butterworth, Chebyshev, SVF, ladder
- phase is not a concern or the analog-style phase behavior is part of the sound
- you're building a synth filter, a channel EQ, a crossover, a simple highpass/lowpass
Use FIR when:
- linear phase is required — mastering EQ, speaker crossovers, hearing aid processing
- you're doing convolution reverb or room correction (already a large FIR kernel)
- you need an exact, custom frequency response that's hard to approximate with IIR
- you can afford the compute cost or are working with FFT convolution anyway
In practice, most audio plugins use IIR for everything interactive and real-time, and FIR for offline processing or high-end linear-phase options. A lot of mastering EQs offer both modes — minimum-phase / analog-style (usually IIR) and linear-phase (usually FIR) — and let you choose.
Summary
FIR and IIR are the two digital filter families — the difference is whether the filter feeds its output back into itself:
- FIR — feedforward only, no feedback. Output is a weighted sum of past input samples. Always stable. Can have linear phase with symmetric coefficients. Expensive for steep responses unless you use FFT convolution.
- IIR — has feedback. Output depends on past outputs too. Compact and efficient — a few biquad stages do what FIR needs hundreds of taps for. Nonlinear phase. Can become unstable at extreme settings.
- Phase is the main audible difference — FIR can preserve transient shape exactly, IIR smears frequencies slightly like analog filters do
- Stability — FIR never blows up, IIR can at extreme Q or near Nyquist
- Cost — IIR wins for real-time processing, FIR is viable with FFT convolution for large kernels
- Most real-time audio effects use IIR; convolution reverb, room correction, and linear-phase EQ use FIR
If you're building nonlinear plugins, the anti-alias / reconstruction side of this story continues in What is an Anti-Alias Filter? and How to Implement Oversampling in JUCE. For filters you can actually turn knobs on, try DFuzz or browse all plugins.