How do I calculate the maximum number of harmonics a complex wave can have based on the sample rate?

Say I Have a 20hz fundamental and a sampling rate of 44100 hz. My instinct is to take 44100/2 = 22050(nyquist) and the take the fundamental and multiply by 2 while the frequency is less than nyquist and the count how many times I had to multiply.

I would like to know if i'm going in the right direction and if i'm not... what is the correct way to do this?

EDIT: I would like to add that I am creating a table based oscillator with multiple tables with different harmonic contents.I am trying to figure out how to calculate the harmonics each table should have if I have an arbitrary number of tables. So table 1 would have say 500 harms so a max freq of 44.1hz and table n would have x harms and have a max freq of y.


1 Answer 1


No, you don't just multiply by 2, you multiply by every integer. You can have a 2nd harmonic, a 3rd harmonic, 4th, etc. (Only multiplying by 2s would tell you the number of octaves, not the number of harmonics.)

So take Nyquist frequency, and divide by the fundamental frequency

22050 Hz / 20 Hz = 1102.5

Then round down to the nearest integer. So you can fit 1102 harmonics. The 1102th harmonic is 1102*20 = 22040 Hz, while the 1103th harmonic is 1103*20 = 22060 Hz, which is too high.

(Note that some consider the fundamental as the 0th harmonic while others consider it the first harmonic. I am counting it as the first, 1*f.)

  • $\begingroup$ please see my edit for the question. I added a bit to clarify why i needed this info. thanks for your help $\endgroup$ Commented May 7, 2014 at 4:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.