# A-weighting and decibels explained > Decibels, A-weighting, and LAeq explained so your phone measurements mean something next to real-world noise limits. 2025-12-14 · 18 min read · sonarish, physics · by ntan (ntan) for uranashel Canonical HTML: https://uranashel.com/blog/a-weighting-decibels.html --- A decibel is not a unit of loudness the way a meter is a unit of length. It is a compression scheme for ratios. Double the acoustic power of a source and the level climbs about 3 dB; multiply the power by 10 and it climbs 10 dB. Ask listeners what a 10 dB jump sounds like and most report roughly twice as loud, which tells you the important part: hearing works on ratios, so the measuring scale is logarithmic too. Sonarish reports approximate sound pressure level in decibels, and for longer sessions it reports LAeq, the A-weighted equivalent continuous level that environmental regulations usually quote. I keep a mental list of decibel arguments I have watched go wrong. Nearly all of them trace back to one of three confusions: which reference the number is relative to, whether a frequency weighting was applied, and how long the energy was averaged. Everything below is organized around those three questions. ## Where the formula comes from Sound pressure level compares acoustic pressure against a reference of 20 µPa, the conventional threshold of human hearing at 1 kHz. Written out: `L_p = 20·log10(p/p0)` with `p0 = 20 µPa`. Why 20 in front of the logarithm instead of 10? Energy is the conserved quantity, and acoustic energy goes as pressure squared. Start from the power form `10·log10(p²/p0²)`, pull the exponent out of the logarithm, and the 10 becomes 20. Same law, one algebra step apart. The distinction bites when you read datasheets. Power quantities take a multiplier of 10 inside the level formula. Pressure amplitudes take 20. Mixing the two while converting between datasets leaves you silently wrong by 6 dB, which is a factor of 2 in amplitude and a factor of 4 in energy. I have watched that exact error survive review in a published spec sheet, so now I recompute it every time. For scale, 20 µPa is about 2 parts in 10 billion of atmospheric pressure. A quiet bedroom at night sits around 30 dB SPL. Normal conversation lands near 60 dB at 1 m, and pain arrives somewhere above 120 dB. That span covers 6 orders of magnitude in pressure and 12 in energy, which is why the logarithm exists: nobody wants a chart axis labeled in trillionths. ## Why frequency weighting exists Your ear does not treat all frequencies equally at moderate listening levels. Low rumble and very high hiss can carry substantial acoustic energy while intruding less than midrange content at the same unweighted level. A-weighting, standardized in IEC 61672, passes the signal through a filter approximating that sensitivity before any level is computed. Energy below about 500 Hz and above about 4 kHz is attenuated. The low end takes it hard: the standard curve sits at -19.1 dB at 100 Hz, -30.2 dB at 50 Hz, and -50.5 dB at 20 Hz, while between 1 and 4 kHz it stays within 1.3 dB of flat. A motorcycle passing at 80 dB on the unweighted Z-scale might read near 65 dB A-weighted. The physical pressure waveform is unchanged. The filter reflects how most listeners rank the intrusion, and that gap between physics and perception is why two different numbers for the same event can both be correct. Regulation follows perception. City noise ordinances, workplace exposure limits, and neighbor disputes cite A-weighted metrics: LAeq over 15 min, or LAFmax for the fastest-responding peak, where F names a 125 ms exponential time constant. Comparing a raw unweighted spectrum from a hobby app against a statute written in dBA, without applying the same filter, is the most common amateur mistake in this field. Sonarish applies A-weighting inside its energy integrator so session statistics line up with how regulations are written. Unweighted views remain available for machinery diagnosis, where low-frequency tones carry the information and discarding 19 dB at 100 Hz would be vandalism. A-weighting has siblings. C-weighting stays nearly flat from about 63 Hz to 4 kHz and appears in impulse metrics such as LCpeak, where the concern is mechanical damage to the ear rather than annoyance. Z means zero weighting, the raw signal. Every Sonarish chart states its weighting in the axis label so a forwarded screenshot keeps its meaning. ## Implementing the filter at 48 kHz On paper the A-curve is an analog transfer function: pole pairs at 20.6 Hz and 12194 Hz, single poles at 107.7 Hz and 737.9 Hz, normalized to 0 dB at 1 kHz. Sonarish captures at 48 kHz, so we map those poles into the digital domain with a bilinear transform and run the result as 3 cascaded biquad sections. Frequency warping near Nyquist bends the response around the 12 kHz pole. At 48 kHz the deviation stays under 0.2 dB across the band a phone microphone can honestly claim, which is fine for a meter that labels itself approximate. None of this runs inside the audio capture callback. That callback copies samples into a lock-free ring buffer and returns, following the no-malloc, no-locks rules in [life on the audio thread](https://uranashel.com/blog/dsp-audio-thread.html). The filter, the squaring, and the accumulation all live on a background processing queue. At these block sizes the filter itself costs almost nothing. ## LAeq and why peaks lie Instantaneous peak level is dramatic and often misleading. One door slam can flash a big number while contributing almost nothing to the energy that disturbs sleep across a whole night. LAeq over an interval T is defined as the constant level that would deliver the same total A-weighted energy as the real fluctuating signal did across that interval. Computationally you square the A-weighted pressure samples, average the squares over the interval, and evaluate `10·log10(mean(p_A²)/p0²)`; the square root hides inside the logarithm through the same factor-of-2 relationship as before. The whole accumulator fits in a screenful: ``` // A-weighted samples in pascals, fed per block // from the processing queue, never the capture callback var sumSquares = 0.0 var sampleCount = 0 func accumulate(_ block: [Float]) { for p in block { sumSquares += Double(p) * Double(p) } sampleCount += block.count } func currentLAeq() -> Double { let p0 = 20e-6 // 20 µPa let meanSquare = sumSquares / Double(sampleCount) return 10 * log10(meanSquare / (p0 * p0)) } ``` Sonarish lets you choose the integration window: 1 min for quick checks, 15 min for neighborhood noise logs, custom spans for factory walk-throughs. Running LAeq displays alongside short-term percentiles, where LA90 approximates the steady background and LA10 captures the intrusive stretches. The design reflects real use. People want to know whether the air conditioner grew louder over 3 years. The single loudest sample a gust of wind created answers nothing. ## Exposure limits and the 3 dB exchange Occupational health bodies write their limits in exactly these units. The NIOSH recommended exposure limit is **85 dBA as an 8-hour time-weighted average**, with a 3 dB exchange rate: every 3 dB added to the level halves the permissible duration, because 3 dB doubles the energy. So 88 dBA buys 4 hours, 91 dBA buys 2, and 100 dBA is down to 15 min. The bookkeeping is plain LAeq arithmetic. A phone app cannot certify a workplace and Sonarish does not pretend to. It can tell you that a table saw sits near 95 dBA at the operator position and that ear muffs cost less than the alternative. ## Phone microphones and honest labeling Professional class-1 sound level meters cost thousands of dollars because their capsules, preamps, and calibration chains are traceable to national standards. A phone microphone is optimized for voice calls and voice assistants. Its capsule was picked for cost, echo-cancellation behavior, and surviving a pocket, and the OS may apply automatic gain unless the raw measurement route is requested explicitly. None of that makes the hardware useless. It makes the hardware something you calibrate and then describe honestly. We apply a factory offset calibration using reference tones and offer an optional field check: clap at a known distance, compare against a trusted meter if you own one. That tightens typical error into roughly ±2 to 4 dB. Bench note from the lab: 4 phones, 2 iOS and 2 Android, ran 45 min of pink noise stepped from 50 to 90 dB SPL against a class-2 reference meter; raw readings spread 5.8 dB across devices, per-model offsets pulled the spread under ±2 dB, and monthly spot checks over 6 months drifted less than 1 dB. That is sufficient to answer whether this HVAC unit is louder than last month and insufficient to prove compliance in a legal dispute. The UI labels every reading as approximate SPL, permanently. If you log outdoors, shield the port from wind. A-weighting removes most wind rumble from the reported number while the capsule still sees the full pressure swing, so a reading can look calm while the analog front end is close to overload. ## dBFS is a different animal Digital full scale, written dBFS, measures how close a recording sits to the largest value the analog-to-digital converter can represent. 0 dBFS means clipping. Everything below is headroom. The number says nothing about absolute acoustic pressure in the room, because the mapping between the two depends on microphone sensitivity and every gain stage in between. A typical phone MEMS capsule places 94 dB SPL somewhere near -38 dBFS and overloads acoustically around 120 dB SPL, and both figures shift per model. Voice Memos showing -6 dBFS tells you the recording is hot. It tells you nothing about whether the apartment measures 60 dB A-weighted. Never compare dBFS exports to a municipal noise law written in dBA; the units do not describe the same physical quantity, and no conversion exists without a calibration step. Our [FFT post](https://uranashel.com/blog/fft-made-readable.html) covers the spectral views these level numbers sit on top of, and [machine baseline comparison](https://uranashel.com/blog/machine-fault-baseline.html) shows how calibrated level differences reveal mechanical change over months. The meter itself ships in [Sonarish](https://uranashel.com/apps/sonarish.html), which runs everything on-device and never uploads audio. --- uranashel · [Home](https://uranashel.com/) · [Apps](https://uranashel.com/apps.html) · [Lab](https://uranashel.com/lab.html) · [About](https://uranashel.com/about.html) · [Blog](https://uranashel.com/blog/) · [Developers](https://uranashel.com/developers/) · [API docs](https://uranashel.com/docs/) · [Privacy](https://uranashel.com/privacy.html) Machine-readable: [llms.txt](https://uranashel.com/llms.txt) · [sitemap.xml](https://uranashel.com/sitemap.xml) · [openapi.json](https://uranashel.com/openapi.json) · [API](https://uranashel.com/api/v1/)