The inverting amplifier gain formula is Av = -(Rf / Rin). This means the closed-loop voltage gain (Av) is strictly determined by the ratio of the feedback resistor (Rf) to the input resistor (Rin), with the negative sign indicating a 180-degree phase inversion between the input and output signals. While the math is simple, applying it on the bench without understanding its underlying assumptions is the fastest way to design a circuit that clips, oscillates, or outputs a massive DC offset.
The Inverting Amplifier Gain Formula and Symbol Definitions
Before wiring up an LM358 or OPA2134, we need to define the exact parameters of the formula and the ideal assumptions that make it work. The foundational equation for the closed-loop gain of an inverting operational amplifier is:
Av = - (Rf / Rin)
| Symbol | Parameter | Standard Unit | Practical Bench Range |
|---|---|---|---|
| Av | Voltage Gain (Closed-Loop) | Dimensionless (V/V) | -1 to -1000 (typically) |
| Rf | Feedback Resistor | Ohms (Ω) | 1 kΩ to 100 kΩ |
| Rin | Input Resistor | Ohms (Ω) | 1 kΩ to 100 kΩ |
| Vout | Output Voltage | Volts (V) | Limited by supply rails |
| Vin | Input Voltage | Volts (V) | Within common-mode range |
When the Formula Applies and Its Core Assumptions
This formula is derived using the ideal op-amp model. It applies accurately only when the following assumptions hold true:
- Infinite Open-Loop Gain: The op-amp's internal gain is so high that the voltage difference between the inverting and non-inverting inputs is forced to exactly zero (the "virtual ground" or "virtual short" concept).
- Infinite Input Impedance: Zero current flows into the op-amp's input pins. Therefore, all current flowing through Rin must flow through Rf.
- Zero Output Impedance: The op-amp can drive any load without the output voltage sagging.
In reality, a precision op-amp like the TI OPA2134 has an open-loop gain of roughly 120 dB (1,000,000 V/V). At a closed-loop gain of -10, the ideal formula is accurate to within 0.001%. However, if you push for a closed-loop gain of -10,000, the finite open-loop gain breaks the virtual ground assumption, and the actual gain will fall significantly short of the formula's prediction.
Rearranged Forms for Bench Design
On the bench, you rarely solve for Av directly. Usually, you know the gain you need and the output swing you want, and you need to calculate the exact resistor values. Here are the rearranged forms of the inverting amplifier gain formula, solving for each variable:
- Solving for Feedback Resistor: Rf = -Av × Rin (Use when you have a fixed input impedance requirement).
- Solving for Input Resistor: Rin = -Rf / Av (Use when you need to limit the feedback resistor size to reduce thermal noise).
- Solving for Output Voltage: Vout = Vin × -(Rf / Rin) (Use to verify if the output will clip against the supply rails).
- Solving for Input Voltage: Vin = Vout / -(Rf / Rin) (Use when reverse-engineering a PCB or debugging an unexpected output).
Solved Problems with Unit Tracking
Abstract algebra is useless if you drop a zero. Here are two common bench scenarios with explicit unit tracking to ensure your math translates to physical components.
Problem 1: Sensor Signal Scaling for an ADC
Setup: You have a thermocouple amplifier outputting a 0 to 50 mV DC signal. You need to invert and scale this to a 0 to -2.5 V range to feed into a microcontroller's ADC. You decide to use an input resistor (Rin) of 2.0 kΩ to set the input impedance.
Step 1: Calculate Required Gain
- Av = Vout / Vin
- Av = -2.5 V / 0.050 V = -50 V/V
Step 2: Calculate Rf with Unit Tracking
- Rf = -Av × Rin
- Rf = -(-50 V/V) × 2,000 Ω
- Rf = 50 × 2,000 Ω = 100,000 Ω
- Rf = 100 kΩ
Bench Note: 100 kΩ is a standard E24 resistor value. If you needed a gain of -50.5, you would calculate 101 kΩ and select the closest E96 value (102 kΩ or 100 kΩ with a trimmer potentiometer in series).
Problem 2: Reverse-Engineering a Mystery PCB
Setup: You are probing a legacy audio board. You measure an output voltage (Vout) of -3.3 V DC at the output pin of an op-amp. The color bands on the feedback resistor indicate 47 kΩ, and the input resistor is 4.7 kΩ. What is the input voltage?
Step 1: Determine the Gain
- Av = -(47,000 Ω / 4,700 Ω) = -10 V/V
Step 2: Solve for Vin with Unit Tracking
- Vin = Vout / Av
- Vin = -3.3 V / -10 V/V
- Vin = +0.33 V (or 330 mV)
Real-World Scenario: Audio Preamp Clipping Disaster
The Setup: A hobbyist is building a microphone preamp using an NE5532 audio op-amp powered by a standard dual bench supply set to ±12 V (Total 24 V span). The microphone outputs a 200 mV peak AC sine wave. The builder wants a massive gain of -100 to drive a line-level input, so they install Rin = 1 kΩ and Rf = 100 kΩ.
The Numbers (Ideal Math):
- Vin(peak) = 0.2 V
- Av = -(100 kΩ / 1 kΩ) = -100
- Vout(peak) = 0.2 V × -100 = -20 V peak
The Outcome: When the builder hooks up the oscilloscope, the output is not a clean 20 V peak sine wave. Instead, it is a heavily distorted, flat-topped waveform that peaks at roughly ±10.5 V and stays there for the duration of the signal peak.
What Went Wrong: The formula didn't fail; the hardware did. The NE5532 is not a rail-to-rail output op-amp. According to its datasheet, when powered by ±12 V rails and driving a standard load, the maximum output voltage swing is typically ±10.5 V. The ideal formula demanded ±20 V, but the physical silicon ran out of headroom at 10.5 V, causing hard clipping. Furthermore, the Gain Bandwidth Product (GBWP) of the NE5532 is 10 MHz. At a gain of 100, the bandwidth is restricted to 100 kHz, which is fine for audio, but if they had pushed the gain to -1000, the bandwidth would have collapsed to 10 kHz, rolling off high-frequency audio transients.
Unit Mistakes and Assumption Violations That Break the Math
If your physical circuit isn't matching your spreadsheet, you have likely violated one of the following rules.
1. The Unit Prefix Trap (kΩ vs Ω)
The most common beginner mistake is mixing base units and prefixed units in the same equation without converting. If Rf = 100 (meaning 100 Ω) and Rin = 10 kΩ (10,000 Ω), the gain is -0.01, not -10. Rule: Always convert both resistors to base Ohms (Ω) before dividing, or ensure both are in the exact same prefix (e.g., both in kΩ). 100 kΩ / 10 kΩ = 10. The units cancel out cleanly.
2. Realistic Answer Magnitudes
What does a realistic gain magnitude look like? In 95% of practical DC and audio applications, closed-loop gain should be kept between -1 and -100. If your formula spits out a required gain of -5,000, stop. No standard op-amp will execute a closed-loop gain of 5,000 accurately at useful frequencies due to open-loop gain roll-off. Instead, cascade two inverting stages (e.g., Stage 1: Gain -50, Stage 2: Gain -100) to achieve -5,000 while maintaining bandwidth and stability.
3. The Input Bias Current DC Offset
The ideal formula assumes zero current enters the op-amp inputs. Real op-amps require a small "input bias current" (Ib) to bias their internal transistors. If you use a massive feedback resistor to achieve high gain (e.g., Rf = 10 MΩ), this bias current flows through Rf and creates a massive DC offset voltage at the output (Voffset = Ib × Rf).
Example: An older bipolar op-amp might have an Ib of 100 nA. 100 nA × 10 MΩ = 1 Volt of unwanted DC offset sitting on your output. To fix this, either use an op-amp with FET/CMOS inputs (where Ib is in the picoamp range) or keep your resistor values in the 1 kΩ to 100 kΩ range.
4. Forgetting the Virtual Ground Bias (Single Supply Designs)
The formula assumes the non-inverting input is tied to ground (0 V). If you are running an op-amp off a single 5 V supply (0 V and 5 V rails), tying the non-inverting pin to 0 V means the op-amp cannot output negative voltages. An input signal that should result in a negative output will simply clip at 0 V. For single-supply inverting amplifiers, you must bias the non-inverting input to a mid-rail reference voltage (e.g., 2.5 V) and AC-couple your input and output signals with capacitors. The gain formula still applies to the AC signal component, but the DC operating point shifts entirely.






