What is a dB?

When you look at the specs of a lot of different electronics products - from audio gear to antennas to cable modems - you see the term "dB" all over the place. A dB is a decibel.

A dB started as a way of measuring the loudness of sounds. Over time it evolved into a way of measuring the ratio of amplitude of any 2 signals. And that's the most concise, general and accurate definition I can think of:
A dB is a ratio of the amplitudes of any 2 signals.
Here, "signal" means any kind of waveform. Often a sound we hear, but it can be a purely electronic signal like a radio wave.

So what is a dB? The definiton depends on whether you're measuring Voltage or Power:
Power: dB = 10 * log(P1 / P2)
Voltage: dB = 20 * log(V1 / V2)
In the above, P1 and P2 are power levels, V1 and V2 are voltage levels.

Example: how many dB is twice the power output? In this case, P1/P2 = 2.
10 * log(2) = 3.01 dB
That means 3 dB more power is twice the power.

Example: how many dB is twice the voltage? In this case, V1/V2 = 2.
20 * log(2) = 6.02 dB
That means 6 dB more voltage is twice the voltage.

Now, you might ask, why is the definition for Power different from for Voltage? Having 2 different definitions seems to only create confusion. The reason is to simplify how the units are expressed.

Example: suppose we double the voltage input to an amplifier driving a speaker. How much will the power increase?
If we double the voltage, that's about 6 dB (actually, 6.02 dB) more voltage. Power is voltage * current (or current squared * impedance). Suppose the speaker's impedance is constant. Then twice the voltage draws twice the current, so we have 4 times as much power. That is, doubling the voltage input requires 4 times the power! How much power is this in dB?
10 * log(4) = 6.02 dB
This is exactly the same DB by which the voltage increased. Now you know why the formula is different for voltage and power. If it were the same, then a 6 dB increase in voltage would make a 12 dB increase in power. The formulas are different to simplify things - the dB is the same.

Put differently, a power dB is bigger than a voltage dB.
1 dB of power change is about 26%.
How do we know this? 10 * log(x) = 1 ---> x = 1.26
1 dB of voltage change is about 12%.
How do we know this? 20 * log(x) = 1 ---> x = 1.12

Question: How loud is "twice as loud"? The answer is subjective, but generally agreed that 10 dB is perceived to be "twice as loud".

Question: How much power does my amplifier need? Knowing every 10 dB is twice as loud, we can figure it out. Suppose your speaker efficiency is 92 dB / 1 watt @ 1 meter. This is typical of many conventional speakers. That means 1 watt of power will make a sound at 92 decibel sound pressure level measured 1 meter away. Suppose you have a 100 watt amplifier. How much louder will my speaker go?
We compute 10 * log(100 / 1) = 20 dB louder. That's about 4 times as loud - every 10 dB is twice as loud. We started at 92 decibels, so now we're at 112 decibels. That is VERY loud.

Now what if the speaker efficiency was only 86 dB / 1 watt / 1 meter? Well, 100 watts is still 20 dB louder, so now we have 106 dB. This is still pretty loud, but transient dynamic peaks like cymbal crashes might reach this level under normal listening. It's still 4 times as loud as it started, but it started from a quieter level because the speaker was less efficient.

Note: the above is simplified by assuming the speaker impedance is relatively high and constant. The amplifier might not be able to produce its rated power into speakers that don't meet this assumption.

Question: How much louder is an amp with 400 watts per channel, compared to 100 watts per channel? Here, the power ratio is 400 / 100 = 4.
10 * log(4) = 6.02 dB
So the 400 watt amp is less than twice as loud. That makes sense when you remember that every 10x increase in power is perceived as twice as loud, and here the power increase is 4x.

Question: My amp says it has 2 dB of headroom. What does that mean? It means it can output 2 dB more than its continuous power rating, but only for brief moments. How much more power is that? It's 58% more power.
10 * log(x) = 2 dB ---> x = 1.58
If your amp is rated at 100 watts and has 2 dB of headroom, it can output 158 watts for a brief moment. A 400 watt amp with 2 dB of headroom can output 632 watts for a brief moment.

Question: Suppose your CD player says it has 0.01 % total harmonic distortion. What is that in dB? We are in voltage land, not power, and 0.01% represents a ratio of 0.0001.
20 * log(0.0001) = -80 dB
That means distortion is about 80 dB quieter than the signal. Based on the above formula, every reduction of distortion by a factor of 10 reduces the noise by 20 dB. That is:
0.001% distortion is -100 dB.
0.1% is -60 dB.
1% is -40 dB.

Question: my antenna says it has 12 dB of gain. What does that mean? Antenna gain is voltage. What is 12 dB of voltage?
20 * log(x) = 12 ---> x = 3.98
This means the antenna quadruples the amplitude of signals in the frequency range it is designed to receive.