Gain in an op amp is the ratio of output voltage to input voltage ($A_v = V_{out} / V_{in}$). In raw, unconfigured silicon, an operational amplifier has an "open-loop" gain of 100,000 to 1,000,000+. This is useless for practical circuits because the output will instantly slam into the power supply rails with even a microvolt of input difference. To get usable, precise amplification, we use negative feedback to set a specific "closed-loop" gain using external resistors. This guide breaks down exactly how to configure that gain, which parts to buy, and how to test the circuit on your bench.

Op Amp Pinout and Symbol Basics

Before wiring feedback resistors, you need to understand the physical pins and the schematic symbol. The standard triangle symbol features two inputs and one output. We will assume the ubiquitous 8-pin DIP (Dual In-line Package) dual op-amp footprint, which houses two independent op amps in one chip (like the LM358 or TL072).

Standard 8-Pin Dual Op Amp Pinout:
  • Pin 1: Output A
  • Pin 2: Inverting Input A (V-)
  • Pin 3: Non-Inverting Input A (V+)
  • Pin 4: V- (Negative Supply / GND in single-supply)
  • Pin 5: Non-Inverting Input B (V+)
  • Pin 6: Inverting Input B (V-)
  • Pin 7: Output B
  • Pin 8: V+ (Positive Supply)

When calculating gain, we rely on two "golden rules" of ideal op amps operating in a negative feedback loop:

  1. Infinite Input Impedance: No current flows into the input pins (Pin 2 and Pin 3).
  2. Virtual Short: The op amp will drive its output to whatever voltage is necessary to make the voltage at the Inverting Input (Pin 2) exactly equal to the voltage at the Non-Inverting Input (Pin 3).

Setting Closed-Loop Gain: The Application Circuits

There are two primary ways to configure closed-loop gain. Your choice depends on whether you need the output signal to maintain the same polarity as the input (non-inverting) or flip upside down (inverting).

1. Non-Inverting Amplifier (Audio Preamp Example)

In this configuration, the input signal goes directly to the non-inverting pin (Pin 3). The gain is always positive and can never be less than 1.

The Formula: $Gain = 1 + (R_f / R_{in})$

Complete Application Circuit: Microphone Preamp (Gain of 11)
  • IC: TL072 (Using Op Amp A)
  • Power: Pin 8 to +12V, Pin 4 to -12V (Dual supply). Add a 100nF ceramic decoupling capacitor between Pin 8 and Pin 4, placed as close to the IC as possible to prevent high-frequency oscillation.
  • Input: Audio signal AC-coupled via a 10µF electrolytic capacitor to Pin 3. A 100kΩ pull-down resistor from Pin 3 to GND provides a DC return path.
  • Feedback ($R_f$): 10kΩ resistor connected from Output (Pin 1) to Inverting Input (Pin 2).
  • Ground Resistor ($R_{in}$): 1kΩ resistor connected from Inverting Input (Pin 2) to GND.
  • Result: $Gain = 1 + (10,000 / 1,000) = 11$. A 100mV peak audio signal becomes a 1.1V peak output at Pin 1.

2. Inverting Amplifier

Here, the non-inverting pin (Pin 3) is tied directly to GND. The input signal enters through a resistor to the inverting pin (Pin 2). The output is inverted (180° phase shift).

The Formula: $Gain = - (R_f / R_{in})$

If you use a 10kΩ feedback resistor and a 10kΩ input resistor, your gain is exactly -1. This is highly useful for summing mixers or phase-inversion stages in effects pedals.

Operation Regions and Safe Default Part Numbers

An op amp cannot output voltages beyond its power supply rails. Understanding the three operation regions is critical for biasing your circuit correctly so you don't accidentally clip your signal.

Operation Region Output Voltage ($V_{out}$) Output Current ($I_{out}$) Circuit State
Linear (Active) Between $(V-) + 1.5V$ and $(V+) - 1.5V$ Typically < 20mA Feedback is working; $V_{out}$ accurately tracks $V_{in} \times Gain$.
Positive Saturation Clamped at approx. $(V+) - 1.5V$ Limited by short-circuit protection (30-40mA) Input signal too high; output is "railed" and clipped.
Negative Saturation Clamped at approx. $(V-) + 1.5V$ Limited by short-circuit protection (30-40mA) Input signal too low (or negative); output is "railed".

Note: The 1.5V headroom applies to standard op amps. "Rail-to-rail" output op amps can swing within 50mV of the supply rails.

Safe Default Part Numbers for 2026 Builds

Don't waste time guessing which IC to order. These are the bench-tested defaults based on your supply voltage and application:

  • LM358 (Single Supply, 3V to 32V, ~$0.15): The ultimate utility player for DC sensor amplification, comparators, and low-speed Arduino/ESP32 interfacing. Not suitable for audio (high crossover distortion).
  • TL072 (Dual Supply, ±5V to ±18V, ~$0.40): The standard for DIY audio, guitar pedals, and synthesizers. Low noise, requires a dual (split) power supply to handle AC signals centered at 0V.
  • MCP6002 (Single Supply, 1.8V to 5.5V, ~$0.30): Perfect for 3.3V logic systems. Rail-to-rail input and output makes it ideal for battery-powered sensor nodes.
  • OPA2134 (Dual Supply, ±2.5V to ±18V, ~$3.50): High-end precision audio and measurement. FET inputs provide ultra-low bias current and exceptionally low THD (Total Harmonic Distortion).

Testing and Troubleshooting Op Amp Gain Failures

When your circuit doesn't amplify as expected, don't just swap the chip. Op amps rarely fail on their own unless subjected to overvoltage or static discharge. Failures are almost always wiring, power, or feedback loop errors.

Warning: Always power down and discharge capacitors before measuring resistance with a multimeter. Applying an ohmmeter to a live circuit will yield false readings and can damage your meter.

Numbered Troubleshooting Steps:

  1. Verify Power Rails: Set your multimeter to DC Volts. Measure between Pin 8 and Pin 4. If you are using a ±12V supply, you must read exactly 24V across these pins. If you read 0V, check your breadboard power rails.
  2. Check the Virtual Short: Power the circuit on. Measure the DC voltage at Pin 3 (Non-Inverting) and Pin 2 (Inverting). In a properly functioning linear circuit, these two voltages must be identical (within 1-2 millivolts). If Pin 2 and Pin 3 differ by more than a few millivolts, the feedback loop is broken (open resistor) or the op amp is saturated.
  3. Test for Saturation: If your output (Pin 1) is stuck at a fixed voltage near your positive or negative supply rail, your input signal is too large for your configured gain, or your non-inverting pin lacks a DC bias path to ground.
  4. Check Feedback Continuity: Power off. Set your multimeter to Ohms. Measure across the feedback resistor ($R_f$). It should read the exact resistance value (e.g., 10kΩ). If it reads infinite (OL), the resistor is blown or not making contact in the breadboard.

For deeper design validation and stability analysis, refer to the comprehensive operational amplifier tutorials provided by All About Circuits and the official design resources from Texas Instruments.

Frequently Asked Questions About Op Amp Gain

Why is my op amp gain lower than the calculated value at high frequencies?

This is caused by the Gain-Bandwidth Product (GBP). Every op amp has a finite speed limit. The GBP is the frequency at which the open-loop gain drops to 1 (0dB). If your TL072 has a GBP of 3MHz, and you configure it for a closed-loop gain of 100 (40dB), your maximum usable bandwidth drops to 30kHz (3MHz / 100). If you try to amplify a 100kHz signal with that same circuit, the actual gain will be significantly lower than 100. To fix this, you must either choose an op amp with a higher GBP (like the OPA1641 at 11MHz) or split the gain across two cascaded stages (e.g., two stages of Gain = 10).

Can I set an op amp gain to less than 1?

In an inverting configuration, yes. By making the input resistor ($R_{in}$) larger than the feedback resistor ($R_f$), you achieve attenuation (e.g., $R_f = 1k$, $R_{in} = 10k$ yields a gain of -0.1). However, in a non-inverting configuration, the minimum possible gain is exactly 1 (when $R_f = 0$ and $R_{in} = \infty$). If you need to attenuate a signal while maintaining the same phase (non-inverting), do not use the op amp for attenuation. Instead, use a passive resistor voltage divider to step down the signal first, and then feed that into a non-inverting op amp configured as a unity-gain buffer (Gain = 1) to provide a low-impedance output.

Does the open-loop gain of the op amp affect my closed-loop circuit?

Yes, it dictates your accuracy. The closed-loop gain formulas ($1 + R_f/R_{in}$) assume the op amp's internal open-loop gain is infinite. In reality, it is finite (e.g., 100,000). If you design a closed-loop circuit with a gain of 10,000, you are asking the op amp to operate very close to its physical limits, and the actual gain will suffer from significant error and non-linearity. A standard engineering rule of thumb is to ensure your desired closed-loop gain is at least 100 times smaller than the op amp's open-loop gain at your operating frequency to maintain high precision.