Compressor Ratio Calculator
Determine the output level of a dynamics compressor given an input level, threshold, and ratio. Use this when setting up compression in mixing to predict exactly how much a signal will be attenuated.
About this calculator
A compressor reduces the dynamic range of audio by attenuating signals that exceed a set threshold. The output level depends on whether the input is above or below the threshold. When the input is below the threshold, the signal passes through unaffected. When it exceeds the threshold, only a fraction of the excess is passed: outputDb = threshold + (inputDb − threshold) / ratio. For example, with a 4:1 ratio and a threshold of −20 dB, an input of −10 dB (10 dB above threshold) results in an output of −20 + (10/4) = −17.5 dB. The gain reduction is the difference between the input and output levels: GR = inputDb − outputDb. The formula Math.max(inputDb, threshold + (inputDb − threshold) / ratio) ensures that signals below the threshold are returned unchanged.
How to use
Say your input level is −5 dB, your threshold is −20 dB, and your ratio is 4:1. First, check if the input exceeds the threshold: −5 dB > −20 dB, so compression applies. Calculate the compressed output: −20 + (−5 − (−20)) / 4 = −20 + 15 / 4 = −20 + 3.75 = −16.25 dB. The gain reduction is −5 − (−16.25) = 11.25 dB of attenuation applied. Compare this to an input of −25 dB (below threshold): Math.max(−25, −20 + (−5)/4) = Math.max(−25, −21.25) = −21.25 dB — wait, −25 dB is below threshold so output is −25 dB unchanged.
Frequently asked questions
How does compression ratio affect the output level of an audio signal?
The compression ratio determines how many dB the input must rise above the threshold to produce a 1 dB rise in output. A 4:1 ratio means a 4 dB increase above threshold yields only 1 dB increase at the output. Higher ratios (e.g., 10:1 or higher) approach limiting behavior, where the output barely moves no matter how hard you push the input. Lower ratios like 2:1 produce gentle, transparent compression suitable for gluing a mix together.
What is the difference between a compressor threshold and a compressor ratio?
The threshold sets the level at which compression begins — signals below it are unaffected, signals above it get compressed. The ratio defines how aggressively those above-threshold signals are reduced. Think of the threshold as the 'on switch' and the ratio as the 'intensity dial.' Together they define the shape of the compressor's transfer curve. Changing the threshold shifts where compression kicks in; changing the ratio alters how much the dynamic range is narrowed.
How do I calculate gain reduction from a compressor in dB?
Gain reduction (GR) is the difference between the uncompressed input level and the compressed output level: GR = inputDb − outputDb. Using the compressor formula, first find the output: outputDb = threshold + (inputDb − threshold) / ratio. Then subtract: GR = inputDb − outputDb. For example, with an input of −5 dB, threshold of −20 dB, and ratio of 4:1, the output is −16.25 dB and the gain reduction is −5 − (−16.25) = 11.25 dB. This tells you exactly how much the compressor is working.