The Core Op Amp Gain Calculation Formulas & Symbols

Before wiring any feedback network, you must define your target closed-loop voltage gain ($A_v$). The two foundational topologies—the non-inverting and inverting amplifiers—dictate how your feedback ($R_f$) and input ($R_i$) resistors scale the input signal. Below are the governing equations, followed by the strict symbol definitions required to avoid algebraic errors.

Non-Inverting Gain Formula:
A_v = 1 + (R_f / R_i)
Inverting Gain Formula:
A_v = -(R_f / R_i)

SymbolParameterStandard UnitPractical Notes
A_vClosed-Loop Voltage GainV/V (dimensionless)Often expressed in dB: 20 * log10(|A_v|).
R_fFeedback ResistorOhms (Ω)Connects output pin to inverting input. Keep between 1kΩ and 100kΩ to balance noise and bias current errors.
R_iInput / Ground ResistorOhms (Ω)Connects inverting input to signal source (inverting) or ground (non-inverting).
V_inInput VoltageVolts (V)The signal applied to the non-inverting (+) or inverting (-) terminal.
V_outOutput VoltageVolts (V)Calculated as V_in * A_v, bounded by the op-amp's supply rails.

Rearranged Forms for Component Sizing

When designing a circuit, you rarely solve for $A_v$ directly; you solve for the physical components. Use these rearranged forms to find your exact resistor values or predict signal limits:

  • Solve for R_f: R_f = R_i * (A_v - 1) (Non-inverting) | R_f = -R_i * A_v (Inverting)
  • Solve for R_i: R_i = R_f / (A_v - 1) (Non-inverting) | R_i = -R_f / A_v (Inverting)
  • Solve for V_out: V_out = V_in * A_v
  • Solve for V_in (max before clipping): V_in = V_out(max) / A_v

Assumptions, Unit Traps, and Realistic Magnitudes

The formulas above assume an ideal operational amplifier. In practice, every op-amp violates these assumptions in ways that break your circuit if ignored. The ideal model assumes infinite open-loop gain, infinite input impedance, and zero output impedance. It also assumes the output can swing perfectly to the positive and negative supply rails.

When the Formula Breaks Down (Real-World Limits)

  • Gain-Bandwidth Product (GBP): An op-amp's open-loop gain drops as frequency increases. If your op-amp has a GBP of 1 MHz (like the common LM358), and you set a closed-loop gain of 100, your maximum usable bandwidth drops to just 10 kHz. Above 10 kHz, the actual gain will be lower than your calculation.
  • Output Swing Limits: Standard op-amps (e.g., LM741, TL072) cannot swing their output all the way to the supply rails; they lose 1.5V to 2V on each end. A 'Rail-to-Rail Output' (RRO) op-amp like the MCP6002 gets within 50mV of the rails, but still cannot exceed them.
Realistic Magnitude Rule: Never design a single op-amp stage for a gain greater than 50. High gain in a single stage amplifies input offset voltage, increases noise, and severely chokes your bandwidth. If you need a gain of 1,000, cascade two stages with a gain of ~31.6 each.

Unit Mistakes That Ruin Calculations

  1. Mixing kΩ and Ω in the ratio: The formula R_f / R_i is a ratio. If $R_f$ is 100 kΩ and $R_i$ is 10 kΩ, the ratio is 10. If you accidentally plug in 100,000 for $R_f$ and 10 for $R_i$, your calculated gain jumps to 10,001. Fix: Always convert both resistors to the same base unit (Ohms) or same prefix (kilo-Ohms) before dividing.
  2. Mixing mV and V in V_out: If $V_in$ is 50 mV and $A_v$ is 20, $V_out$ is 1,000. But is that 1,000 Volts or 1,000 millivolts? Fix: Convert $V_in$ to Volts (0.050 V) before multiplying, so $V_out$ naturally yields Volts (1.0 V).

Worked Example 1: Sizing Feedback Resistors for a Sensor Preamp

Scenario: You are reading a pressure sensor that outputs 0 mV to 150 mV. Your microcontroller's ADC requires a 0 V to 3.3 V signal. You decide to use a non-inverting amplifier topology to maintain high input impedance.

Step 1: Calculate Target Gain ($A_v$)
A_v = V_out(max) / V_in(max)
A_v = 3.3 V / 0.150 V = 22 V/V

Step 2: Calculate the Resistor Ratio
Using the rearranged non-inverting formula:
R_f / R_i = A_v - 1
R_f / R_i = 22 - 1 = 21

Step 3: Select Standard E-Series Resistor Values
We need $R_f$ to be exactly 21 times larger than $R_i$.
Let's pick a standard $R_i$ of 10 kΩ.
R_f = 10 kΩ * 21 = 210 kΩ
Luckily, 210 kΩ is a standard value in the 5% E24 resistor series. If it were not, we would use 1% E96 series resistors or combine two standard values in series.

Step 4: Verify with Unit Tracking
At maximum sensor output ($V_in$ = 150 mV):
V_out = 150 mV * 22 = 3,300 mV
Convert to Volts for the ADC check:
3,300 mV / 1000 = 3.3 V (Matches ADC reference perfectly).

Worked Example 2: Predicting Output Clipping in an Audio Stage

Scenario: You are building an inverting preamp for a dynamic microphone using a TL072 op-amp powered by a dual ±9 V battery supply. You use $R_f$ = 100 kΩ and $R_i$ = 10 kΩ. The microphone outputs a 200 mV RMS sine wave.

Step 1: Calculate Closed-Loop Gain
A_v = -(R_f / R_i)
A_v = -(100 kΩ / 10 kΩ) = -10 V/V

Step 2: Convert RMS Input to Peak Voltage
Op-amp clipping occurs at the peak of the waveform, not the RMS value.
V_in(peak) = V_in(RMS) * √2
V_in(peak) = 200 mV * 1.414 = 282.8 mV = 0.2828 V

Step 3: Calculate Theoretical Peak Output
V_out(peak) = 0.2828 V * |-10| = 2.828 V

Step 4: Check Against Real-World Rail Limits
The theoretical output is ±2.828 V. However, the TL072 is not a rail-to-rail op-amp. According to the Texas Instruments TL072 datasheet, the typical output voltage swing is within 1.5 V of the supply rails under a 10 kΩ load.
Supply rails: +9 V and -9 V.
Maximum positive swing: +9 V - 1.5 V = +7.5 V
Maximum negative swing: -9 V + 1.5 V = -7.5 V
Conclusion: Since the theoretical peak (2.828 V) is well within the ±7.5 V linear swing limit, the signal will not clip. If the input spiked to 800 mV RMS (1.13 V peak), the theoretical output would be 11.3 V, which exceeds the 7.5 V rail limit, resulting in severe flat-top clipping.

Decision Tree: Selecting Your Op Amp and Resistor Network

Calculating the gain is only half the battle; selecting the physical silicon and passive components dictates whether the math holds up on the bench. Use this decision matrix to terminate your design process with concrete part numbers.

Application ConstraintIf True...Concrete Op-Amp PickResistor Network Strategy
Gain < 10, Audio/AC signals, Dual Supply (±12V)Prioritize low noise and high slew rate over DC precision.NE5532 or TL072Use 10kΩ for $R_i$. Keep $R_f$ < 100kΩ to minimize Johnson-Nyquist thermal noise.
Gain > 20, DC Sensor signals, Single Supply (3.3V or 5V)Prioritize low input offset voltage and rail-to-rail I/O.MCP6002 (General) or OPA2188 (Precision)Use 1% tolerance E96 resistors. Add a 100nF bypass cap directly across the VCC/GND pins.
High Gain (>50) required for wide bandwidth (>100kHz)Single stage will fail GBP limits. Must cascade.AD8065 (High GBP) or cascade two LMV321Stage 1: Gain of 10. Stage 2: Gain of 5 to 10. AC-couple between stages if DC offset accumulates.

The Default Bench Pick

If you are prototyping a generic single-supply (5V) sensor amplifier requiring a gain between 10 and 30, stop over-analyzing and use this exact bill of materials:

  • Op-Amp: Microchip MCP6002-I/P (DIP-8, Rail-to-Rail I/O, 1 MHz GBP, operates down to 1.8V).
  • $R_i$: 10 kΩ 1/4W 1% metal film resistor.
  • $R_f$: Select the nearest 1% E96 value to your target 10k * (A_v - 1). For a gain of 20, use a 191 kΩ 1% resistor (yielding an actual gain of 20.1).
  • Decoupling: 100 nF (0.1 μF) MLCC ceramic capacitor placed physically within 2mm of pins 8 (VCC) and 4 (GND).

For further reading on minimizing offset errors in high-gain configurations, refer to the All About Circuits op-amp fundamentals guide, which details how input bias currents interact with your chosen resistor values to create unexpected DC offsets at the output.