To calculate the closed-loop voltage gain (Av) of an operational amplifier, you must first identify the circuit topology. For an inverting amplifier, the formula is Av = -(Rf / Rin). For a non-inverting amplifier, the formula is Av = 1 + (Rf / Rin). In both cases, the gain is dictated entirely by the external feedback resistors, not the internal silicon of the op-amp, provided the circuit operates within its linear region.

While modern precision op-amps like the Texas Instruments OPA2134 or the classic TL072 boast massive internal open-loop gains, we use negative feedback to tame this gain into predictable, stable closed-loop values. Below, we break down the exact mathematics, component selection frameworks, and real-world bench limitations you need to design reliable analog front-ends.

The Core Gain Formulas and Symbol Definitions

The relationship between the input voltage, output voltage, and the feedback network is defined by the following fundamental equations. Note that Av represents the ratio of output to input, often expressed in Volts per Volt (V/V).

  • Inverting Configuration: Av = -(Rf / Rin)
  • Non-Inverting Configuration: Av = 1 + (Rf / Rin)
Symbol Parameter Standard Unit Description & Bench Context
Av Closed-Loop Voltage Gain V/V (or dB) The multiplier applied to Vin. A negative value indicates a 180° phase shift (inversion).
Rf Feedback Resistor Ohms (Ω) Connects the output pin to the inverting (-) input. Sets the upper limit of the gain ratio.
Rin Input Resistor Ohms (Ω) Connects the signal source to the inverting (-) input (inverting config) or grounds the inverting input (non-inverting config).
Vout Output Voltage Volts (V) The actual voltage measured at the op-amp output pin relative to circuit ground.
Vin Input Voltage Volts (V) The source signal voltage applied to the amplifier input.

Rearranged Forms for Component Selection

On the bench, you rarely know all variables upfront. Usually, you have a target gain or a required output swing, and you need to calculate the missing resistor value. Here are the algebraically rearranged forms for the non-inverting topology (the most common for sensor buffering).

  • Solve for Feedback Resistor (Rf): Rf = Rin × (Av - 1)
  • Solve for Input Resistor (Rin): Rin = Rf / (Av - 1)
  • Solve for Output Voltage (Vout): Vout = Vin × [1 + (Rf / Rin)]
  • Solve for Input Voltage (Vin): Vin = Vout / [1 + (Rf / Rin)]
Pro-Tip for Inverting Configurations: If you are designing an inverting amplifier, drop the "1 +" from the equations above, and remember to append a negative sign to your final Av or Vout calculation.

Worked Examples with Unit Tracking

The most common point of failure for hobbyists and junior engineers is dropping a milli- prefix or mixing kilo-ohms with base ohms. Let us walk through two real-world scenarios with explicit unit tracking.

Example 1: Inverting Audio Preamplifier

Scenario: You are building a microphone preamp using an inverting configuration. Rf = 100 kΩ, Rin = 10 kΩ. The microphone outputs a peak signal of Vin = 50 mV. Calculate Av and Vout.

  1. Calculate the Gain Ratio (Av):
    Av = -(Rf / Rin)
    Av = -(100 kΩ / 10 kΩ)
    Notice that the 'kilo' prefix cancels out in a ratio.
    Av = -10 V/V
  2. Convert Input Voltage to Base Units:
    Vin = 50 mV = 0.050 V
  3. Calculate Output Voltage (Vout):
    Vout = Av × Vin
    Vout = -10 V/V × 0.050 V
    Vout = -0.50 V (or -500 mV)

Example 2: Non-Inverting Sensor Conditioner

Scenario: You need to amplify a 330 mV temperature sensor signal to exactly 3.3 V to maximize the resolution of an ESP32's 12-bit ADC. You have a 4.7 kΩ resistor for Rin. Find the required Rf.

  1. Determine Required Gain (Av):
    Av = Vout / Vin
    Av = 3.3 V / 0.330 V = 10 V/V
  2. Rearrange Formula to Solve for Rf:
    Rf = Rin × (Av - 1)
    Rf = 4.7 kΩ × (10 - 1)
    Rf = 4.7 kΩ × 9 = 42.3 kΩ
  3. Select Standard Component & Recalculate:
    42.3 kΩ is not a standard E24 resistor value. The closest standard value is 43 kΩ.
    Actual Av = 1 + (43 kΩ / 4.7 kΩ) = 1 + 9.148 = 10.148 V/V.
    Actual Vout = 0.330 V × 10.148 = 3.349 V. (This is safely within the ESP32's 3.3V - 3.6V absolute max tolerance, but ideally, you would use a 41.2 kΩ E96 precision resistor for exact 3.3V).

Assumptions, Limits, and Realistic Magnitudes

The formulas above rely on the Ideal Op-Amp Model. According to Analog Devices' Basic Linear Design handbook, this model assumes infinite open-loop gain, infinite input impedance, and zero output impedance. In reality, these assumptions break down at the edges.

When the Formula Applies (and When It Fails)

The closed-loop gain equations only apply when the op-amp is operating in its linear region with negative feedback. If your calculated Vout exceeds the power supply rails, the formula fails. For example, if you calculate a Vout of 18 V, but your op-amp is powered by a standard ±15 V supply (or a single 12 V battery), the output will hard-clip at the saturation voltage (typically 1.5 V to 2 V below the positive rail for older parts like the LM741, or within millivolts of the rail for modern rail-to-rail CMOS op-amps).

The Unit Mistakes That Break Designs

The Ratio Trap: When calculating Av = Rf / Rin, the units cancel out. 100 kΩ / 10 kΩ is identical to 100,000 Ω / 10,000 Ω. However, if you mix units (e.g., 100 kΩ / 100 Ω), you must convert them to the same base prefix first, or your gain will be off by a factor of 1,000.

The Voltage Trap: Gain is a dimensionless multiplier (V/V). If your Vin is in millivolts, your Vout will also be in millivolts unless you explicitly convert. Multiplying a 50 mV input by a gain of 100 yields 5,000 mV (5 V), not 5,000 V.

Realistic Answer Magnitudes

What should your Av actually look like on paper? Texas Instruments Precision Labs training modules emphasize that while an op-amp's open-loop gain (AOL) might be 120 dB (1,000,000 V/V), you never use it without feedback. Realistic closed-loop magnitudes are:

  • Audio Line Level: 1 V/V to 10 V/V (Unity to +20 dB)
  • Microphone Preamplification: 20 V/V to 100 V/V (+26 dB to +40 dB)
  • Sensor Signal Conditioning: 10 V/V to 1,000 V/V (Thermocouples and strain gauges)

If your calculated closed-loop gain exceeds 1,000 V/V in a single stage, you will likely run into Gain-Bandwidth Product (GBWP) limitations and amplify the op-amp's inherent Input Offset Voltage (VOS) to the point of DC saturation. For gains >1,000, cascade two lower-gain stages.

Frequently Asked Questions

How to calculate gain in op amp circuits on a single supply?

The fundamental gain formulas (Av = 1 + Rf/Rin) remain exactly the same on a single supply. However, because a single-supply op-amp cannot output negative voltages, you must bias the non-inverting input to a virtual ground (usually VCC/2) using a voltage divider. The gain formula then applies to the AC signal riding on top of that DC bias. The output voltage will be Vout = Vbias + (Vin(ac) × Av).

How to calculate open-loop gain in op amp datasheets from dB?

Datasheets often specify open-loop gain (AOL) in decibels (dB). To convert this back to the standard V/V ratio for error calculations, use the formula: Av(V/V) = 10(dB / 20). For example, if an OPA2134 datasheet lists an AOL of 120 dB, the linear gain is 10(120/20) = 106, or 1,000,000 V/V.

How to calculate gain in op amp summing configurations?

In an inverting summing amplifier with multiple input resistors (R1, R2, R3) tied to the inverting node, the gain for each individual input channel is calculated independently using the core formula: Av1 = -(Rf / R1), Av2 = -(Rf / R2), etc. The total output voltage is the sum of the individually amplified inputs: Vout = -[ (V1 × Rf/R1) + (V2 × Rf/R2) ].