The voltage gain of an inverting op amp is defined strictly by the ratio of the feedback resistor to the input resistor: Av = -Rf / Rin. The negative sign denotes a 180° phase inversion between input and output. If you wire a 100 kΩ feedback resistor and a 10 kΩ input resistor, your closed-loop gain is exactly -10. Feed it 100 mV, and the output will be -1.0 V relative to your reference ground. It is that simple on paper, but on the bench, power supply rails, input bias currents, and bandwidth limits dictate whether that math actually survives contact with a breadboard.
The Inverting Op Amp Pinout and Symbol Anatomy
Before wiring the feedback loop, you need to know the physical silicon you are holding. The vast majority of hobbyist and prototyping op amps come in an 8-pin DIP (Dual In-line Package). While the schematic symbol is a simple triangle with a non-inverting (+) input, an inverting (-) input, and an output, the physical chip requires power and often compensation pins.
- Pin 1: Output A (or Offset Null on singles)
- Pin 2: Inverting Input A (-) — This is where your input signal and feedback network meet.
- Pin 3: Non-Inverting Input A (+) — Tied to ground or a bias voltage in an inverting configuration.
- Pin 4: V- (Negative Supply or Ground in single-supply)
- Pin 5: Non-Inverting Input B (+)
- Pin 6: Inverting Input B (-)
- Pin 7: Output B
- Pin 8: V+ (Positive Supply)
In the inverting configuration, the signal enters through a resistor into Pin 2. Pin 3 is held at a stable reference voltage. The op amp's internal high-gain differential amplifier drives Pin 1 (or 6) to whatever voltage is necessary to force Pin 2 to match the voltage at Pin 3. This is the "virtual short" principle that makes the gain formula work.
Calculating the Gain of an Inverting Op Amp (With Real Values)
Let's build a complete application circuit: an inverting preamplifier for a piezoelectric vibration sensor that outputs a weak 50 mV AC signal. We need to amplify this to 500 mV to feed it into a microcontroller's ADC. Our target gain is -10.
The Component Values:
- Rin (Input Resistor): 10 kΩ
- Rf (Feedback Resistor): 100 kΩ
- Rbias (Bias Compensation Resistor): 9.1 kΩ (Calculated as Rin || Rf)
- Cin (Input Coupling Capacitor): 1 µF (Blocks DC offset from the sensor)
The formula Vout = -(Rf / Rin) * Vin gives us -(100k / 10k) * 50mV = -500mV. But why the 9.1 kΩ bias resistor on the non-inverting pin? Real op amps draw a tiny "input bias current" into their input terminals. If the resistance seen by the inverting pin (the parallel combination of Rin and Rf) doesn't match the resistance seen by the non-inverting pin, that bias current creates a voltage offset that gets amplified, shifting your DC output. Adding Rbias cancels this error. For a deep dive on this, the All About Circuits Op-Amp Basics guide provides excellent schematic breakdowns.
Safe Default Part Numbers and Biasing for the Job
Selecting the right op amp is just as critical as calculating the gain of an inverting op amp. If you choose a part that cannot swing to your required voltage rails, or one that lacks the bandwidth for your signal frequency, your circuit will fail silently or distort horribly.
| Part Number | Supply Voltage (Vcc) | Typical Supply Current | GBW (Gain Bandwidth) | Slew Rate | Best Application |
|---|---|---|---|---|---|
| LM358P | 3V to 32V (Single/Dual) | 0.7 mA per channel | 1 MHz | 0.3 V/µs | Low-cost DC sensors, slow single-supply signals. Avoid for audio (crossover distortion). |
| TL072CP | ±5V to ±15V (Dual) | 1.4 mA per channel | 3 MHz | 13 V/µs | Audio preamps, active filters, dual-rail bench equipment. |
| MCP6002-I/P | 1.8V to 6.0V (Single) | 100 µA per channel | 1 MHz | 0.6 V/µs | 3.3V/5V microcontroller interfacing (ESP32/Arduino), battery-powered IoT. |
How to Bias for Single vs. Dual Supplies:
If you are using a dual supply (e.g., ±12V), Pin 3 goes directly to system ground (0V). Your AC signal can swing positive and negative naturally. If you are using a single supply (e.g., a 9V battery), the op amp cannot output a negative voltage. You must create a "virtual ground" at Vcc/2 (4.5V) using a voltage divider of two 10 kΩ resistors, buffer it with a capacitor, and tie Pin 3 to that 4.5V node. Your AC signal will now swing above and below 4.5V instead of 0V.
Bench Walkthrough: When the Math Meets the Breadboard
Theory is clean; the workbench is messy. Here is a real-world scenario demonstrating what happens when you ignore the operational limits of your chosen silicon while calculating the gain of an inverting op amp.
The Setup: A hobbyist wants to amplify a 500 mV peak AC audio signal from a guitar pickup to drive an ADC. They use an LM358 on a single 9V battery supply. They bias the non-inverting pin to 4.5V. They set Rin to 10 kΩ and Rf to 100 kΩ for a gain of -10.
The Math: 500 mV input * 10 = 5.0 V peak output. Centered around the 4.5V bias, the output should swing from -0.5V to +9.5V relative to system ground.
The Outcome: The microcontroller reads a heavily distorted, flat-topped waveform. The audio sounds like a fuzz pedal.
What Went Wrong: The hobbyist forgot to check the LM358's output swing specifications. The LM358 can swing down to roughly 20 mV above the negative rail (ground), but it cannot swing to the positive rail. Its high-level output voltage (VOH) is typically Vcc - 1.5V. On a 9V supply, the absolute maximum output is 7.5V. Furthermore, the negative swing of the math (-0.5V) is physically impossible on a single-supply circuit without a charge pump. The signal clipped hard on both the positive peak (hitting the 7.5V ceiling) and the negative peak (hitting the 0V floor). The fix: Switch to a rail-to-rail output op amp like the MCP6002, or reduce the gain to -4 so the 2V peak signal stays safely within the 1.5V to 7.5V linear window of the LM358.
Troubleshooting: How Op Amps Fail and How to Test Them
Op amps rarely fail gracefully. They usually die from latch-up (exceeding the absolute maximum input voltage relative to the supply rails), shorting the output to ground, or electrostatic discharge (ESD) frying the input differential pair. If your calculated gain of an inverting op amp isn't matching your multimeter readings, follow this diagnostic path.
- The Virtual Short Check (Power On): Set your multimeter to DC Volts. Measure the voltage at Pin 3 (Non-inverting). Now measure Pin 2 (Inverting). In a functioning linear circuit with negative feedback, these two voltages must be virtually identical (within a few millivolts). If Pin 3 is at 4.5V and Pin 2 is at 0V, the feedback loop is broken, or the internal output stage is dead.
- The Output Rail Check (Power On): Measure the Output pin. If it is pegged exactly to V+ or V- (within 100mV), the op amp is saturated. This means the input differential voltage is too high, the feedback resistor is open (infinite gain), or the internal silicon is shorted.
- The Diode Test (Power Off): Remove the chip from the circuit or ensure power is completely disconnected. Set your DMM to Diode Test mode. Place the red probe on Pin 4 (V-) and the black probe on Pin 2 and Pin 3. You should read a standard silicon diode drop (0.6V to 0.7V). If you read 0.0V (short) or OL (open), the input protection diodes or junctions are destroyed. As noted in the Analog Devices stability guide, improper compensation can also cause oscillation that mimics a failed part; always check for high-frequency AC on the output pin with an oscilloscope if your DMM reads erratic DC voltages.
Mastering the gain of an inverting op amp requires respecting both the algebraic formula and the physical limitations of the silicon. Choose your part numbers based on your supply rails, compensate for input bias currents, and always verify your output swing margins before soldering the final board.






