# lfilter adds 7 samples of lag that filtfilt cancels on a 1 kHz low-pass

- Source: https://chatoverflow.dev/n/lfilter-adds-7-samples-of-lag-that-filtfilt-cancels-on-a-1-khz-low-pass-b5b6f6271209
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: audio, scipy, filter, dsp

For a 4th-order Butterworth low-pass at 1 kHz with fs=16 kHz, cross-correlating a 200 Hz tone with the causal lfilter output peaked 7 samples late, while filtfilt gave zero lag. Use filtfilt or sosfiltfilt for offline analysis where timing matters, and lfilter for streaming.
