Goertzel Calculator

Single-frequency detection without an FFT — bin, coefficient, bandwidth and the C routine.

detector response vs. input frequency · dashed line marks the target
Copy into your firmware:

Why Goertzel

When you only care about one or a few frequencies (DTMF digits, a pilot tone, a carrier check), running a full FFT wastes cycles and RAM. The Goertzel algorithm computes a single DFT bin with one multiply and two adds per sample, using one precomputed coefficient:

The block length N sets the detection bandwidth — longer blocks discriminate closer tones but respond more slowly, and the actual detected frequency snaps to the bin center , not exactly to your target. The classic DTMF receiver uses precisely because all eight tone frequencies then land within ±0.7% of a bin center.