# Relation between filter order and window length for FIR filter

In case of FIR filter design, is the following relation always applicable or there are other relations/formulas also?

If window length is denoted by $$M$$ ,then filter order will be $$M-1$$

$$y[n] = a x[n] + (1 - a) x[n-D]$$
Even though there are only two (visible) coefficients, the order of the filter is $$D$$ because it’s the largest delay. The window length is $$D+1$$ but all the middle coefficients are $$0$$, hence not visible.