Quick conversions for everyday DSP work. Power ratios use 10·log10, amplitude (voltage) ratios use 20·log10. The ADC figure is the ideal quantization SNR for a full-scale sine, 6.02·N + 1.76 dB.
Ratio → decibels
Decibels → ratio
ADC bits → dynamic range
Sample rate, FFT size and duration
Decibels: 10 log or 20 log?
A decibel compares two quantities on a log scale. Use 10·log10 for power-like quantities (watts, energy, power spectral density) and 20·log10 for amplitude-like quantities (voltage, current, pressure, sample values):
The two agree because power is proportional to amplitude squared: \(10\log_{10}(A^2) = 20\log_{10}(A)\). So the same signal change gives the same number of dB either way.
| Change | Power ratio | Amplitude ratio |
|---|---|---|
| +3.01 dB | ×2 | ×1.414 |
| +6.02 dB | ×4 | ×2 |
| +20 dB | ×100 | ×10 |
| −3 dB | ×0.501 | ×0.708 |
| −6 dB | ×0.251 | ×0.501 |
ADC bits and dynamic range
An ideal N-bit converter digitizing a full-scale sine has a signal-to-quantization-noise ratio of:
Each extra bit doubles the number of levels, which is 20·log10(2) = 6.02 dB. The 1.76 dB comes from the ratio of a full-scale sine’s power to uniform quantization noise. We checked the formula by quantizing a sine to 16 bits in NumPy: the measured SNR was 98.08 dB, matching 6.02 × 16 + 1.76.
| Bits | Ideal SNR |
|---|---|
| 8 | 49.92 dB |
| 12 | 74.00 dB |
| 16 | 98.08 dB |
| 24 | 146.24 dB |
Real converters fall short of these figures because of thermal noise, jitter and nonlinearity. Datasheets give the measured value as SNR, SINAD or ENOB (effective number of bits).
Sample rate, FFT size and duration
The last calculator gives the numbers you need when planning a capture:
- Nyquist frequency: fs/2
- Sample period: 1/fs
- FFT bin spacing: fs/N
- Frame length: N/fs
- Samples in a recording: fs × duration
Example: 48 kHz with N = 1,024 gives a 24 kHz Nyquist frequency, a 20.833 µs sample period, 46.875 Hz bins and 21.33 ms frames. Try other settings in the FFT visualizer.
FAQ
Is −3 dB half or 70.7 %?
Both, depending on what you measure. −3 dB is half the power and about 70.7 % of the amplitude. That is why a filter’s “−3 dB cutoff” is where the output voltage falls to about 0.707 of the input.
What does dBFS mean?
Decibels relative to full scale. 0 dBFS is the largest value the converter or number format can hold, so digital levels are negative: −6 dBFS is about half the full-scale amplitude.
Why is it about 6 dB per bit?
One more bit doubles the number of quantization levels and halves the step size, which halves the noise amplitude. A factor of 2 in amplitude is 20·log10(2) ≈ 6.02 dB.
Can a negative ratio be converted to dB?
No. The logarithm is only defined for positive numbers. A negative amplitude just means inverted phase; take the magnitude first.
References
- Lyons, R. G., Understanding Digital Signal Processing, 3rd ed., Prentice Hall, 2011, appendix on decibels.
- Analog Devices, MT-001 tutorial, “Taking the Mystery out of the Infamous Formula, SNR = 6.02N + 1.76 dB”.