Understanding the harmonic series calculator — concept and principle
This calculator lists the harmonics of a vibrating string or air column, from the fundamental up through the eighth overtone, and names the nearest equal-tempered note for each, with the deviation in cents. It also counts the harmonics below 20 kHz and gives the pipe length for the fundamental. Musicians, instrument makers and acoustics students use it.
How it is calculated
String, or pipe open at both ends: f_n = n f₁ (n = 1, 2, 3 …), pipe length L = v ÷ (2 f₁)
Pipe closed at one end: only odd harmonics, f_n = n f₁ (n = 1, 3, 5 …), L = v ÷ (4 f₁)
Nearest note: MIDI number = 69 + 12 log₂(f ÷ A4); deviation in cents = 100 × (exact − nearest)
- A4 is the reference pitch (440 Hz by default); v is the speed of sound for the pipe length.
The principle
A string fixed at both ends, or an open pipe, can only vibrate in patterns that fit a whole number of half-wavelengths into its length. The longest fits gives the fundamental, and the others are exact whole-number multiples of it. A pipe closed at one end must have a node at the closed end and an antinode at the open end, which allows only odd multiples. The ear hears these harmonics blended together as the tone colour of the note.
Worked example
Default inputs: f₁ = 110 Hz, string or open pipe, A4 = 440 Hz, v = 343 m/s.
- Fundamental: 110 Hz · A2 +0¢.
- Overtone 1: 220 Hz · A3 +0¢; overtone 2: 330 Hz · E4 +2¢; overtone 3: 440 Hz · A4 +0¢.
- Overtone 4: 550 Hz · C♯5 −14¢; overtone 5: 660 Hz · E5 +2¢; overtone 6: 770 Hz · G5 −31¢.
- Overtone 7: 880 Hz · A5 +0¢; overtone 8: 990 Hz · B5 +4¢.
- Harmonics below 20 kHz = floor(20,000 ÷ 110) = 181; pipe length = 343 ÷ 220 = 1.559 m.
How to read the result
Octaves (harmonics 2, 4, 8) match the piano exactly. The fifth (harmonic 3) is 2 cents sharp of equal temperament, the major third (harmonic 5) about 14 cents flat, and harmonic 7 about 31 cents flat, which is why it sounds "out of tune" on a piano. These differences are the basis of just intonation.
Common mistakes
- Confusing harmonic numbers and overtone numbers: overtone 1 is harmonic 2.
- Expecting even harmonics from a pipe closed at one end.
- Using the pipe length without an end correction; real pipes are slightly shorter than v/(2f).
Frequently asked questions
Why does a clarinet sound different from a flute?
A clarinet behaves like a pipe closed at one end, so its low register is dominated by odd harmonics.
What is a cent?
One hundredth of an equal-tempered semitone.
Is the seventh harmonic a real note?
It is a natural harmonic, but it lies about 31 cents below the nearest equal-tempered note.
Sources: OpenStax, University Physics Volume 1 (2016), section 17.5 "Normal Modes of a Standing Sound Wave"