Decibels to gain, explained for mixing and game audio
Free kit: Free Cozy Audio kit bundles this with the other tools you need.
Every fader in a DAW, every volume knob in OBS and every audio mixer in a game engine speaks in decibels. But the code in your game, the gain value in a plugin, or the slider in your settings menu often works in plain multipliers from 0 to 1. Converting between the two is simple once you know the formula, and it explains a lot of puzzling behavior, like why a volume slider seems to do nothing for most of its travel and then everything at the bottom.
Decibels are ratios
A decibel value describes a ratio, not an absolute amount. When a fader says -6 dB, it means "this signal at about half the amplitude it had at 0 dB." 0 dB means "unchanged," positive values are louder and negative values are quieter.
The formulas
For audio signal levels (amplitude), which is what faders, gain knobs and sample values use:
- Gain = 10^(dB / 20)
- dB = 20 x log10(gain)
Some sources use 10 instead of 20. That version is for power ratios. For gain on audio signals, use 20.
A quick reference table
- +6 dB = about 2.0 (double amplitude)
- +3 dB = about 1.41
- 0 dB = 1.0 (unchanged)
- -3 dB = about 0.708
- -6 dB = about 0.501 (half amplitude)
- -12 dB = about 0.251 (a quarter)
- -20 dB = 0.1 (a tenth)
- -40 dB = 0.01
- -60 dB = 0.001
The handy rule: every 6 dB is roughly a doubling or halving of amplitude, and every 20 dB is a factor of 10. The dB to gain calculator converts any value both ways.
Worked example 1: a plugin that wants a multiplier
You want to turn a sound effect down by 9 dB, and your engine's play function takes a volume from 0 to 1.
Gain = 10^(-9 / 20) = 10^(-0.45) = 0.355.
Set the volume to 0.355. Check the other way: 20 x log10(0.355) = 20 x (-0.45) = -9 dB.
Worked example 2: why linear volume sliders feel wrong
A settings menu has a slider from 0 to 1, and the code multiplies the audio by the slider value directly.
- Slider at 0.5: 20 x log10(0.5) = -6.0 dB
- Slider at 0.25: 20 x log10(0.25) = -12.0 dB
- Slider at 0.1: 20 x log10(0.1) = -20 dB
So the whole top half of the slider covers only 6 dB, a fairly modest change in perceived loudness, while the bottom tenth covers everything from -20 dB down to silence. Players feel the slider "does nothing, then suddenly drops."
The fix: map the slider to decibels instead. For example, map 0 to 1 onto -40 dB to 0 dB, then convert:
- dB = -40 + (slider x 40)
- Gain = 10^(dB / 20)
- Treat slider 0 as true silence (gain 0).
At slider 0.5, dB = -40 + 20 = -20 dB, gain 0.1. Now each step of the slider changes loudness by a similar amount. Many game engines, including mixers in common engines, already work in dB; when you connect a 0 to 1 UI slider to a dB mixer parameter, use dB = 20 x log10(slider), with a floor such as -80 dB for slider 0.
Adding sounds together
When two sounds play at once, levels don't simply add in dB:
- Two identical, in-phase copies sum to +6 dB (amplitude doubles).
- Two different, unrelated sounds at equal level sum to about +3 dB (power doubles).
That's why stacking ten copies of the same footstep at once can clip, and why randomizing pitch or start time on repeated sounds helps them sit more naturally. For game audio, plan headroom on your master bus. A limiter on the master gives a safety net.
Headroom and bit depth
Digital audio clips at 0 dBFS (decibels relative to full scale): anything above it is cut off and distorts. That's why most recording advice says to leave headroom, with peaks well below 0 dBFS. Each bit of depth adds about 6 dB of dynamic range, which gives about 96 dB for 16-bit and about 144 dB for 24-bit in theory. The sample rate and bit depth chart lists common formats.
dB, loudness and LUFS
Decibels on a fader describe level, not how loud something sounds. Two sounds at the same peak level can feel very different in loudness, because our hearing depends on frequency and duration. For final loudness targets for YouTube, podcasts and streams, use LUFS; see loudness and LUFS explained in plain words.
Hear it for yourself
Play a steady tone with the tone generator at a comfortable, low volume, then drop it by 6 dB, then by another 6. Notice how each step sounds like a similar change, even though the amplitude halves each time. That's why dB is the natural unit for audio controls. Keep test tones quiet, especially on headphones.