What a spectrum is
Almost every sound is a mix of many frequencies at once. A spectrum takes that mix apart and shows how strong each frequency is. The math behind it is the fast Fourier transform (FFT), which converts a short slice of the microphone signal into levels per frequency.
This is a different question from "how loud is it?". For one overall level in decibels, use the decibel meter. The analyzer tells you where in the frequency range the sound sits.
How to read the display
- Horizontal axis: frequency, 20 Hz to 20 kHz. The axis is logarithmic, so each octave (a doubling of frequency) gets the same width. That matches how we hear pitch.
- Vertical axis: magnitude in dB. Higher means stronger. The values are relative to the microphone's digital full scale and are not calibrated sound pressure levels. See what is a decibel for the difference.
- Dominant frequency. The strongest peak, shown in hertz with its nearest musical note.
- Peak hold. Keeps the highest level reached at each frequency, which makes short or intermittent sounds easy to catch.
- Smoothing. Averages successive frames. More smoothing gives a steadier line for constant sounds. Less smoothing shows fast changes.
- Freeze. Pauses the display so you can read it.
- Spectrogram (waterfall). Shows frequency against time, with color for level. A steady tone draws a straight line, a siren draws a wave, and a click draws a stripe across all frequencies.
We ask the browser to switch off echo cancellation, noise suppression and automatic gain so they do not reshape the spectrum. Some browsers and devices still apply processing of their own. Details are on the methodology page.
Things you can find with it
Electrical hum
Mains hum sits at the power-line frequency: 60 Hz in North America and 50 Hz in most other countries. It usually comes with harmonics at multiples of that frequency (120 and 180 Hz, or 100 and 150 Hz), and the second harmonic is often the strongest. Because small microphones are weak at 50 to 60 Hz, look for the harmonics. A row of evenly spaced narrow peaks is the signature of hum.
Whistles, whines and feedback
A steady whistle shows up as one tall, narrow peak. Read the dominant frequency and you have a number to give a technician or enter in a notch filter. Microphone feedback looks the same but grows as you watch. It occurs at the frequency where the loop from speaker to microphone is strongest, so turning down that band on an equalizer, or moving the microphone, stops it.
An annoying tone you cannot place
Walk around with the spectrogram running. The line for the tone gets brighter as you get closer to the source. Use peak hold for sounds that come and go. To play the frequency back and compare by ear, enter it in the tone generator.
Room resonances
Rooms reinforce certain bass frequencies. Between two parallel walls, the lowest resonance is roughly the speed of sound divided by twice the distance: about 43 Hz for walls 4 m apart, with further resonances at multiples of that. Play a slow low-frequency sweep from the tone generator on your speakers, turn on peak hold, and the resonances appear as bumps.
FFT size and resolution, in plain words
The analyzer works on short slices of sound. The FFT divides the range from zero to half the sample rate into equally wide "bins", and the number of bins is half the FFT size. At a 48,000 Hz sample rate:
| FFT size (samples) | Bin width | Slice length |
|---|---|---|
| 2,048 | about 23 Hz | about 43 ms |
| 8,192 | about 5.9 Hz | about 171 ms |
| 32,768 | about 1.5 Hz | about 683 ms |
That is the trade-off: a larger FFT separates close frequencies better but needs a longer slice of sound, so it reacts more slowly. It also explains why the bass end of any analyzer looks coarse. With 23 Hz bins, 40 Hz and 60 Hz fall into neighboring bins, while the same bins are far finer than you need at 10 kHz. Browsers allow FFT sizes from 32 to 32,768 samples.
Microphone limits
- Frequency range. Phone and laptop microphones typically roll off below about 100 Hz and above about 10 kHz, and the exact shape differs by model. A weak reading at 40 Hz does not prove the sound is weak.
- Relative, not absolute. Trust the position of peaks more than their height.
- Overload. Very loud sound clips the microphone and creates false harmonics. Move further away if the whole display jumps up.
For what this means for level readings, see the accuracy page.
Sources
- MDN: AnalyserNode (FFT analysis, frequencyBinCount, smoothingTimeConstant)
- MDN: AnalyserNode.fftSize (allowed sizes 32 to 32,768)
- MDN: MediaTrackConstraints (echoCancellation, noiseSuppression, autoGainControl)
- ePanorama: Ground loop problems and how to get rid of them (mains hum and its harmonics)
- Sonarworks: Room modes (axial mode formula)
- Knowles: Frequency response and latency of MEMS microphones (low-frequency roll-off)
- HyperPhysics: Sensitivity of the human ear (20 Hz to 20,000 Hz)
Frequently asked questions
What does a spectrum analyzer show?
It shows how much sound energy is present at each frequency at this moment. Low frequencies (bass) are on the left, high frequencies (treble) on the right, and the height of the line is the level in decibels.
What is the difference between a spectrum and a spectrogram?
A spectrum is a snapshot: level against frequency right now. A spectrogram, or waterfall, adds time. It stacks snapshots so you can see how the frequencies change over several seconds.
How do I find the frequency of a noise?
Hold the microphone near the noise and read the dominant frequency. Turn on peak hold if the sound comes and goes, and use freeze to stop the display while you read it.
Is the audio recorded?
No. The analysis happens on your device and the audio is discarded immediately. Nothing is recorded, stored or uploaded.
Are the dB values real sound levels?
No. The vertical scale shows level relative to the microphone's digital full scale, which is useful for comparing frequencies with each other. For sound level in dB SPL, use the decibel meter.
Why does the display drop off at very low and very high frequencies?
Mostly because of the microphone. Phone and laptop microphones are built for speech and typically lose sensitivity below about 100 Hz and above about 10 kHz.
Updated