The closed-loop voltage gain equation for a non-inverting operational amplifier is Av = 1 + (Rf / Rin), and for an inverting configuration, it is Av = -(Rf / Rin). These formulas allow you to set a precise, predictable amplification factor using external feedback resistors, effectively taming the op-amp's massive internal open-loop gain into a stable, usable circuit parameter.

The Core Op Amp Gain Equation and Symbol Definitions

Operational amplifiers are rarely used in their open-loop state because their internal gain is too high and unstable (often exceeding 100,000 V/V). By routing a portion of the output signal back to the inverting input, we create a "closed-loop" system. The gain is then dictated almost entirely by the ratio of two external resistors, rendering the op-amp's internal quirks largely irrelevant.

Below are the foundational formulas for the two most common closed-loop configurations:

  • Non-Inverting Amplifier: Av = 1 + (Rf / Rin)
  • Inverting Amplifier: Av = -(Rf / Rin)
Symbol Definition Table
Symbol Parameter Unit Practical Bench Notes
Av Closed-Loop Voltage Gain V/V (Dimensionless) Often expressed in decibels (dB) in audio/RF, where dB = 20 * log10(Av).
Rf Feedback Resistor Ohms (Ω) Connects the output pin to the inverting (-) input. Keep between 1kΩ and 100kΩ to balance noise and bias current errors.
Rin Input/Ground Resistor Ohms (Ω) Connects the inverting (-) input to ground (non-inverting) or to the signal source (inverting).
Vout Output Voltage Volts (V) Limited by the op-amp's supply rails. A standard LM358 on a 5V supply will clip around 3.5V to 4V.
Vin Input Voltage Volts (V) The signal applied to the non-inverting (+) pin or through Rin to the inverting (-) pin.

Standard E96 Resistor Pairs for Target Gains

In 2026, there is no reason to use 5% carbon composition resistors for analog gain staging. Precision 1% metal film resistors (E96 series) are standard and cost pennies. When designing a circuit, you rarely hit the exact theoretical resistor value. The table below maps common target gains to standard E96 resistor pairs, showing the actual realized gain and the resulting error percentage. This data-dense reference saves you from running trial-and-error calculations at the bench.

E96 1% Resistor Pairs for Non-Inverting Gain (Av = 1 + Rf/Rin)
Target Gain (V/V) Rf Value (kΩ) Rin Value (kΩ) Actual Gain (V/V) Error (%)
2.00 10.0 10.0 2.000 0.00%
3.00 20.0 10.0 3.000 0.00%
5.00 40.2 10.0 5.020 +0.40%
10.00 90.9 10.0 10.090 +0.90%
20.00 187 10.0 19.700 -1.50%
50.00 487 10.0 49.700 -0.60%
100.00 988 10.0 99.800 -0.20%

Note: For gains of 20 and above, consider using a two-stage amplifier (e.g., two stages of gain-5 to achieve gain-25) to preserve bandwidth and reduce offset voltage amplification.

When the Formula Applies (and When It Breaks)

The Ideal Assumptions

The gain equation op amp formulas rely on three "ideal" assumptions:

  1. Infinite Open-Loop Gain: Assumes the op-amp's internal gain is so high that the voltage difference between the (+) and (-) inputs is effectively zero (virtual short).
  2. Infinite Input Impedance: Assumes zero current flows into the input pins, meaning all current through Rin must flow through Rf.
  3. Zero Output Impedance: Assumes the op-amp can drive any load without the output voltage sagging.

Realistic Answer Magnitudes and the GBWP Wall

A realistic single-stage closed-loop gain ranges from 2 to 100 V/V. If your calculation yields a required gain of 5,000, the formula is mathematically correct but practically useless due to the Gain-Bandwidth Product (GBWP).

Every op-amp has a fixed GBWP. For a general-purpose LM358, the GBWP is roughly 1 MHz. If you set the closed-loop gain to 100, your maximum signal bandwidth drops to 10 kHz (1 MHz / 100). If you attempt a gain of 10,000 in a single stage, your bandwidth shrinks to 100 Hz, and the circuit will likely oscillate or act as a low-pass filter. For high-gain DC sensor applications (like thermocouples), use a dedicated instrumentation amplifier (e.g., INA128) or cascade two op-amp stages.

Unit Mistakes That Break the Math

The most common unit error occurs when calculating absolute voltages rather than ratios. Because Av is a ratio, using kΩ for both Rf and Rin works perfectly (the 'kilo' prefix cancels out). However, when calculating Vout = Av * Vin, hobbyists frequently mix millivolts and volts.

The Mistake: Vin = 50 mV, Av = 20. Calculating 50 * 20 = 1000V.
The Fix: Always convert inputs to base units (Volts, Amps, Ohms) before multiplying. 0.050 V * 20 = 1.0 V.

A secondary mistake involves absolute resistor values. While the ratio sets the gain, the absolute values dictate noise and bias current errors. Using Rf = 10 MΩ and Rin = 1 MΩ gives a gain of 11, but the input bias current of the op-amp flowing through 10 MΩ will generate massive offset voltages, completely invalidating the expected output. Keep resistor values between 1 kΩ and 100 kΩ.

Rearranged Forms for Component Selection

On the bench, you usually know the target gain and have a fixed input signal, meaning you need to solve for the resistors. Here are the rearranged forms for quick component selection:

Non-Inverting Configuration (Av = 1 + Rf/Rin)

  • Solve for Feedback Resistor: Rf = Rin * (Av - 1)
  • Solve for Input Resistor: Rin = Rf / (Av - 1)
  • Solve for Required Gain: Av = (Rf / Rin) + 1

Inverting Configuration (Av = -Rf/Rin)

  • Solve for Feedback Resistor: Rf = -Av * Rin (Use absolute value for physical resistor selection)
  • Solve for Input Resistor: Rin = -Rf / Av
  • Solve for Required Gain: Av = -(Rf / Rin)

Worked Examples with Unit Tracking

Below are two step-by-step bench scenarios demonstrating how to apply these equations, track units, and select real-world components.

Example 1: Non-Inverting Shunt Voltage Monitor

Scenario: You are measuring current across a shunt resistor. The maximum shunt voltage (Vin) is 45 mV. You need to scale this to 3.0 V to maximize the resolution of a 3.3V microcontroller ADC.
Goal: Find the required gain, select E96 resistors, and verify the final output voltage.

  1. Calculate Target Gain:
    Av = Vout / Vin
    Av = 3.0 V / 0.045 V = 66.67 V/V
  2. Rearrange for Resistor Ratio:
    Using the non-inverting formula: Av = 1 + (Rf / Rin)
    66.67 = 1 + (Rf / Rin)
    Rf / Rin = 65.67
  3. Select Standard E96 Components:
    Choose a standard Rin = 1.50 kΩ.
    Calculate ideal Rf: Rf = 1.50 kΩ * 65.67 = 98.505 kΩ.
    Looking up the E96 table, the closest 1% value is 98.8 kΩ.
  4. Verify Actual Gain and Output:
    Actual Av = 1 + (98.8 kΩ / 1.50 kΩ) = 1 + 65.867 = 66.867 V/V.
    Actual Vout = 66.867 * 0.045 V = 3.009 V.
    Result: 3.009 V is safely within the 3.3V ADC limit, with an error of less than 0.3% from the target.

Example 2: Inverting Audio Line Attenuator

Scenario: You are interfacing a +4 dBu professional audio line (nominal 1.228 V RMS) into a consumer line-in that expects -10 dBV (nominal 0.316 V RMS). You need to attenuate and invert the signal for a specific phase-alignment circuit.
Goal: Calculate the required inverting gain and select resistors to achieve an output of roughly -0.316 V from a 1.228 V input.

  1. Calculate Target Gain:
    Av = Vout / Vin
    Av = -0.316 V / 1.228 V = -0.2573 V/V
  2. Rearrange for Resistor Ratio:
    Using the inverting formula: Av = -(Rf / Rin)
    -0.2573 = -(Rf / Rin)
    Rf / Rin = 0.2573
  3. Select Standard E96 Components:
    Because this is an inverting configuration, Rin is in series with the audio source. To prevent loading the source, choose a relatively high Rin = 30.0 kΩ.
    Calculate ideal Rf: Rf = 30.0 kΩ * 0.2573 = 7.719 kΩ.
    The closest E96 value is 7.68 kΩ.
  4. Verify Actual Gain and Output:
    Actual Av = -(7.68 kΩ / 30.0 kΩ) = -0.256 V/V.
    Actual Vout = -0.256 * 1.228 V = -0.314 V RMS.
    Result: -0.314 V is exceptionally close to the -0.316 V target, safely matching the consumer audio level requirement. For further reading on op-amp impedance matching, refer to standard non-inverting and inverting amplifier tutorials.

By anchoring your designs to these closed-loop equations, tracking your units meticulously, and relying on 1% E96 resistor values, you eliminate the guesswork from analog amplification and ensure your circuits perform exactly as the math predicts.