Helmholtz resonator volume calculator
Pick the pitch and the neck, and get the cavity to build: 100 Hz with a neck of 0.000314 m² by 0.05 m in air at 343 m/s needs 0.001871492742 m³. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Frequency
- 100
- Neck area
- 0.000314
- Neck length
- 0.05
- Sound speed
- 343
- Volume
- 0.0018714927
A Helmholtz resonator is a cavity of volume V that communicates with the outside air through a short neck of cross-sectional area A and length L. At low frequency the air in the neck behaves like a mass and the cavity like a spring, so the system resonates at a single dominant frequency. Designers of bass traps, bottle resonators, engine intake silencers, and classroom demos often know the pitch they want and the neck they can build, and must size the cavity to match. This Helmholtz resonator volume calculator inverts the classical formula for that volume: V equals A times c squared divided by four pi squared times f squared times L, where f is the target frequency and c is the speed of sound in the fluid. Send positive finite numbers for frequency, neck area, neck length, and sound speed; the pure parse module returns the cavity volume in consistent cubic units.
What the Helmholtz volume formula means physically
In the classical lumped-element model the neck air slug has effective mass proportional to density times area times length, while the cavity compliance is proportional to volume over density times sound speed squared. Combining mass and compliance yields a natural frequency f equal to c over two pi times the square root of A over V times L. Solving for the unknown cavity volume gives V equals A times c squared over four pi squared times f squared times L.
Raising the target frequency shrinks the required volume roughly as one over f squared: a resonator tuned an octave higher needs about one quarter the cavity for the same neck. A larger neck area or a shorter neck raises the resonance for a fixed cavity, so the inverted formula grows V when A grows and shrinks V when L grows.
Sound speed c appears squared: humid warm air with a slightly higher c needs a modestly larger cavity for the same pitch than cold dry air if you hold A, L, and f fixed. The model assumes wavelengths much longer than the cavity dimensions, a rigid wall, and a neck that is not too short compared with its diameter; when those assumptions fail, end corrections, higher modes, and radiation damping matter and this simple volume is only a first sizing step.
Where sizing the cavity pays off
Acoustic consultants size wall-mounted bass absorbers by picking a target low frequency, a practical neck geometry, and room air sound speed, then need a cavity volume that construction can hit within a few percent. Product teams that ship bottle-style resonators or speaker ports use the same inversion when they lock a pitch and a neck and must report cavity litres to tooling.
Undergraduate labs measure bottle resonance with a phone spectrum app and back-calculate either volume or effective neck length; a deterministic oracle that only solves for V keeps student notebooks honest when A, L, f, and c are known. Failed validation does not consume balance. Keep requests small, pin the rounded volume in tests, and you get reproducible cavity sizing for homework, LMS plugins, and edge workers without standing up a full acoustic finite-element stack for a single closed-form inversion.
What you can do with it
Bass trap and room acoustic design
Size cavity volume for a wall Helmholtz absorber given target bass frequency, neck area, neck length, and room sound speed.
Bottle and port resonator prototyping
Lock a pitch and neck geometry, then compute the cavity volume manufacturing or 3D printing must hit for the desired resonance.
FAQ
How is Helmholtz resonator volume calculated?
Send positive finite frequency f (Hz), neck area A, neck length L, and sound speed c.
What units should I use?
Use any consistent set: metres, m², Hz, and m/s yield volume in m³. If you work in centimetres, keep area in cm² and sound speed in cm/s so volume comes out in cm³.
Should I include neck end correction?
This calculator uses the length you provide as L.
What if frequency, area, length, or sound speed is zero or negative?
All four inputs must be strictly positive finite numbers; zero and negative values are rejected and not billed.
How does the cavity volume change if I raise the target frequency?
It shrinks roughly as one over the frequency squared. A resonator tuned an octave higher needs about a quarter of the cavity for the same neck.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/optics/helmholtz-resonator-volume \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"frequency":100,"neck_area":0.000314,"neck_length":0.05,"sound_speed":343}'const res = await fetch("https://api.kit.forhosting.com/optics/helmholtz-resonator-volume", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"frequency": 100,
"neck_area": 0.000314,
"neck_length": 0.05,
"sound_speed": 343
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/optics/helmholtz-resonator-volume",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"frequency": 100,
"neck_area": 0.000314,
"neck_length": 0.05,
"sound_speed": 343
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/optics/helmholtz-resonator-volume", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"frequency":100,"neck_area":0.000314,"neck_length":0.05,"sound_speed":343}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"frequency":100,"neck_area":0.000314,"neck_length":0.05,"sound_speed":343}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/optics/helmholtz-resonator-volume", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"frequency": 100,
"neck_area": 0.000314,
"neck_length": 0.05,
"sound_speed": 343
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "optics.helmholtz_resonator_volume",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What the Helmholtz volume formula means physically
This capability does not apply end corrections for you—if you use an effective neck length L_eff equals L plus a term proportional to the neck radius, pass that effective length as neck_length so the same formula still applies.
Input contract, response shape, and error behaviour
Numeric strings are accepted. Do not mix unit systems inside one request. POST a JSON body with four required finite numbers: frequency (or aliases f, target_frequency, f0, resonant_frequency) in hertz; neck_area (aliases A, area, neck_cross_section) in square metres or any consistent length squared unit; neck_length (aliases L, length, neck_len) in the matching length unit; and sound_speed (aliases c, speed_of_sound, speed) in length per time, typically metres per second. Empty strings, missing fields, non-finite values, zero, and negative values fail with invalid_input naming the field and are not billed. On success the body echoes frequency, neck_area, neck_length, and sound_speed rounded to twelve decimal places for stable goldens, returns volume with the same rounding, includes the formula string V equals A times c squared over four pi squared times f squared times L, and a unit_hint explaining that volume is length cubed when A, L, f, and c are consistent.
Where a Helmholtz volume API earns its keep
Simulation notebooks that sweep target frequency or neck area can call this pure parse endpoint once per design point instead of re-deriving the algebra.
Integration use cases
Labs and design notebooks
Call a deterministic parse API while sweeping f or neck dimensions so scripts get a stable V without embedding symbolic algebra.
Technical questions
What does the Helmholtz resonator volume calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.