PortDock

Op Amp Gain Calculator (Non-inverting, Inverting, Differential)

Op amp gain, dB and output for non-inverting, inverting and differential circuits from Rf and Rg, with open-loop gain error, bandwidth and E-series pairs.

Results
Ideal gain
dB (20 log|G|)
Noise gain 1 + Rf/Rg
Output voltage (ideal)
Gain at open-loop gain A / error
Closed-loop bandwidth ≈ GBW ÷ noise gain
Input pin voltage (differential: E2 × Rf/(Rin + Rf))

Standard resistors for a target gain

Rf needed (with the Rg above)
Nearest standard value
Gain with it / difference from target

The defaults (non-inverting, Rf 100 kΩ, Rg 10 kΩ, A 100 dB, GBW 1 MHz) are an example. Enter open-loop gain and GBW from your op amp's datasheet.

Results update as you type. Everything runs in your browser; nothing you type is sent anywhere.

Formulas

  • Non-inverting: Vout = (1 + Rf/Rg) × Vin
  • Inverting: Vout = −(Rf/Rin) × Vin
  • Differential (matched Rf, Rin top and bottom): Vout = (Rf/Rin) × (E2 − E1)
  • Summing (inverting): Vout = −Rf × (E1/R1 + E2/R2 + …)
  • dB = 20 × log10|G| (×10 = 20 dB, ×100 = 40 dB)
  • With open-loop gain A: G ≈ ideal gain ÷ (1 + noise gain ÷ A)
  • Closed-loop bandwidth ≈ GBW ÷ (1 + Rf/Rg)

Common E12 resistor pairs (GBW 1 MHz)

CircuitRf / RgGaindBBandwidth
Non-inverting10k / 10k26.0 dB500 kHz
Non-inverting22k / 10k3.210.1 dB313 kHz
Non-inverting47k / 10k5.715.1 dB175 kHz
Non-inverting100k / 10k1120.8 dB90.9 kHz
Non-inverting1M / 10k10140.1 dB9.9 kHz
Inverting10k / 10k-10.0 dB500 kHz
Inverting100k / 10k-1020.0 dB90.9 kHz
Inverting1M / 10k-10040.0 dB9.9 kHz

Inverting amplifiers also divide GBW by the noise gain 1 + Rf/Rin — a gain −1 inverter has noise gain 2, so half the bandwidth of a follower (gain 1) (TI handbook figures 40 and 41).

Finite open-loop gain (TI handbook figure 30 example)

TI's handbook takes an op amp with open-loop gain A = 10,000, 50 kΩ input impedance and 100 Ω output impedance, builds an inverting amplifier with ZI = 10 kΩ and ZO = 100 kΩ (ideal gain −10) driving 10 kΩ, and finds an error term δ ≈ 0.0013, so the real gain is −9.987 (0.13 % off). It notes the error can be trimmed out with the feedback resistor, after which a 10 % change in A moves the gain by less than 0.02 %. The calculator above uses the same expression with infinite input and zero output impedance (δ = noise gain ÷ A).

How to read it

  • A non-inverting amplifier cannot have gain below 1. To attenuate, put a divider in front or use an inverting stage.
  • A differential amplifier cancels common-mode voltage only if the top and bottom resistor ratios match. A mismatch within resistor tolerance leaves some common mode in the output.
  • The op amp's input pins must stay within the common-mode range. In a differential amplifier they sit at E2 × Rf/(Rin + Rf); check that too (TI handbook p.25).
  • The output clips near the supply rails. If the calculated output is beyond the supply, check the datasheet's output swing.

Where it is used

  • Amplifying mV-level signals from thermocouples, load cells or shunt resistors to an ADC or PLC analog input range (non-inverting, differential).
  • Scaling the voltage across a 4–20 mA receiver resistor to 0–10 V or 0–3.3 V.
  • Amplifying only the difference between two points (a bridge output) while rejecting the common voltage (differential).

FAQ

What is the op amp gain formula?

Non-inverting: 1 + Rf/Rg; inverting: −Rf/Rin. With Rf = 100 kΩ and Rg = 10 kΩ, non-inverting gain is 11 (20.8 dB) and inverting −10 (20 dB).

Inverting vs non-inverting?

An inverting amplifier flips the sign and has an input impedance of Rin. A non-inverting amplifier keeps the sign and has very high input impedance, so it barely loads a sensor.

How do I convert gain to dB?

20 × log10(gain). ×10 = 20 dB, ×100 = 40 dB, ×1000 = 60 dB.

What happens to bandwidth at high gain?

Bandwidth ≈ GBW ÷ noise gain. A 1 MHz GBW op amp at a non-inverting gain of 101 is flat to about 9.9 kHz. For more bandwidth use a higher-GBW op amp or split the gain into two stages.

To turn the amplified voltage into ADC counts, use the ADC Resolution Calculator. To make a value from two resistors, use the Parallel & Series Resistor Calculator.

Basis

Formulas are from Texas Instruments' «Handbook of Operational Amplifier Applications» (SBOA092B) pp.15, 17, 18 (non-inverting, inverting), pp.23–25 (summing, differential), pp.27–28 (figure 30 — finite-gain example −9.987), p.31 (dB) and pp.36–37 (figures 40, 41 — bandwidth). Tests check that this calculator reproduces its example. Standard resistor values: Vishay 28372 (IEC 60063 tables). For open-loop gain, GBW and common-mode range, check your op amp's datasheet.