Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Goertzel algorithm

A cheap way to compute one DFT bin, one multiply per sample.

The Goertzel algorithm computes a single DFT bin with the recurrence s_n = x_n + c s_{n-1} - s_{n-2}, c = 2cos(2πk/N), and |X_k|² = s_{N-1}² + s_{N-2}² - c s_{N-1} s_{N-2}.

Examples

  • Goertzel computes just the fan's 23 Hz bin with one multiply and two adds per sample and two numbers of state, cheaper than a full FFT.

  • On the ESP32-S3 the Goertzel loop runs in float; on the ESP32-C6, with no floating-point unit, it runs in Q15.

Read the full section →