We analyse the spectrum of the Laplace operator in a complex geometry, representing a small Helmholtz resonator. The domain is obtained from a bounded set Ω ⊂ R n by removing a small obstacle Σ ε ⊂ Ω of size ε > 0. The set Σ ε essentially separates an interior domain Ω inn ε (the resonator volume) from an exterior domain Ω out ε , but the two domains are connected by a thin channel. For an appropriate choice of the geometry, we identify the spectrum of the Laplace operator: it coincides with the spectrum of the Laplace operator on Ω, but contains an additional eigenvalue μ −1 ε . We prove that this eigenvalue has the behaviour μ ε ≈ V ε L ε /A ε , where V ε is the volume of the resonator, L ε is the length of the channel and A ε is the area of the cross section of the channel. This justifies the well-known frequency formula ω HR = c 0 A/(LV) for Helmholtz resonators, where c 0 is the speed of sound.