The closed-loop voltage gain formula for a standard non-inverting operational amplifier is A_v = 1 + (R_f / R_in), and for an inverting configuration, it is A_v = -(R_f / R_in). These equations dictate exactly how an op-amp scales an input signal based on the external feedback network. While simulation software can spit out these numbers instantly, understanding the derivation, the strict unit tracking required, and the physical silicon limitations is what separates a textbook student from a competent bench engineer.
The Core Op Amp Gain Formula and Its Assumptions
Before plugging numbers into the op amp gain formula, you must understand the boundary conditions where the math holds true. These formulas are derived from the ideal op-amp model, which assumes three critical conditions:
- Infinite Open-Loop Gain (A_OL): The internal gain of the op-amp without feedback is assumed to be infinite. In reality, a typical part like the TL072 has an open-loop gain of roughly 100 dB to 120 dB (100,000 to 1,000,000 V/V). As long as your closed-loop gain is significantly lower than the open-loop gain, the formula remains accurate.
- Infinite Input Impedance: No current flows into the inverting (-) or non-inverting (+) input pins. This forces all current through the input resistor to flow through the feedback resistor.
- Virtual Short Circuit: When negative feedback is applied and the op-amp is operating in its linear region, the voltage difference between the two input pins is driven to zero (V+ = V-).
Symbol Definitions and Rearranged Forms
To use the formula effectively on the bench, you need to know exactly what each variable represents and how to isolate them when designing a circuit from a required specification.
| Symbol | Parameter | Standard Unit | Engineering Notes |
|---|---|---|---|
| A_v | Closed-Loop Voltage Gain | V/V (Dimensionless) | Often expressed in decibels (dB) as 20 * log10(A_v). |
| V_out | Output Voltage | Volts (V) | Bounded by the positive and negative supply rails. |
| V_in | Input Voltage | Volts (V) | The signal applied to the active input pin. |
| R_f | Feedback Resistor | Ohms (Ω) | Connects the output pin to the inverting input pin. |
| R_in | Input / Ground Resistor | Ohms (Ω) | Connects the inverting input to ground (non-inv) or to V_in (inv). |
Rearranged Forms for Circuit Design
When designing an amplifier, you usually start with the required gain and the input/output voltages, meaning you need to solve for the resistor values. Here are the rearranged forms for the non-inverting configuration:
- Solving for Feedback Resistor: R_f = R_in * (A_v - 1)
- Solving for Input Resistor: R_in = R_f / (A_v - 1)
- Solving for Output Voltage: V_out = V_in * [1 + (R_f / R_in)]
- Solving for Input Voltage: V_in = V_out / [1 + (R_f / R_in)]
Solved Problems: Tracking Units from Millivolts to Volts
The most common point of failure in op-amp calculations isn't the algebra; it's the unit tracking. Let's walk through two problems with explicit intermediate steps.
Problem 1: Non-Inverting Sensor Amplifier
Given: A thermocouple pre-amp delivers a V_in of 150 mV. The feedback network uses R_f = 47 kΩ and R_in = 10 kΩ. Find V_out.
Step 1: Standardize voltage units.
Convert millivolts to volts to prevent magnitude errors later.
150 mV = 0.150 V
Step 2: Calculate the resistor ratio.
Because both resistors are in kilo-ohms, the 'k' prefix cancels out in the division. You do not need to convert to base ohms, provided both share the same prefix.
Ratio = 47 kΩ / 10 kΩ = 4.7
Step 3: Apply the formula.
V_out = 0.150 V * (1 + 4.7)
V_out = 0.150 V * 5.7
V_out = 0.855 V (or 855 mV)
Problem 2: Inverting Audio Stage
Given: An inverting audio mixer stage has an output of V_out = -5.5 V. The resistors are R_f = 100 kΩ and R_in = 22 kΩ. Find the original V_in.
Step 1: Identify the configuration.
This is an inverting amplifier, so the gain formula is A_v = -(R_f / R_in).
Step 2: Calculate the gain (A_v).
A_v = -(100 kΩ / 22 kΩ) = -4.545 V/V
Step 3: Rearrange and solve for V_in.
V_in = V_out / A_v
V_in = -5.5 V / -4.545 V/V
V_in = 1.21 V
Real-World Bench Scenario: When the Math Meets the Silicon
Formulas assume ideal components. Silicon does not. Here is a classic scenario that burns hobbyists and junior engineers when transitioning from schematic capture to the physical breadboard.
The Numbers:
Required Gain = V_out(max) / V_in(max) = 5.0 V / 0.050 V = 100 V/V.
Using the non-inverting rearranged form: R_f = R_in * (100 - 1) = 99 * R_in.
You select R_in = 1 kΩ and use a 100 kΩ trimmer potentiometer for R_f, dialing it to exactly 99 kΩ.
The Outcome:
You power the LM358 with a 5.00 V single supply (V_CC = 5V, GND = 0V). You apply 50 mV to the input. Your multimeter reads an output of 3.65 V, not 5.0 V. The op-amp is clipping, and your ADC readings are non-linear at the top end.
What Went Wrong:
The math was perfect; the component selection was flawed. The LM358 is not a rail-to-rail output op-amp. Its datasheet specifies that the high-level output voltage (V_OH) is typically V_CC - 1.5 V. With a 5V supply, the absolute maximum output swing is roughly 3.5 V to 3.8 V. The op-amp saturated long before the math predicted it would.
The Fix:
You have two choices. First, you can increase the supply voltage to the LM358 (e.g., V_CC = 9V), which allows the output to swing up to 5V, and then use a resistor divider to drop the 5V signal down to the 3.3V logic level of your MCU. Second, you can replace the LM358 with a true rail-to-rail I/O (RRIO) op-amp like the MCP6002, which can swing within millivolts of the 5V rail on a 5V supply.
Common Unit Mistakes and Magnitude Reality Checks
When troubleshooting a circuit that isn't matching your calculations, run through this checklist of common mathematical and physical errors.
The Unit Traps
- Mixing prefixes in the resistor ratio: If R_f is 100 kΩ and R_in is 10 Ω, the ratio is not 10. It is 100,000 / 10 = 10,000. Always convert to base units (Ohms) if the prefixes differ.
- Forgetting to convert mV to V in the final multiplication: If your gain is 50 and your input is 20 mV, the output is 1,000 mV (1 V), not 1,000 V. Track the 'milli' prefix through the multiplication step.
- Confusing Power Gain with Voltage Gain: The op amp gain formula calculates voltage gain (V/V). If you need power gain or are calculating decibels for a power ratio, the formula changes to 10 * log10(P_out/P_in), not 20 * log10(V_out/V_in).
Magnitude Reality Checks
What should a realistic answer look like? If your calculation yields a closed-loop gain of 50,000 V/V, stop and check your schematic. You have likely either left the feedback loop open (measuring open-loop gain) or swapped your R_f and R_in values. Practical closed-loop discrete op-amp circuits rarely exceed a gain of 1,000 V/V (60 dB) in a single stage. If you need higher gain, cascade two stages (e.g., two stages of 31.6 V/V) to maintain bandwidth and stability.
Furthermore, always perform a 'rail check' before finalizing your design. Multiply your maximum expected input voltage by your calculated gain. If that number is even 0.1 V higher than your positive supply rail (or lower than your negative rail), your circuit will clip. For an authoritative deep dive into how op-amp limitations affect real-world gain and offset errors, review the Analog Devices MT-044 Tutorial and the TI Precision Labs Op-Amp training series.






