Understanding the open and closed pipe resonance calculator — concept and principle
An air column inside a tube resonates at particular frequencies, which is how flutes, organ pipes, clarinets and even bottles produce a pitch. This calculator gives the fundamental frequency and the first five resonances of a pipe that is open at both ends or closed at one end, from its length and the speed of sound.
How it is calculated
- Open at both ends: fₙ = n · c / (2L), n = 1, 2, 3 … (all harmonics)
- Closed at one end: fₙ = (2n − 1) · c / (4L), n = 1, 2, 3 … (odd harmonics only)
L is the pipe length in metres and c the speed of sound in m/s. In dry air c ≈ 331.3 + 0.606 · θ m/s, where θ is the temperature in °C, giving about 343 m/s at 20 °C. The calculator ignores the end correction.
The principle
Sound inside the pipe is a pressure wave that reflects at both ends and forms a standing wave. At an open end the pressure is held near atmospheric, so there is a pressure node and a displacement antinode. At a closed end the air cannot move, so there is a displacement node. An open-open pipe must fit a whole number of half-wavelengths, L = nλ/2, giving fₙ = nc/(2L). A closed-open pipe must fit an odd number of quarter-wavelengths, L = (2n − 1)λ/4, which is why only odd multiples of the fundamental appear and why it sounds an octave lower than an open pipe of the same length.
Worked example
- Inputs: L = 0.5 m, c = 343 m/s, open at both ends.
- Fundamental: f₁ = 343 / (2 × 0.5) = 343 / 1 = 343 Hz.
- Harmonics: n × 343 Hz gives 343, 686, 1,029, 1,372, 1,715 Hz.
For the same pipe closed at one end, f₁ = 343 / (4 × 0.5) = 171.5 Hz, with 514.5, 857.5 … Hz.
| Pipe length (m) | Fundamental (Hz) |
|---|---|
| 0.125 | 1,372 |
| 0.25 | 686 |
| 0.375 | 457.3333333 |
| 0.5 | 343 |
| 0.625 | 274.4 |
| 0.75 | 228.6666667 |
| 1 | 171.5 |
How to read the result
Longer pipes give lower notes, and the frequency is inversely proportional to length: halving the length doubles the frequency. Warmer air raises c and therefore the pitch, by roughly 0.17% per °C near room temperature, which is why wind instruments go sharp as they warm up. A closed pipe's missing even harmonics give it a hollower timbre, characteristic of the clarinet's low register.
Common mistakes
- Using a fixed 340 m/s at every temperature.
- Forgetting the end correction: the effective length of an unflanged open end is about 0.6 times the pipe radius longer, so real pipes sound slightly lower than calculated.
- Treating a conical bore (oboe, saxophone) like a cylinder closed at one end; a cone behaves more like an open pipe.
Frequently asked questions
Why does a bottle make a lower note than its length suggests?
A bottle with a narrow neck acts as a Helmholtz resonator, which follows a different formula based on its volume and neck size.
How do I find the pipe length for a given note?
Rearrange: L = c / (2f) for an open pipe or L = c / (4f) for a closed pipe, then subtract the end correction.
Sources: N. H. Fletcher and T. D. Rossing, The Physics of Musical Instruments, Springer · H. Levine and J. Schwinger, "On the radiation of sound from an unflanged circular pipe", Physical Review 73 (1948)