# When if an FFT more efficient than Goertzel?

Given a block, $$x[n]$$, of M samples.

Calculating abs(fft(x)).^2 returns the power spectrum of that block through the use of a $$M$$-point FFT.

I can calculate the same using Goertzel's algorithm.

At which $$M$$ will it be more efficient to use an FFT instead of Goertzel?

• What do you mean by power of N ? is it $2^N$ frequency points? That's to say, you want to compute a $2^N$-point DFT of M-point sequence x[n], using either an FFT or the Goertzel algorithm..? Oct 5 at 22:45
• By power of N I mean the power of N frequency points. I want to either compute an N-point FFT of an M-point sequence which returns N frequencies OR I want to compute it using Goertzel. My question is: For which N is an FFT more efficient than using Goertel? Oct 6 at 8:10
• @james3849 You didn't answer Fat32's question. If N = 4 what is the "power of N"? Oct 6 at 10:52
• @RichardLyons Sorry for not being clear. Read it as "power of N frequencies" and not "power of N". In other words, I am interested in calculating the power of N frequency bins. Oct 6 at 12:14
• Ha ha! I thought your statement Let's say I want to run a frequency analysis that returns the power of N equally spaced frequencies. indicated that you run a DFT that calculates (returns) power of $N$, (that's to say $a^N$ for some $a$ not indicated) equally spaced frequency points. That's why I asked for clarification of the term power or N... Oct 6 at 12:47