The voltage gain formula in decibels is Av(dB) = 20 × log10(Vout / Vin), while the power gain formula is Ap(dB) = 10 × log10(Pout / Pin). These logarithmic equations compress massive linear ratios into manageable numbers, allowing engineers to cascade multiple amplifier stages by simply adding their decibel (dB) values rather than multiplying bulky linear fractions. Whether you are designing a microphone preamp with an OPA2134 or analyzing an RF low-noise amplifier (LNA), understanding the exact derivation, assumptions, and unit-tracking mechanics of the gain formula is mandatory for accurate bench measurements.
The Core Gain Formula and Symbol Definitions
Before plugging numbers into a calculator, we must define the mathematical boundaries of the gain formula. The equations below apply strictly to linear, small-signal AC operation. If your amplifier is clipping (driving into the supply rails), the output waveform is squared off, RMS calculations become invalid, and the gain formula will yield mathematically correct but physically meaningless results.
| Symbol | Definition | Standard Unit | Critical Assumption |
|---|---|---|---|
| Av(dB) | Voltage Gain (Decibels) | dB | Input and output impedances do not need to match. |
| Ap(dB) | Power Gain (Decibels) | dB | Assumes matched input/output impedances for true power transfer. |
| Vout | Output Voltage | Volts (V) | Must be the same measurement type (RMS, Peak, or Peak-to-Peak) as Vin. |
| Vin | Input Voltage | Volts (V) | Must be measured at the exact same node reference as Vout. |
| Pout | Output Power | Watts (W) | Calculated as Vrms² / Rload. |
| Pin | Input Power | Watts (W) | Calculated as Vrms² / Rsource. |
| log10 | Base-10 Logarithm | Dimensionless | Ratio inside the log must be strictly positive (non-zero). |
For deeper theoretical background on why logarithmic scales are used in signal processing, refer to the Analog Devices guide on decibels, which details the historical and mathematical justification for the Bel and decibel scales in electrical engineering.
Rearranged Forms for Circuit Design
On the bench, you rarely just calculate gain. Usually, you know the required gain of your stage and your input signal, and you need to solve for the expected output, or you are debugging and need to find the input signal based on a measured output. Here are the algebraic rearrangements of the gain formula solving for every variable:
- Solve for Vout: Vout = Vin × 10(Av(dB) / 20)
- Solve for Vin: Vin = Vout / 10(Av(dB) / 20)
- Solve for Pout: Pout = Pin × 10(Ap(dB) / 10)
- Solve for Pin: Pin = Pout / 10(Ap(dB) / 10)
- Solve for Linear Voltage Ratio (V/V): Vout/Vin = 10(Av(dB) / 20)
Worked Examples with Unit Tracking
The most common point of failure when using the gain formula is unit misalignment. The ratio inside the logarithm must be dimensionless, meaning the numerator and denominator must share the exact same prefix (milli, micro, etc.). Below are two solved problems demonstrating strict unit tracking.
Problem 1: Audio Op-Amp Voltage Gain
Scenario: You are testing a phono preamplifier stage built with an LM386. Your oscilloscope measures an input sine wave of 12 mVRMS and an output sine wave of 2.4 VRMS. What is the voltage gain in decibels?
- Step 1: Unit Alignment. Convert both values to base Volts.
Vin = 12 mV = 0.012 V.
Vout = 2.4 V. - Step 2: Calculate Linear Ratio. Divide output by input.
2.4 V / 0.012 V = 200 V/V. (The 'V' units cancel out, leaving a dimensionless ratio). - Step 3: Apply Base-10 Logarithm.
log10(200) ≈ 2.30103. - Step 4: Scale to Decibels. Multiply by 20 for voltage.
20 × 2.30103 = 46.02 dB.
Problem 2: RF Amplifier Power Gain
Scenario: An RF power amplifier stage takes a 5 mW signal from a mixer and drives a 50-ohm dummy load with 2 Watts of power. What is the power gain?
- Step 1: Unit Alignment. Convert both values to base Watts.
Pin = 5 mW = 0.005 W.
Pout = 2 W. - Step 2: Calculate Linear Ratio.
2 W / 0.005 W = 400. - Step 3: Apply Base-10 Logarithm.
log10(400) ≈ 2.60206. - Step 4: Scale to Decibels. Multiply by 10 for power.
10 × 2.60206 = 26.02 dB.
For comprehensive reference tables on converting between linear ratios and decibels across various impedance levels, the Texas Instruments Analog Engineer's Pocket Reference is an indispensable physical or digital desk resource.
Realistic Magnitudes and Unit Mistakes That Break the Math
Knowing what a 'normal' answer looks like saves you from chasing ghosts when a misplaced decimal point yields a mathematically valid but physically impossible result.
Realistic Answer Magnitudes by Application
- Passive Filters / Attenuators: -3 dB to -20 dB (Negative gain indicates signal loss).
- Line-Level Audio Amplifiers: 10 dB to 20 dB (3.16 V/V to 10 V/V).
- Microphone Preamplifiers: 40 dB to 65 dB (100 V/V to 1778 V/V).
- RF Low Noise Amplifiers (LNAs): 15 dB to 25 dB (Power gain).
- Instrumentation Amplifiers (e.g., ECG/EEG): 60 dB to 100 dB (Requires cascaded stages to avoid bandwidth collapse).
Unit Mistakes That Break the Formula
If your scope reads Vin in Peak-to-Peak (Vpp) but your multimeter reads Vout in RMS, your ratio is skewed by a factor of 2√2 (approx 2.828). This introduces a massive 9 dB error into your calculation. Always measure both nodes with the same instrument using the same metric (both RMS or both Vpp).
Critical Error 2: Using 20×log for Power.
Power is proportional to voltage squared (P = V²/R). Because log(x²) = 2×log(x), the '2' from the exponent is pulled down and multiplied by the base 10, resulting in 20. If you are calculating actual Watts, the exponent is 1, so the multiplier remains 10. Using 20×log for a power ratio will double your dB result, leading to catastrophic over-design in thermal management.
Critical Error 3: Ignoring Impedance in Power Gain.
If you calculate power gain using voltages (Ap = 10×log(Vout²/Vin²)), this is only valid if the input and output impedances are identical. If your amplifier has a 10kΩ input impedance but drives a 4Ω speaker, you must calculate actual Watts using P = V²/R for both sides before applying the 10×log formula.
Frequently Asked Questions
Why does the voltage gain formula use 20 log instead of 10 log?
The decibel was originally defined to measure power ratios, hence the base formula is 10 × log10(Pout/Pin). However, in circuit design, we measure voltage far more often than power. Because power is proportional to the square of voltage (P ∝ V²), substituting V² into the power formula yields 10 × log10(Vout²/Vin²). Using the logarithmic identity log(x²) = 2×log(x), the exponent '2' drops down and multiplies the 10, resulting in 20 × log10(Vout/Vin). This ensures that a 6 dB increase represents a doubling of voltage, which correctly corresponds to a quadrupling of power (10 × log10(4) ≈ 6 dB).
How do I calculate the total gain formula for cascaded amplifiers?
When amplifiers are chained in series (cascaded), their linear voltage gains multiply (e.g., Stage 1 gain of 10 × Stage 2 gain of 5 = Total linear gain of 50). However, the primary advantage of the decibel gain formula is that it converts this multiplication into simple addition. To find the total gain of cascaded stages, simply add their individual dB gains together. If Stage 1 provides 20 dB and Stage 2 provides 14 dB, the total system gain is exactly 34 dB. Note that you must also add any negative dB values from passive filters or cable losses in the signal chain.
What does a negative result from the gain formula mean?
A negative dB result does not mean the signal is 'inverted' in phase; it means the signal has experienced attenuation (loss). If Vout is smaller than Vin, the ratio Vout/Vin is a decimal less than 1 (e.g., 0.5). The base-10 logarithm of any number between 0 and 1 is negative. For example, a voltage divider that halves the signal yields a ratio of 0.5. Calculating 20 × log10(0.5) results in -6.02 dB. Phase inversion (a 180-degree shift, common in inverting op-amp topologies) is mathematically represented as a negative linear ratio, but because the gain formula requires a positive input for the logarithm, we calculate the magnitude in dB and note the 180° phase shift separately on the schematic.
Does the gain formula apply to digital signals and PWM?
No, the standard AC gain formula is invalid for digital logic or Pulse Width Modulation (PWM) signals. Digital signals are evaluated by logic thresholds (VIH, VIL) and noise margins, not linear amplification ratios. For PWM, the 'gain' of a system is usually defined by the duty cycle translation or the efficiency of the switching stage (e.g., a buck converter's voltage transfer function is Vout/Vin = Duty Cycle). Applying a 20×log formula to the peak voltage of a 5V PWM square wave compared to a 3.3V logic signal will yield a mathematically correct dB number, but it holds zero practical value for digital timing, rise/fall edge analysis, or microcontroller GPIO logic compatibility.






