The closed-loop voltage gain formula for a non-inverting operational amplifier is Av = 1 + (Rf / Ri), and for an inverting configuration, it is Av = -(Rf / Ri). These equations dictate the ratio of output voltage to input voltage when negative feedback is applied. However, blindly plugging numbers into these formulas without accounting for supply rails, bandwidth limits, and open-loop gain degradation is the most common cause of bench failures in analog design. Below, we break down the exact mathematics, track units through real-world scenarios, and define the physical boundaries where the ideal math breaks down.
The Core Gain Formula Op Amp Equations
Operational amplifiers (op-amps) rely on negative feedback to force the voltage difference between their inverting (-) and non-inverting (+) inputs to virtually zero. This 'virtual short' principle is the foundation of the gain formulas. The equations apply strictly when the op-amp is operating in its linear region—meaning the output has not hit the supply rails (clipping) and the signal frequency is well below the device's bandwidth limit.
For a non-inverting amplifier (signal applied to the + terminal), the output is in phase with the input, and the minimum possible gain is 1 (a unity-gain buffer). For an inverting amplifier (signal applied to the - terminal via a resistor), the output is 180° out of phase with the input, and the gain magnitude can be less than, equal to, or greater than 1.
Symbol Definitions and Rearranged Forms
To use the gain formula op amp equations correctly, every variable must be tracked with its proper unit. Gain itself is a dimensionless ratio, though it is often expressed in Volts per Volt (V/V) or decibels (dB).
| Symbol | Parameter Name | Standard Unit | Typical Real-World Range |
|---|---|---|---|
| Av | Closed-Loop Voltage Gain | Dimensionless (V/V) | 1 to 100 (Single stage) |
| Rf | Feedback Resistor | Ohms (Ω) | 1 kΩ to 1 MΩ |
| Ri | Input / Ground Resistor | Ohms (Ω) | 1 kΩ to 100 kΩ |
| Vin | Input Voltage | Volts (V) | mV to low single-digit V |
| Vout | Output Voltage | Volts (V) | Bounded by supply rails |
Rearranged Forms for Component Selection
When designing a circuit, you rarely solve for Av directly; you usually have a target gain and need to select standard E24/E96 resistor values. Here are the rearranged forms:
- Non-Inverting Feedback Resistor: Rf = Ri × (Av - 1)
- Non-Inverting Ground Resistor: Ri = Rf / (Av - 1)
- Inverting Feedback Resistor: Rf = |Av| × Ri
- Inverting Input Resistor: Ri = Rf / |Av|
- Output Voltage (Both): Vout = Av × Vin
- Input Voltage (Both): Vin = Vout / Av
Worked Examples with Unit Tracking
Let's apply these formulas to two distinct bench scenarios, tracking units at every step to prevent magnitude errors.
Problem 1: Non-Inverting Audio Preamplifier
Scenario: You are building a microphone preamp using an NE5532 dual op-amp. The non-inverting input receives an AC signal. Your feedback network consists of Rf = 47 kΩ and Ri = 4.7 kΩ. The input signal from the electret capsule is measured at 50 mVRMS. Find the voltage gain and the final output voltage.
- Identify Formula: Non-inverting topology. Av = 1 + (Rf / Ri)
- Convert Units: Rf = 47,000 Ω; Ri = 4,700 Ω; Vin = 0.050 V
- Calculate Gain: Av = 1 + (47,000 / 4,700) = 1 + 10 = 11 V/V
- Calculate Output: Vout = Av × Vin = 11 × 0.050 V = 0.55 VRMS (or 550 mVRMS)
Problem 2: Inverting Sensor Conditioning (The Single-Supply Trap)
Scenario: You are conditioning a 0-100 mV DC sensor signal using a TLV2372 rail-to-rail op-amp powered by a single 3.3V supply (VCC = 3.3V, VEE = 0V/GND). You need an inverting gain of -15. You select Ri = 10 kΩ. Find Rf, calculate the ideal Vout for a 100 mV input, and determine the actual physical output.
- Calculate Rf: |Av| = Rf / Ri → 15 = Rf / 10,000 Ω → Rf = 150,000 Ω (150 kΩ)
- Calculate Ideal Vout: Vout = Av × Vin = -15 × 0.100 V = -1.5 V
- Apply Physical Limits: The TLV2372 is powered between 3.3V and 0V. An op-amp cannot output a voltage lower than its negative supply rail (VEE). Because VEE is 0V, the output cannot swing to -1.5 V.
- Actual Result: The op-amp will clip. The actual output will saturate near the lower rail, likely reading around 0.05 V to 0.1 V (the typical low-side saturation voltage for a rail-to-rail output stage sourcing no current). The formula is mathematically correct but physically invalid for this supply configuration.
Real-World Assumptions, Unit Traps, and Magnitude Checks
The standard gain formula op amp equations assume an 'ideal' op-amp. In practice, you must account for three major deviations to ensure your circuit works on the bench.
1. The Finite Open-Loop Gain (AOL) Assumption
The derivation of Av = 1 + (Rf/Ri) assumes the op-amp's internal open-loop gain (AOL) is infinite. In reality, a general-purpose LM358 has an AOL of about 100 dB (100,000 V/V), while a precision OPA2134 might offer 120 dB. If you attempt a closed-loop gain of 1,000 V/V using an LM358, the actual gain will fall noticeably short of the formula's prediction because AOL is being depleted. According to Texas Instruments' op-amp theory guidelines, the rule of thumb is to keep your closed-loop gain at least 100 times smaller than the op-amp's AOL to maintain formula accuracy.
2. Unit Mistakes That Break the Math
The most frequent calculation error occurs when mixing resistor prefixes. If Rf is 1 MΩ (1,000,000 Ω) and Ri is 10 kΩ (10,000 Ω), the ratio is 100. If you mistakenly plug in '1' and '10' without converting to base Ohms, you will calculate a ratio of 0.1, resulting in a completely wrong gain. Always convert both resistors to the same prefix (e.g., both in kΩ) before dividing. Furthermore, remember that Av is a ratio (V/V). It does not have a unit of Volts. Multiplying a gain of '10' by a 5V supply does not yield '50 Volts' of gain; it yields an output of 50V (which will instantly clip on a standard 15V supply).
3. Realistic Magnitudes and the GBWP Limit
Do not attempt to achieve a gain of 5,000 in a single op-amp stage. High gains amplify input offset voltage and noise, and they severely restrict bandwidth due to the Gain-Bandwidth Product (GBWP). If your op-amp has a GBWP of 1 MHz (like the common TL072), setting a closed-loop gain of 100 V/V limits your maximum usable frequency to just 10 kHz. For high-gain requirements, cascade two stages (e.g., two stages with a gain of 20 each yields a total gain of 400) to preserve bandwidth and stability, a principle heavily detailed in Analog Devices' MT-033 tutorial.
Frequently Asked Questions
How does finite open-loop gain affect the closed-loop gain formula op amp calculation?
When open-loop gain (AOL) is finite, the actual closed-loop gain is slightly lower than the ideal formula predicts. The exact equation becomes Aactual = Aideal / (1 + (Aideal / AOL)). For most DC and low-frequency audio applications using modern precision op-amps, AOL is so large (e.g., 1,000,000 V/V) that the error is negligible. However, at high frequencies where AOL rolls off, or when using older/cheaper parts like the LM324 at high gains, this discrepancy becomes measurable on an oscilloscope.
Why is my op-amp output clipping when the gain formula says it should not?
The gain formula only calculates the demanded output voltage; it does not know your power supply limits. If your formula dictates an output of 12V, but your op-amp is powered by ±5V rails, the output will hard-clip at approximately ±3.5V to ±4V (depending on the output stage topology). Additionally, standard op-amps cannot swing all the way to the supply rails; you must check the 'Output Voltage Swing' parameter in the datasheet to find the true maximum and minimum limits.
Can I use the DC gain formula op amp equations for AC signals and capacitors?
Yes, but you must replace the resistors with complex impedance (Z). For an inverting AC amplifier where the feedback element is a capacitor (an integrator) or a parallel RC network (an active low-pass filter), the gain formula becomes Av = -Zf / Zi. The magnitude of the gain will then vary with frequency. For simple AC coupling (where a capacitor is just blocking DC at the input), the standard resistor-based gain formula still applies perfectly to the AC signal passing through.
What is the difference between voltage gain (V/V) and decibel (dB) gain in op-amp circuits?
Voltage gain (V/V) is the linear ratio of Vout to Vin. Decibels (dB) express this ratio on a logarithmic scale, which is vastly more useful for audio, RF, and filter design because it allows you to add gains of cascaded stages rather than multiply them. The conversion formula is Gain (dB) = 20 × log10(Av). For example, a linear voltage gain of 10 V/V equals 20 dB, while a gain of 100 V/V equals 40 dB. Note the multiplier is 20 (for voltage), not 10 (which is used for power ratios).






