The fundamental op amp formula for closed-loop voltage gain (Av) depends entirely on your feedback topology. For a non-inverting amplifier, the gain is Av = 1 + (Rf / Rin). For an inverting amplifier, the gain is Av = -(Rf / Rin). These equations assume an ideal operational amplifier operating in its linear region with negative feedback. If your output hits the supply rails or your input exceeds the common-mode range, the ideal formula fails and the op amp saturates.

The Core Op Amp Formulas and Symbol Definitions

Before selecting resistors, you must map your circuit topology to the correct gain equation. The non-inverting configuration preserves the phase of the input signal (Vin), while the inverting configuration introduces a 180-degree phase shift, denoted by the negative sign in the Av equation.

Symbol Parameter Unit Definition & Practical Constraints
Av Closed-Loop Voltage Gain V/V (Dimensionless) The ratio of output voltage to input voltage. Often expressed in decibels (dB) as 20 * log10(|Av|).
Vout Output Voltage Volts (V) The voltage at the output pin. Constrained by the supply rails (VCC and VEE) minus the op amp's output headroom.
Vin Input Voltage Volts (V) The signal applied to the non-inverting (+) or inverting (-) terminal. Must remain within the common-mode input range.
Rf Feedback Resistor Ohms (Ω) Connects the output pin to the inverting (-) input. Typically 1kΩ to 100kΩ to balance noise and bias current errors.
Rin Input/Ground Resistor Ohms (Ω) In inverting configs, connects Vin to the (-) terminal. In non-inverting configs, connects the (-) terminal to ground.

Non-Inverting Gain Formula:
Av = 1 + (Rf / Rin)
Vout = Vin * [1 + (Rf / Rin)]

Inverting Gain Formula:
Av = -(Rf / Rin)
Vout = -Vin * (Rf / Rin)

Real-World Op Amp Parameters: Where the Ideal Formula Breaks

The ideal op amp formula assumes infinite open-loop gain (AOL), infinite input impedance, and zero output impedance. In reality, every physical silicon die has limits. According to the Texas Instruments Op-Amp Learning Hub, ignoring these real-world parameters is the primary reason bench prototypes fail to match theoretical calculations.

Below is a data-dense comparison of common op amps. Notice how the Gain-Bandwidth Product (GBP) and Slew Rate dictate the maximum frequency and voltage swing your Av formula can actually support.

Part Number Primary Use Case GBP (MHz) Slew Rate (V/µs) Input Offset (mV) Supply Range (V)
LM741 Legacy / Education 1.0 0.5 ±2.0 (Typ) ±10 to ±18
TL072 Audio / JFET Input 3.0 13.0 ±3.0 (Max) ±6 to ±18
OPA211 Precision / Low Noise 80.0 25.0 ±0.025 (Max) ±4 to ±18
MCP6001 Low Power / Rail-to-Rail 1.0 0.6 ±4.5 (Max) 1.8 to 6.0 (Single)

When the formula applies: The Av equations hold true for DC signals and low-frequency AC signals where the closed-loop gain is well below the op amp's GBP. For example, an LM741 with a 1 MHz GBP can only sustain an Av of 100 (40 dB) up to 10 kHz. Beyond that, the internal compensation capacitor rolls off the gain, and the ideal formula overestimates your actual output.

Assumptions to verify on the bench:

  • Negative Feedback: The output must be routed to the inverting (-) terminal. Positive feedback creates a comparator or oscillator, invalidating the linear Av formula.
  • Virtual Short: The formula assumes the voltage difference between the (+) and (-) inputs is exactly 0V. In reality, it is Vout / AOL. For an OPA211 with an AOL of 10 million, this error is negligible. For an LM741, it can introduce measurable DC offset.

Rearranged Forms for Component Selection

On the workbench, you rarely solve for Av directly. Usually, you know your sensor's Vin, your ADC's required Vout, and the standard resistor values in your kit. Here are the rearranged op amp formulas to solve for the exact component values you need.

Non-Inverting Configuration

  • Solve for Rf: Rf = Rin * [(Vout / Vin) - 1]
  • Solve for Rin: Rin = Rf / [(Vout / Vin) - 1]
  • Solve for Vin: Vin = Vout / [1 + (Rf / Rin)]
  • Solve for Vout: Vout = Vin * [1 + (Rf / Rin)]

Inverting Configuration

  • Solve for Rf: Rf = -Rin * (Vout / Vin)
  • Solve for Rin: Rin = -Rf / (Vout / Vin)
  • Solve for Vin: Vin = -Vout / (Rf / Rin)
  • Solve for Vout: Vout = -Vin * (Rf / Rin)
Bench Tip: When calculating Rf and Rin, always aim for resistor values between 1kΩ and 100kΩ. Values below 1kΩ force the op amp's output stage to source excessive current, increasing distortion and thermal drift. Values above 1MΩ amplify Johnson-Nyquist thermal noise and make the circuit highly susceptible to stray capacitance and PCB leakage currents.

Worked Examples with Unit Tracking

Let's apply the formulas to two common bench scenarios. Tracking units explicitly prevents the most common calculation errors.

Problem 1: Non-Inverting Sensor Amplifier

Scenario: You are reading a thermocouple that outputs a maximum of 15 mV. You need to scale this to 1.5 V to maximize the resolution of a 3.3V microcontroller ADC. You are using an OPA211 and have chosen Rin = 1 kΩ. What value must Rf be?

  1. Convert all units to base SI (Volts, Ohms):
    Vin = 15 mV = 0.015 V
    Vout = 1.5 V
    Rin = 1 kΩ = 1,000 Ω
  2. Calculate the required closed-loop gain (Av):
    Av = Vout / Vin
    Av = 1.5 V / 0.015 V = 100 V/V (Dimensionless)
  3. Apply the rearranged non-inverting formula for Rf:
    Rf = Rin * [(Vout / Vin) - 1]
    Rf = 1,000 Ω * [100 - 1]
    Rf = 1,000 Ω * 99
    Rf = 99,000 Ω
  4. Convert to standard engineering notation:
    Rf = 99 kΩ. (Use a standard 1% tolerance 98.8 kΩ or 100 kΩ resistor from your E96 kit).

Problem 2: Inverting Audio Mixer Stage

Scenario: You are building an audio summing mixer using a TL072. The input channel has Rin = 10 kΩ and the feedback loop has Rf = 47 kΩ. If the input signal from the guitar preamp peaks at -250 mV, what is the peak Vout?

  1. Convert units and identify topology:
    Topology: Inverting
    Vin = -250 mV = -0.250 V
    Rin = 10,000 Ω
    Rf = 47,000 Ω
  2. Calculate Av using the inverting formula:
    Av = -(Rf / Rin)
    Av = -(47,000 Ω / 10,000 Ω)
    Av = -4.7 V/V
  3. Calculate Vout with unit tracking:
    Vout = Av * Vin
    Vout = -4.7 V/V * (-0.250 V)
    Vout = +1.175 V
  4. Sanity Check: The double negative results in a positive output voltage. The TL072 on a standard ±15V supply can easily swing to +1.175 V without clipping.

Common Unit Mistakes and Magnitude Reality Checks

The math behind the op amp formula is simple algebra, but bench failures almost always stem from unit mismatches or ignoring the physical limits of the silicon. Here is what breaks the formula and how to catch it.

Unit Mistakes That Break the Calculation

  • Mixing kΩ and Ω without conversion: If Rf = 47 kΩ and Rin = 10 kΩ, the ratio is 4.7. If you accidentally type 47,000 / 10 into your calculator, you get an Av of 4,700. The units in the resistor ratio must cancel out perfectly to yield a dimensionless V/V gain.
  • Ignoring the sign of Vin: In inverting configurations, if your input signal is a negative-going pulse and you drop the negative sign in your Vin variable, your calculated Vout will have the wrong polarity. This leads to debugging phantom 'phase issues' on your oscilloscope.
  • Confusing V/V with dB: The formula outputs linear gain (V/V). If your spec sheet requires 40 dB of gain, you cannot plug '40' into the Av variable. You must convert first: Av (linear) = 10^(dB / 20). Therefore, 40 dB = 100 V/V.

Realistic Answer Magnitudes and Rail Saturation

The most dangerous flaw of the ideal op amp formula is that it has no ceiling. The equation will happily tell you that a 5V input with an Av of 10 yields a 50V output. In reality, the output magnitude is strictly clamped by the power supply rails.

According to the Analog Devices Op Amp Applications Handbook, you must always subtract the op amp's output voltage swing limitation (headroom) from your supply rails to find the true maximum Vout.

  • Standard Op Amps (e.g., LM741, TL072): These are not rail-to-rail. On a ±15V supply, the output transistors require about 1.5V to 2V of headroom. The realistic maximum magnitude for Vout is ±13V. If your formula yields 14V, the signal will flat-top (clip) at 13V.
  • Rail-to-Rail Output Op Amps (e.g., MCP6001): On a single 5V supply, the output can swing to within roughly 50 mV of the rails. The realistic maximum magnitude is 0.05V to 4.95V.

The Golden Rule of Magnitude: Before soldering a single resistor, calculate your theoretical Vout peak. If |Vout| ≥ (VCC - 1.5V) for standard parts, or |Vout| ≥ (VCC - 0.1V) for rail-to-rail parts, your design will clip. You must either reduce Av, lower Vin, or increase your supply voltage.