A IOT Bot LogoA IOT Bot

Op Amp Gain Calculator: Inverting & Non-Inverting

Calculate inverting and non-inverting op amp gain, find standard E24 resistor pairs, and prevent supply rail clipping with step-by-step formulas.

How it works

Operational Amplifiers (Op-Amps) configure fixed closed-loop voltage gain using negative feedback networks:

Non-Inverting Op Amp Gain Calculator

In a non-inverting configuration, input voltage Vin is applied directly to the non-inverting (+) input pin. The output remains in phase with the input:

Av = 1 + (Rf / Rg)

Because the ratio Rf/Rg is always positive, non-inverting gain is always greater than or equal to 1.

Inverting Op Amp Gain Calculator

In an inverting configuration, input voltage Vin is applied through resistor Rin to the inverting (-) pin, while the non-inverting (+) pin is held at ground (virtual ground):

Av = -Rf / Rin

The negative sign reflects the 180° phase inversion between input and output.

Supply-Rail Output Clipping

Real op-amps cannot output voltages higher than their positive supply rail (V+) or lower than their negative supply rail (V-). Standard rail-to-rail op-amps can swing within millivolts of the rails, while non-rail-to-rail models (like the LM358 or LM741) clip 1.5V to 2V inside the rails. If Av × Vin exceeds the rails, the waveform will be hard-clipped.

Worked example

Non-Inverting Worked Example

Suppose you choose Rf = 90 kΩ and Rg = 10 kΩ:

  • Av = 1 + (Rf / Rg)
  • Av = 1 + (90,000 / 10,000) = 1 + 9 = 10
  • An input signal of +0.2V produces an in-phase output of +2.0V.
Inverting Worked Example

Suppose you choose Rf = 100 kΩ and Rin = 10 kΩ:

  • Av = -Rf / Rin
  • Av = -100,000 / 10,000 = -10
  • An input signal of +0.2V produces an inverted output of -2.0V.

Common mistakes

  • Swapping Rf and Rin: In both formulas, feedback resistor Rf is divided by Rin (or Rg). Swapping them inverts the ratio.
  • Forgetting the +1 in non-inverting: A non-inverting amplifier's gain is always at least 1. Forgetting the +1 leads to incorrect resistor choices.
  • Ignoring input bias currents: Resistors over 1 MΩ introduce significant DC voltage offsets due to op-amp input bias currents.

Frequently Asked Questions

Why is non-inverting gain always greater than or equal to 1?

The formula for non-inverting gain is Av = 1 + (Rf / Rg). Since resistance values cannot be negative, the term (Rf / Rg) is always ≥ 0, which means Av is always at least 1. If Rf is 0Ω (or Rg is open/infinite), the circuit becomes a unity-gain buffer (voltage follower) with Av = 1.

Can an op-amp output exceed its supply voltage rails?

No. An op-amp can only output voltages within its power supply rails (V+ and V-). For example, with a single 0V to 5V supply, the output can never rise above 5V or drop below 0V, regardless of calculated gain. Signals exceeding these bounds saturate and clip.

How do I choose practical resistor values for Rf and Rin?

Typical practical resistor values range from 1 kΩ to 100 kΩ. Values below 1 kΩ draw excessive current from the op-amp output stage, while values above 1 MΩ are sensitive to PCB leakage currents, input bias currents, and stray parasitic capacitance.

Sources

  • Texas Instruments Application Report SLOA058: "A Single-Supply Op-Amp Circuit Collection".
  • Horowitz, P., & Hill, W. The Art of Electronics (3rd ed., Chapter 4: Operational Amplifiers).

Results are for engineering assistance. Verify important calculations and check official datasheets. See the Engineering Disclaimer.