Closed loop gain is the actual, stabilized voltage amplification of an operational amplifier circuit achieved by routing a portion of the output signal back to the inverting input via a negative feedback network. Without this feedback, an op-amp operates in "open loop," acting essentially as a comparator with an uncontrollably high, temperature-dependent gain that makes precise linear amplification impossible. By introducing closed loop gain, you trade the chip's massive internal amplification for a highly predictable, stable multiplier determined almost entirely by external passive components.
The Core Concept: Taming the Op-Amp
An operational amplifier like the classic Texas Instruments LM358 has an open-loop gain ($A_{OL}$) of roughly 100,000 V/V (100 dB). If you apply just 1 millivolt of difference between its inputs, the output will slam against the positive supply rail. This is useless for amplifying a sensor signal where you need a clean, proportional output.
Closed loop gain ($A_{CL}$) changes this behavior fundamentally. By connecting a voltage divider from the output back to the inverting (-) input, the op-amp continuously adjusts its output to keep the voltage difference between its two inputs near zero. The amplification factor is no longer dictated by the silicon's internal transistor geometry; it is dictated by the ratio of your feedback resistors. This makes the circuit immune to the op-amp's internal manufacturing variances, temperature drift, and aging effects.
The Math in the Real World: A Worked Numeric Example
Let us look at a standard non-inverting amplifier configuration. We want to amplify a signal by exactly 10 times. We select a feedback resistor ($R_f$) of 9 kΩ and a ground resistor ($R_i$) of 1 kΩ.
The Ideal Calculation:
The textbook formula for non-inverting closed loop gain is:
$A_{CL(ideal)} = 1 + \frac{R_f}{R_i}$
$A_{CL(ideal)} = 1 + \frac{9000}{1000} = 10 \text{ V/V}$
The Real-World Calculation:
The actual closed loop gain formula accounts for the op-amp's finite open-loop gain ($A_{OL}$) and the feedback fraction ($\beta$), where $\beta = \frac{R_i}{R_f + R_i}$. In our circuit, $\beta = \frac{1k}{10k} = 0.1$.
Assuming our LM358 has a real-world $A_{OL}$ of 100,000:
$A_{CL(actual)} = \frac{A_{OL}}{1 + (\beta \times A_{OL})}$
$A_{CL(actual)} = \frac{100,000}{1 + (0.1 \times 100,000)} = \frac{100,000}{10,001} = 9.999 \text{ V/V}$
The error between the ideal gain (10.000) and the actual gain (9.999) is a mere 0.01%. Because standard 1% tolerance metal film resistors will introduce far more error than the op-amp's finite open-loop gain, we almost always rely on the ideal formula for bench calculations. For a deeper dive into how feedback fraction impacts stability, the Electronics Tutorials op-amp primer provides excellent foundational math.
Where You Meet Closed Loop Gain in Practice
You will rarely see an op-amp running open-loop in a finished PCB unless it is being used as a comparator. Closed loop gain is the backbone of analog signal conditioning.
1. Interfacing Shunt Resistors to an ESP32 ADC
The ESP32-WROOM-32 has a notoriously non-linear ADC, particularly near the 3.3V rail. If you are measuring DC current using a 50mV full-scale shunt resistor, you need to amplify that 0–50mV signal to fit the ESP32's usable ADC range (roughly 0–3.0V to avoid the non-linear saturation zone).
Target Gain: $3.0V / 0.05V = 60 \text{ V/V}$.
Using a rail-to-rail op-amp like the TLV2372, you would set your closed loop gain to 60 by choosing $R_f = 59 \text{ kΩ}$ and $R_i = 1 \text{ kΩ}$. The closed loop gain ensures that exactly 50mV at the input yields exactly 3.0V at the ESP32 GPIO pin, protecting the microcontroller while maximizing ADC resolution.
2. Audio Preamplifiers
In audio circuits, such as a microphone preamp built around an OPA2134, closed loop gain sets the volume stage. However, audio designers must carefully select the feedback network to balance gain against noise. A closed loop gain of 40 dB (100 V/V) will amplify the microphone signal, but it will also amplify the thermal noise of the feedback resistors. Designers often use multi-stage amplification (e.g., two stages with a closed loop gain of 10 V/V each) rather than a single stage with a gain of 100 V/V to maintain bandwidth and minimize noise.
The Hidden Catch: Gain-Bandwidth Product (GBWP)
The most critical limitation of closed loop gain is that it is not free; you pay for it with bandwidth. An op-amp's internal compensation capacitor creates a dominant pole, causing the open-loop gain to roll off at -20 dB/decade. The frequency at which the open-loop gain drops to 1 V/V (0 dB) is the Unity-Gain Bandwidth, often synonymous with the Gain-Bandwidth Product (GBWP).
The rule is absolute: Closed Loop Gain × Bandwidth = GBWP.
| Op-Amp Model | GBWP (Typical) | Target Closed Loop Gain | Resulting Usable Bandwidth | Best Application |
|---|---|---|---|---|
| LM358 | 1 MHz | 10 V/V (20 dB) | 100 kHz | DC sensor scaling, slow control loops |
| LM358 | 1 MHz | 100 V/V (40 dB) | 10 kHz | Audio (barely adequate for full 20kHz spectrum) |
| OPA2134 | 8 MHz | 100 V/V (40 dB) | 80 kHz | High-fidelity audio preamplification |
| TLV2372 | 3 MHz | 60 V/V (~35 dB) | 50 kHz | ESP32 ADC signal conditioning |
If you attempt to pull a closed loop gain of 100 V/V out of an LM358 to amplify a 50 kHz ultrasonic sensor signal, the circuit will fail. The math dictates the bandwidth drops to 10 kHz, severely attenuating your 50 kHz signal. For high-frequency, high-gain applications, you must select an op-amp with a higher GBWP or cascade multiple lower-gain stages. The Texas Instruments Precision Labs video series offers rigorous visual demonstrations of this exact bandwidth roll-off on an oscilloscope.
Frequently Asked Questions
How does closed loop gain affect bandwidth in op-amps?
Closed loop gain and bandwidth share an inverse relationship governed by the op-amp's Gain-Bandwidth Product (GBWP). Because the internal compensation capacitor forces the open-loop gain to drop as frequency rises, demanding a higher closed loop gain forces the circuit to hit the op-amp's maximum capability at a much lower frequency. If your op-amp has a 1 MHz GBWP and you configure it for a closed loop gain of 100, your signal bandwidth is strictly limited to 10 kHz. To get more bandwidth at high gains, you must either buy a faster op-amp (higher GBWP) or chain multiple op-amps in series, each handling a smaller portion of the total gain.
Why is my closed loop gain lower than calculated at high frequencies?
If your DC and low-frequency measurements match your resistor calculations perfectly, but the gain drops as you increase the signal frequency, you are hitting the GBWP limit. Additionally, at very high frequencies (typically above 100 kHz depending on the chip), parasitic capacitance in your breadboard, PCB traces, and the feedback resistors themselves creates an unintended low-pass filter. To fix this, verify your GBWP math, keep feedback resistor values relatively low (e.g., under 10 kΩ) to minimize the impact of parasitic parallel capacitance, and ensure your layout has a solid ground plane. For a comprehensive look at high-frequency parasitics, the Analog Devices Linear Circuit Design Handbook is the industry standard reference.
What is the difference between open loop and closed loop gain?
Open loop gain is the raw, unregulated voltage amplification inherent to the op-amp's internal silicon, typically ranging from 100,000 to over 1,000,000 V/V. It is highly unstable, varies wildly with temperature, and drops off rapidly with frequency. Closed loop gain is the engineered, stabilized amplification achieved by adding external negative feedback resistors. While closed loop gain is always significantly lower than open loop gain, it is highly precise, predictable, linear, and determined by the ratio of your external components rather than the internal silicon.






