📣

Acoustic Resonance Frequency Calculator

Calculate resonant frequencies for cylindrical tubes and cavities with three end conditions — open–open, open–closed, and closed–closed. Includes Levine–Schwinger end correction, 7 medium presets, and mode-shape diagrams for the first 10 harmonics.

Input

Common Tubes & Cavities

Result

Fundamental frequency (f₁)
Wavelength of f₁
Nearest note
Effective length (L_eff)
Sound speed (v)
Formulas
Open – Open: f_n = n · v / (2 · L_eff) ; L_eff = L + 2 · δ
Open – Closed: f_n = (2n − 1) · v / (4 · L_eff) ; L_eff = L + δ (odd harmonics only)
Closed – Closed: f_n = n · v / (2 · L) (no end correction)
End correction δ ≈ 0.6 · r (Levine–Schwinger, unflanged open end)

First 10 Resonant Modes

n Harmonic Frequency Wavelength Mode shape (pressure |envelope|)

Share or embed this tool

Free to use on your own website — WordPress, Wix, or any platform. Paste one line and it works instantly, resizing to fit.


About Tube & Cavity Resonance

A tube of length L filled with a fluid of sound speed v supports a discrete set of standing-wave resonances. The boundary conditions at each end — open (free air, pressure node) or closed (rigid wall, pressure antinode) — determine which harmonics are present and at what frequencies. This calculator covers the three classic cases of pipe resonance and cavity resonance, plus the Levine–Schwinger end correction that all serious tube acoustics work needs. For the complementary problem of room-sized cavities, see the room mode calculator.

Open – Open tube (e.g. flute, organ flue pipe, PVC resonator)

Both ends are pressure nodes (open to atmosphere). Standing waves fit an integer number of half-wavelengths in the tube: L = n·λ/2, giving f_n = n·v/(2L). All integer harmonics are present: 1×, 2×, 3×, … the fundamental. The fundamental wavelength is twice the tube length. DIY instrument builders often use PVC pipe to prototype open–open resonators before cutting metal or bamboo.

Open – Closed tube (e.g. clarinet body, bottle, organ stopped pipe, bass reflex port)

One open end (pressure node) and one closed end (pressure antinode). Standing waves fit an odd number of quarter-wavelengths: L = (2n−1)·λ/4, giving f_n = (2n−1)·v/(4L). Only odd harmonics exist: 1×, 3×, 5×, … the fundamental. The fundamental wavelength is four times the tube length — so a closed pipe sounds an octave lower than an open pipe of the same length. This is why the clarinet (effectively closed at the reed) overblows at 3× (a twelfth) rather than 2× (an octave) like the flute. Ported subwoofer enclosures use a related quarter-wave port principle to boost bass output at the tuning frequency.

Closed – Closed tube (e.g. enclosed cavity, muffler resonator chamber)

Both ends are pressure antinodes (rigid walls). Same formula as open–open (f_n = n·v/(2L)) but with pressure nodes/antinodes swapped. No end correction applies — there's no open end to "see" beyond. This mode describes sealed exhaust resonator chambers and some muffler designs.

End correction (Levine–Schwinger, ~0.6·r)

An open end behaves as if the tube were slightly longer than its physical length. The air column "bulges" out beyond the rim a small distance — the end correction δ. For an unflanged circular open end, δ ≈ 0.6133·r (Levine & Schwinger 1948). For a flanged open end (e.g. a tube ending in a baffle), δ ≈ 0.85·r. This calculator uses the unflanged value. Without end correction, predicted frequencies are systematically too high — typically by a few percent for a typical instrument tube radius.

Temperature and the speed of sound

Sound speed in air varies with temperature: v ≈ 331.3 + 0.606·T °C (m/s). At 20 °C v = 343 m/s; at 0 °C it drops to 331 m/s — a 3.5% difference that shifts every resonant frequency by the same proportion (about half a semitone). The effect is especially audible when calculating organ pipe frequency: a pipe voiced at 20 °C will play sharp in a cold church at 5 °C by nearly a semitone. For precision work such as organ pipe voicing or ultrasonic transducer design, always use the actual room temperature when calculating expected resonant frequencies. Use the medium selector to pick a pre-set v, or match it to your measured temperature. You can verify the sound speed assumption with the speed of sound calculator.

Frequently Asked Questions

Why does a closed pipe sound an octave lower than an open pipe of the same length?
A closed pipe has its fundamental at λ = 4L (quarter-wavelength fits in the tube), while an open pipe has its fundamental at λ = 2L (half-wavelength fits). Same v, so f_closed = v/(4L) and f_open = v/(2L) — closed is half the frequency = one octave down. A stopped organ pipe at 16 cm sounds at the same pitch as an open organ pipe at 32 cm. Builders use this to save space in the bass range.
Why does a clarinet overblow a twelfth instead of an octave?
The clarinet body acts as an open–closed tube — closed at the reed (pressure antinode), open at the bell (pressure node). Only odd harmonics are present, so the next available register after the fundamental is the 3rd harmonic (3 × f₁), not the 2nd. A twelfth (octave + fifth) is the 3rd harmonic interval, so overblowing jumps a twelfth. The flute, oboe, and saxophone all overblow an octave because they behave as open–open tubes (the conical bore of oboe/sax makes them behave that way despite physical closure at the reed).
How much does end correction change the frequency?
For an open–open tube with L=50 cm and r=2 cm, the bare-formula f₁ = v/(2L) = 343 m/s / 1.0 m = 343 Hz. With end correction, L_eff = 50 + 2×1.2 = 52.4 cm, so f₁ = 343/1.048 = 327 Hz. That's about a 5% drop — perceptually almost a semitone. For thinner tubes (r small relative to L), the correction matters less; for wide flutes or organ pipes it's substantial. Toggle the checkbox to compare.
Does this work in water or other fluids?
Yes. The math is purely v/L, where v is the sound speed in the medium. In fresh water v ≈ 1480 m/s (about 4.3× air), so a 50 cm tube filled with water resonates 4.3× higher than the same tube in air. This matters for marine acoustics, ultrasonic transducers, and pipe organs with non-air fills (rare, but tested). The end-correction factor is the same shape function (~0.6·r) but with much smaller absolute effect because λ is longer relative to r in dense media.
Why are there only odd harmonics for open–closed tubes?
A closed end forces the pressure to be a maximum (antinode), an open end forces it to be a minimum (node). The boundary conditions together force the standing wave to start at a node, end at an antinode, and fit cleanly between — which requires an odd number of quarter-wavelengths. Even multiples of f₁ can't satisfy these conditions because they'd put a node where there must be an antinode. This is why a stopped pipe's spectrum is "hollower" — it lacks the even-harmonic richness of an open pipe.
Where do real instruments deviate from these idealized formulas?
Many places. Tone holes, mouth-hole geometry, bell flare, internal taper (conical vs cylindrical bore), reed compliance, and player lip pressure all modify the effective acoustic length and which harmonics dominate. The Levine–Schwinger correction is an idealized rigid-walled unflanged termination — actual instruments need corrections of 0.6 r to 0.85 r depending on bell shape, plus a "register-hole" correction when you uncover holes. Use this calculator for first-order estimates and resonator design; for instrument design, you'll want NMM (network model) software like OpenWInD.
Can I use this calculator for bass reflex / ported subwoofer port tuning?
Only partially. A ported subwoofer enclosure uses a Helmholtz resonator principle — the port (neck) acts as an oscillating air mass against the cabinet volume (compliance), not a simple quarter-wave tube resonance. However, some subwoofer designs do use a quarter-wave transmission-line port. For those, set the end condition to Open–Closed, enter the port tube length and radius, and check the resulting fundamental — that first odd harmonic should land at your target tuning frequency (typically 25–45 Hz for home subwoofers). For true Helmholtz-type ports, the formula is f = (v/2π) · √(A / (V · L_eff)), which requires a separate Helmholtz resonator calculator.
How does temperature affect the resonant frequency of a tube?
Directly: resonant frequency is proportional to the speed of sound, which rises with temperature at roughly 0.6 m/s per °C in air. At 0 °C, v ≈ 331 m/s; at 20 °C, v ≈ 343 m/s; at 40 °C, v ≈ 355 m/s. A flute at room temperature (343 m/s) versus a cold outdoor performance (331 m/s) will be sharp by about 35 cents — more than a third of a semitone. Orchestras tune at the performance temperature for this reason. In this calculator, select the appropriate medium or enter a custom speed to compensate for temperature in your design or measurement.
What is a Helmholtz resonator and is it the same as a tube resonance?
No. A Helmholtz resonator is a cavity (any shape) with a narrow neck — think a glass bottle. Its resonant frequency depends on the neck cross-sectional area (A), neck length (L), and cavity volume (V): f = (v/2π) · √(A / (V · L_eff)). This is a lumped-element resonance (the entire air mass in the neck moves as one), not a standing-wave tube mode. By contrast, the tube resonances in this calculator are distributed (pressure varies along the tube length). A beer bottle resonates around 100–200 Hz as a Helmholtz resonator when you blow across its mouth — the neck geometry dominates, not the bottle height. Guitar bodies, bass-reflex ports, and many acoustic traps exploit Helmholtz principles.