The Direct Answer: Open-Loop vs. Closed-Loop Gain of an Op Amp
The open-loop gain of an op amp is typically massive—ranging from 100,000 to 1,000,000 V/V (100 dB to 120 dB). Because this raw number is unstable and varies wildly with temperature and manufacturing tolerances, you never use it for linear amplification. Instead, you set the closed-loop gain using a negative feedback resistor network.
For a standard non-inverting amplifier, the gain formula is:
Av = 1 + (Rf / Rin)
For an inverting amplifier, the formula is:
Av = -(Rf / Rin)
Worked Numeric Example: You need to scale a 0.3V analog sensor signal up to 3.3V to max out the 12-bit ADC on an ESP32. You need a non-inverting gain of exactly 11 V/V. Using the formula 11 = 1 + (Rf / Rin), we need a ratio of 10. Selecting standard 1% metal film values: Rf = 100kΩ and Rin = 10kΩ. The math: 1 + (100,000 / 10,000) = 11. If you feed in 0.3V, the output will be 3.3V.
For a deeper theoretical foundation on how feedback stabilizes these massive internal multipliers, the TI Precision Labs Op Amp series provides excellent bench-level demonstrations of gain-bandwidth interactions.
Op Amp Pinout, Symbol, and Safe Default Part Numbers
Before wiring feedback resistors, you must identify the pins. The standard schematic symbol is a triangle pointing right. The physical IC (typically an 8-pin DIP or SOIC package for duals) maps to these essential nodes:
- Non-Inverting Input (+): The signal input for non-inverting gain configurations.
- Inverting Input (-): The signal input for inverting configs, and the destination for your negative feedback network.
- Output (Vout): Drives the amplified signal.
- V+ (Positive Supply): Connects to your positive voltage rail.
- V- (Negative Supply / GND): Connects to your negative rail or system ground in single-supply setups.
Not all op amps are created equal. Selecting the wrong part for your supply voltage or bandwidth will ruin your gain accuracy. Here are the safe defaults for the workbench in 2026:
| Part Number | Type | Supply Voltage (Vs) | GBW (Gain-Bandwidth) | Best Application | Approx. Cost |
|---|---|---|---|---|---|
| LM358 | Dual, Single Supply | 3V to 32V (or ±16V) | 1 MHz | General DC, low-freq sensor buffering | $0.15 |
| TL072 | Dual, Dual Supply | ±18V max (36V total) | 3 MHz | Audio preamps, low-noise analog | $0.40 |
| MCP6002 | Dual, Rail-to-Rail I/O | 1.8V to 5.5V | 1 MHz | 3.3V/5V MCU ADC driving (ESP32/Pico) | $0.35 |
Operation Regions and Biasing for Linear Amplification
To achieve the calculated gain of an op amp, the device must remain in its linear (active) region. If you bias it incorrectly, the output will slam into the supply rails and clip your signal. You must keep the input voltages within the Common-Mode Voltage Range (Vcm) specified in the datasheet.
| Operation Region | Input Differential (V+ minus V-) | Output State | Typical Output Voltage |
|---|---|---|---|
| Linear (Active) | ~0V (Virtual Short) | Amplifying predictably | Between (V-) + 0.2V and (V+) - 0.2V |
| Positive Saturation | V+ is significantly > V- | Clipped High | Pegged near V+ rail (e.g., 4.8V on a 5V supply) |
| Negative Saturation | V- is significantly > V+ | Clipped Low | Pegged near V- rail (e.g., 0.05V on a single 5V supply) |
How to bias for single-supply (e.g., 5V from an Arduino): Standard op amps cannot read signals at 0V if powered by a single 5V rail because their inputs require a few volts of headroom above the V- pin. You must create a 'virtual ground' at Vcc/2 (2.5V) using a voltage divider and bias your non-inverting input to this midpoint. Alternatively, use a rail-to-rail input/output (RRIO) part like the MCP6002, which can handle signals all the way down to 0V.
Complete Application Circuit: Non-Inverting Amplifier (Gain of 11)
This circuit buffers and amplifies a low-voltage DC sensor signal for a microcontroller ADC. We are targeting a closed-loop gain of 11 V/V.
Safety Note: This is a low-voltage DC circuit (<5V). However, if you are adapting this topology for mains-isolated current transformers or high-voltage industrial sensors, ensure your feedback resistors are rated for the appropriate voltage and include clamping diodes to protect the op amp inputs.
Bill of Materials:
- U1: MCP6002 Dual Op Amp (8-pin DIP)
- Rf: 100kΩ 1/4W 1% Metal Film Resistor
- Rin: 10kΩ 1/4W 1% Metal Film Resistor
- C1: 100nF (0.1µF) Ceramic Decoupling Capacitor
- Power: 5V DC from ESP32/Arduino 5V pin
Wiring Steps:
- Power the IC: Connect Pin 8 (V+) to the 5V rail. Connect Pin 4 (V-) to System GND.
- Decouple: Solder or plug the 100nF capacitor directly across Pin 8 and Pin 4 to filter high-frequency supply noise.
- Wire the Input: Connect your sensor signal to Pin 3 (Non-Inverting Input +).
- Set the Gain Network: Connect one end of the 10kΩ resistor (Rin) to Pin 2 (Inverting Input -) and the other end to System GND.
- Close the Feedback Loop: Connect the 100kΩ resistor (Rf) between Pin 2 (Inverting Input -) and Pin 1 (Output Vout). This establishes the negative feedback required to set the gain of the op amp to 11.
- Verify: Power the circuit. Apply 0.2V to Pin 3. Measure Pin 1 with your multimeter; it should read exactly 2.2V (0.2V × 11).
For more complex active filter topologies that combine gain and frequency shaping, refer to the Analog Devices Op Amp Basics library.
Failure Modes: How to Test an Op Amp with a Multimeter
Op amps rarely fail from aging; they fail from electrical abuse. The most common killers are exceeding the maximum differential input voltage (usually ±0.7V between the + and - pins without current limiting), shorting the output directly to Vcc or GND, and static discharge (ESD).
Here is how to diagnose a suspect IC on the bench using a standard digital multimeter (DMM):
- Power Off and Isolate: Remove the IC from the breadboard or lift it from the PCB if possible. Testing in-circuit will yield false readings due to parallel feedback paths.
- Check for Output Shorts: Set your DMM to continuity mode. Probe the Vout pin against V+ and V-. You should read 'OL' (Open Loop). If it beeps, the internal output transistor is shorted. The IC is dead.
- Test Internal Protection Diodes: Set your DMM to Diode Test mode. Place the red probe on V- and the black probe on the Inverting Input (-). You should read a forward voltage drop of roughly 0.5V to 0.7V (the internal ESD clamping diode). Reverse the probes; it should read 'OL'. Repeat for the Non-Inverting Input (+). If you read 0.0V or a dead short in either direction, the input stage is blown.
- Power-On Offset Test: Wire the IC as a voltage follower (connect Vout directly to the Inverting Input). Ground the Non-Inverting Input. Power it up with ±5V. Measure Vout. A healthy op amp will output a few millivolts (its natural input offset voltage). If Vout is pegged at +5V or -5V, the internal differential pair is destroyed, and it can no longer maintain a virtual short.
Frequently Asked Questions About Op Amp Gain
Why does the measured gain of an op amp drop at high frequencies?
Every op amp has an internal compensation capacitor designed to prevent high-frequency oscillation. This creates a low-pass filter effect inside the silicon, defined by the Gain-Bandwidth Product (GBW). The GBW is a constant for a given part. If your LM358 has a GBW of 1 MHz, and you set a closed-loop gain of 100 (40 dB), your maximum usable bandwidth is only 10 kHz (1,000,000 / 100). If you try to amplify a 50 kHz signal with a gain of 100, the actual gain of the op amp will severely roll off, and your output will be attenuated. To fix this, you must select an op amp with a higher GBW, like the OPA1612 (40 MHz GBW).
Can I use a 1MΩ feedback resistor to set a high gain of an op amp?
You can, but it is highly discouraged for precision circuits. While a 1MΩ Rf and a 10kΩ Rin will mathematically yield a gain of 101, high-impedance feedback networks introduce three major problems. First, the op amp's input bias current flowing through the 1MΩ resistor creates a massive DC offset voltage error. Second, 1MΩ resistors generate significant thermal (Johnson-Nyquist) noise, which gets amplified. Third, parasitic stray capacitance across the 1MΩ resistor forms an unintended low-pass filter, severely limiting your high-frequency response. The bench rule of thumb is to keep feedback resistors between 1kΩ and 100kΩ. If you need a gain of 100, use two cascaded stages with a gain of 10 each (e.g., 91kΩ and 10kΩ per stage).
What happens if the calculated gain of an op amp exceeds the supply rails?
The op amp will enter saturation (clipping). If you power an LM358 with a single 5V supply and apply a 1V signal with a gain of 10, the math dictates a 10V output. Because the IC cannot generate a voltage higher than its V+ supply, the output will flatline at roughly 3.5V to 4V (the LM358 is not rail-to-rail output). The signal will be severely distorted, flattening out the top of the waveform. Always ensure your (Maximum Input Signal × Gain) remains at least 1V below your positive supply rail and 1V above your negative supply rail to maintain linear operation.
How does input offset voltage affect the closed-loop gain of an op amp?
Input offset voltage (Vos) is a manufacturing imperfection where the op amp's internal transistors are slightly mismatched, requiring a tiny DC voltage difference between the inputs to force the output to exactly 0V. The critical factor is that your closed-loop resistor network amplifies this error just like it amplifies your signal. The 'Noise Gain' of a non-inverting amplifier is exactly equal to its signal gain (1 + Rf/Rin). If your op amp has a typical Vos of 2mV, and you set a closed-loop gain of 100, your output will have a built-in DC error of 200mV (2mV × 100) even when the input is grounded. For high-gain DC applications, you must select a precision 'zero-drift' or chopper-stabilized op amp like the Adafruit-friendly MAX4239, which boasts a Vos of under 1.5µV.






