Abstract Passive acoustic monitoring of biodiversity is growing fast, as it offers an alternative to traditional aural point count surveys, with the possibility to deploy long‐term acoustic surveys in large and complex natural environments. However, there is still a clear need to evaluate how the frequency‐ and distance‐dependent attenuation of sound as well as the ambient sound level impact the acoustic detection distance of the soniferous species in natural environments over the diel cycles and across seasons. This is of great importance to avoid pseudoreplication and to provide relevant biodiversity indicators, including species richness, species abundance and species density. To address the issue of detection distance, we tested a field‐based protocol in a Neotropical rainforest (French Guiana, France) and in an Alpine coniferous forest (Jura, France). This standardized and repeatable method consists in a recording session of the ambient sound directly followed by an experiment using a calibrated white noise sound broadcast at different positions along a 100 m linear transect. We then used acoustic laws to reveal the basic physics behind sound propagation attenuation. We demonstrate that habitat attenuation in two different kinds of forests can be modelled by an exponential decay law with a linear dependence on frequency and distance. We also report that habitat attenuation, as first approximation, can be summarized by a single value, the coefficient of attenuation of the habitat. Finally, we show that the detection distance can be predicted knowing the contribution of each attenuation factor, the coefficient of attenuation of the habitat, the ambient sound pressure level and the amplitude and frequency bandwidth characteristics of the transmitted sound. We show that the detection distance mostly depends on the ambient sound and may vary by a factor of up to 5 over the diel cycle and across seasons. These results reinforce the need to take into account the variation of the detection distance when performing passive acoustic surveys and producing reliable biodiversity indicators.