The decibel (dB) is not a fixed unit like a volt or a watt; it is a logarithmic ratio. The exact formula for dB depends entirely on whether you are measuring power (watts) or field quantities like voltage and current. Using the wrong multiplier (10 vs. 20) is the most common bench mistake in RF and audio engineering, instantly doubling your calculated error.
For power ratios, the formula is 10 × log₁₀(P₂/P₁). For voltage or current ratios across equal impedances, the formula is 20 × log₁₀(V₂/V₁). Below is the complete derivation, symbol mapping, rearranged algebra, and strict unit-tracked examples to lock in the math.
The Core Formula for dB: Power vs. Voltage
The reason we use two different multipliers (10 and 20) comes directly from Joule's first law. Power is proportional to the square of voltage (P = V²/R). When you take the base-10 logarithm of a squared term, the exponent moves to the front: log₁₀(x²) = 2 × log₁₀(x). Multiplying that by the base power factor of 10 gives us 20. This derivation holds only when input and output impedances are identical.
Symbol Definition and Assumptions
| Symbol | Definition | Standard Unit | Assumptions & Constraints |
|---|---|---|---|
| LdB | Level or Gain/Loss in decibels | dB (dimensionless) | Positive = gain, Negative = loss/attenuation |
| P₁ | Input or Reference Power | Watts (W) | Must be same unit as P₂ before dividing |
| P₂ | Output or Measured Power | Watts (W) | Must be > 0 (log of zero is undefined) |
| V₁ | Input or Reference Voltage | Volts (V) | Assumes RMS for AC; DC is absolute |
| V₂ | Output or Measured Voltage | Volts (V) | Must be same unit as V₁ before dividing |
| Z₁, Z₂ | Input and Output Impedance | Ohms (Ω) | Must be equal (Z₁ = Z₂) to use the 20× formula |
Rearranged Forms: Solving for the Missing Variable
On the bench, you rarely just calculate dB. Usually, you know the amplifier's dB gain and the input signal, and you need to find the absolute output voltage to ensure you aren't clipping an ADC. Here are the algebraic rearrangements for both domains.
Power Domain (10× Rule)
- Solve for Output Power (P₂): P₂ = P₁ × 10(LdB/10)
- Solve for Input Power (P₁): P₁ = P₂ / 10(LdB/10)
Voltage Domain (20× Rule)
- Solve for Output Voltage (V₂): V₂ = V₁ × 10(LdB/20)
- Solve for Input Voltage (V₁): V₁ = V₂ / 10(LdB/20)
Worked Examples with Strict Unit Tracking
Abstract formulas fail when units clash. These three examples track units at every step to prevent scaling errors.
Problem 1: RF Amplifier Power Gain
Scenario: An RF low-noise amplifier (LNA) has an input power of 2 mW and an output power of 600 mW. What is the gain in dB?
- Identify formula: Power is given, so use LdB = 10 × log₁₀(P₂ / P₁).
- Check units: Both are in milliwatts (mW). The ratio will cancel the units, so no conversion to Watts is strictly necessary, but we will track it.
- Substitute: LdB = 10 × log₁₀(600 mW / 2 mW)
- Calculate ratio: 600 / 2 = 300 (dimensionless).
- Apply log: log₁₀(300) ≈ 2.4771
- Multiply: 10 × 2.4771 = 24.77 dB
Problem 2: Audio Line Attenuation (Voltage)
Scenario: A pro-audio mixing console outputs +4 dBu (1.228 V RMS). After passing through a long cable run, the measured voltage at the amplifier input is 0.316 V RMS. What is the cable attenuation?
- Identify formula: Voltage is given across matched 600 Ω audio impedances, so use LdB = 20 × log₁₀(V₂ / V₁).
- Substitute: LdB = 20 × log₁₀(0.316 V / 1.228 V)
- Calculate ratio: 0.316 / 1.228 ≈ 0.2573
- Apply log: log₁₀(0.2573) ≈ -0.5895
- Multiply: 20 × -0.5895 = -11.79 dB (The negative sign confirms attenuation/loss).
Problem 3: Using Rearranged Forms for Microcontroller ADC Scaling
Scenario: You are feeding a signal into an ESP32 ADC. The input signal is 0.5 V. You pass it through an op-amp stage with a known voltage gain of 14 dB. What is the output voltage hitting the ESP32 pin?
- Identify formula: We need V₂, so use V₂ = V₁ × 10(LdB/20).
- Substitute: V₂ = 0.5 V × 10(14/20)
- Simplify exponent: 14 / 20 = 0.7
- Calculate power: 100.7 ≈ 5.0118
- Multiply: 0.5 V × 5.0118 = 2.506 V
Bench Note: 2.506 V is dangerously close to the ESP32's 2.5 V ADC saturation limit on some dev boards. You would need to add a voltage divider or lower the op-amp gain to prevent clipping.
Unit Mistakes That Break the Math (and Realistic Magnitudes)
According to foundational guides from All About Circuits and Electronics Tutorials, the decibel is frequently abused in field calculations. Here are the specific mistakes that yield physically impossible results.
The Three Fatal dB Mistakes
- Using 10× for Voltage: If you calculate audio voltage gain using 10 × log₁₀(V₂/V₁) instead of 20×, your calculated dB value will be exactly half of the true gain. This leads to severe under-driving of subsequent stages.
- Adding Absolute dBm Values: dBm is an absolute power unit referenced to 1 milliwatt. You cannot add 10 dBm + 10 dBm to get 20 dBm. (10 dBm is 10 mW. 10 mW + 10 mW = 20 mW. 20 mW converted back to dBm is 13 dBm, not 20 dBm). You can only add dimensionless dB gain to absolute dBm power.
- Ignoring Impedance Mismatches: If you measure 2V across a 50 Ω source, and 1V across a 75 Ω load, the voltage ratio is -6.02 dB. But the actual power transfer loss is different because the impedances changed. The corrected formula is: LdB = 20 log₁₀(V₂/V₁) + 10 log₁₀(Z₁/Z₂).
Realistic Answer Magnitudes on the Bench
If your calculation yields a number outside these typical ranges, check your math and your probe grounding.
| Domain | Typical Measurement | Realistic Magnitude Range | Reference Standard |
|---|---|---|---|
| RF / Wireless | Wi-Fi RSSI (Received Signal) | -30 dBm (excellent) to -90 dBm (unusable) | dBm (1 mW ref) |
| RF / Wireless | Spectrum Analyzer Noise Floor | -130 dBm to -150 dBm (depending on RBW) | dBm/Hz |
| Pro Audio | Mixing Console Line Level | +4 dBu (approx 1.228 V RMS) | dBu (0.775 V ref) |
| Consumer Audio | CD Player / DAC Output | -10 dBV (approx 0.316 V RMS) | dBV (1.0 V ref) |
| Amplifiers | Op-Amp / Power Amp Voltage Gain | +10 dB to +40 dB | dB (dimensionless) |
Decision Path: Which dB Formula and Reference to Pick
Do not guess which reference to use. Follow this decision matrix to select the exact formula and reference standard for your specific hardware environment.
| IF your measurement context is... | AND your primary variable is... | THEN pick this Reference Unit | Use this exact Formula |
|---|---|---|---|
| RF design, antennas, Wi-Fi, SDR | Power (Watts/mW) | dBm (Ref: 1 mW) | 10 × log₁₀(P / 1mW) |
| Pro Audio, studio gear, 600Ω lines | Voltage (Volts) | dBu (Ref: 0.775 V) | 20 × log₁₀(V / 0.775V) |
| Consumer Audio, RCA, 3.5mm jacks | Voltage (Volts) | dBV (Ref: 1.0 V) | 20 × log₁₀(V / 1.0V) |
| Filter attenuation, amp gain, cable loss | Ratio (V/V or W/W) | dB (No absolute ref) | 20× log(V₂/V₁) or 10× log(P₂/P₁) |






