Drag and drop audio file here
or
Supported: WAV, MP3, AIFF, FLAC, OGG, M4A
Your audio never leaves your device
by Jeremy Le Grand
EBU R128 / ITU-R BS.1770 Loudness Measurement
100% Private — Runs entirely in your browser. Your audio is never uploaded or stored.
Drag and drop audio file here
or
Supported: WAV, MP3, AIFF, FLAC, OGG, M4A
Your audio never leaves your device
This tool runs entirely in your browser. Your audio files are never uploaded to any server, never stored anywhere, and never leave your device. The analysis happens locally using the Web Audio API — it's 100% safe for unreleased tracks and sensitive material.
LUFS (Loudness Units relative to Full Scale) measures perceived loudness, not just peak levels. Streaming platforms like Spotify, Apple Music, and YouTube normalize audio to specific LUFS targets to ensure consistent playback volume across all tracks.
Here's a simplified overview of how LUFS calculation works conceptually.
First, we apply K-weighting to simulate human hearing. This uses two biquad filters in series:
// Conceptual K-weighting pipeline:
//
// 1. HIGH-SHELF BOOST
// - Boost frequencies above ~1500Hz by ~4dB
// - Models how our ears are more sensitive to mid-highs
//
// 2. HIGH-PASS FILTER
// - Roll off frequencies below ~40Hz
// - We don't perceive very low bass as "loud"
//
// Audio flows through both filters in sequence:
// raw_audio → high_shelf → high_pass → k_weighted_audio
After K-weighting, we calculate the mean square power for each 100ms block:
// For each 100ms block of K-weighted audio:
//
// 1. Square every sample value
// (negative values become positive, loud = bigger numbers)
//
// 2. Calculate the average (mean) of all squared values
// mean_square = sum_of_squares / num_samples
//
// 3. Convert to decibels using logarithmic scale
// lufs = offset + 10 × log₁₀(mean_square)
//
// The offset value comes from ITU-R BS.1770 spec
// to calibrate the scale correctly
This is what makes LUFS different from simple RMS. We apply two gates to ignore silence:
// Two-pass gating algorithm:
//
// PASS 1 - ABSOLUTE GATE
// └─ Remove any block quieter than -70 LUFS
// (this is basically silence or noise floor)
//
// PASS 2 - RELATIVE GATE
// └─ Calculate average of remaining blocks
// └─ Remove blocks that are 10 LU quieter than average
// (this excludes quiet passages like intros/outros)
//
// FINAL RESULT
// └─ Average the surviving blocks
// └─ This is your Integrated Loudness value
Sample peaks can miss inter-sample peaks. We use quadratic interpolation to find the real maximum:
// True Peak detection concept:
//
// Digital audio = discrete samples (like frames in a video)
// Real audio = continuous wave
//
// Problem: Peak might occur BETWEEN samples!
//
// sample[n-1] sample[n] sample[n+1]
// • • •
// \ / \ /
// \ ? / \ /
// \ ↑ / \ /
// \ TRUE PEAK \ /
// \_____|_______\___/
//
// Solution: Use interpolation to estimate the curve
// between samples and find the actual maximum.
//
// Convert final peak to dBFS (decibels below full scale)
// THE COMPLETE ANALYSIS PIPELINE
// ══════════════════════════════
//
// ┌─────────────────────────────────────────────┐
// │ AUDIO FILE (WAV, MP3, FLAC, etc.) │
// └─────────────────┬───────────────────────────┘
// ▼
// ┌─────────────────────────────────────────────┐
// │ 1. DECODE → Raw PCM samples │
// └─────────────────┬───────────────────────────┘
// ▼
// ┌─────────────────────────────────────────────┐
// │ 2. K-WEIGHT → Filter to match human ears │
// └─────────────────┬───────────────────────────┘
// ▼
// ┌─────────────────────────────────────────────┐
// │ 3. BLOCK → Split into 100ms chunks │
// │ Calculate power for each block │
// └─────────────────┬───────────────────────────┘
// ▼
// ┌─────────────────────────────────────────────┐
// │ 4. GATE → Remove silence & quiet parts │
// │ Average remaining → INTEGRATED LUFS │
// └─────────────────┬───────────────────────────┘
// ▼
// ┌─────────────────────────────────────────────┐
// │ 5. WINDOWS → Find loudest 400ms, 3s spans │
// │ 6. TRUE PEAK → Interpolate max amplitude │
// └─────────────────────────────────────────────┘
You know how some songs on your playlist are SUPER LOUD and others are quiet, so you're always reaching for the volume button? That's annoying, right?
LUFS is basically a "loudness score" that helps fix this. It's like giving every song a grade based on how loud it feels to your ears - not just how big the sound waves are.
Imagine you're at a party. Someone pops a balloon - BANG! - that's a huge spike, but it's over in a split second.
Now imagine everyone talking at once for an hour. That constant chatter actually feels louder even though no single moment was as loud as the balloon pop.
LUFS measures the "constant chatter" kind of loudness, not just the balloon pops. That's why it's better for music!
Your ears are weird. They don't hear all sounds equally:
High sounds (like a whistle) seem louder to you.
Low sounds (like a bass drum) seem quieter even when they're not.
K-weighting is like putting on "ear goggles" so the computer hears music the same way you do. It boosts the highs and reduces the lows before measuring.
Imagine you're measuring how loud a rock concert is. Do you count the silence between songs? What about when the singer whispers for dramatic effect?
Gating means we ignore the quiet parts. If a section is basically silence (below -70 LUFS), we skip it. If a section is way quieter than the rest of the song, we skip that too.
This way, the "loudness score" reflects how loud the actual music is, not how much silence there is.
Digital audio is like a flip-book animation - a bunch of snapshots really close together. But what if the loudest moment happens between two snapshots?
True Peak is like using a magnifying glass to look between the snapshots and find those hidden loud moments. If we miss them, your speakers might make a crackling sound (called "clipping") when playing the song.
Remember that annoying thing where some songs are too loud and others too quiet?
Streaming services fix this by checking every song's LUFS score. If a song is too loud, they turn it down. If it's too quiet, they... well, they usually leave it alone (so artists are encouraged to hit the target).
The magic number is usually -14 LUFS. If your song measures -14, Spotify won't change it at all. If it's -8 (too loud), they'll turn it down by 6 points.
That's why music producers check LUFS before releasing songs - so their music sounds exactly how they intended!