Op-Amp Gain Calculator

Gain in V/V and dB for inverting, non-inverting, difference and summing op-amps, with output clipping at the rails, GBW bandwidth and standard resistor pairs.

The interactive tool loads here when JavaScript runs.

About this tool

What is the Op-Amp Gain Calculator?

Two resistors set the gain of most op-amp stages, and the formulas are short, but the details trip people up: is it Rf ÷ Rin or 1 + Rf ÷ Rg, why does the output stop at 13.5 V on a 15 V supply, and why does a gain of 100 stage roll off at 10 kHz? This op-amp gain calculator handles the five circuits that cover most designs: inverting, non-inverting, voltage follower, four-resistor difference amplifier and inverting summer.

For each it gives the signal gain in V/V and dB, the noise gain, the output voltage for your input, and a clear warning when that output would run into the supply rails. Enter the gain-bandwidth product (GBW) from the datasheet to see the closed-loop bandwidth. In design mode you type the gain you want and the calculator lists the standard E12, E24 or E96 resistor pairs that come closest, with one click to load a pair back into the circuit.

  • Inverting, non-inverting, follower, difference and summing circuits
  • Gain in V/V and dB, noise gain and closed-loop bandwidth from GBW
  • Output clipping against the rails with adjustable swing loss
  • CMRR from resistor mismatch in the difference amplifier
  • Standard E12, E24 or E96 resistor pairs for a target gain
  • Copy results or share a link with your inputs
Read the guide: Op-Amp Gain Formulas: Inverting, Non-Inverting and Beyond

How to use the Op-Amp Gain Calculator

  1. Choose the configuration: inverting, non-inverting, voltage follower, differential or summing.
  2. Enter the resistors and the input voltage or voltages. For the summer, leave an input voltage blank to drop it.
  3. Set the supply rails, how far from each rail the output can swing, and the op-amp GBW.
  4. Read the gain in V/V and dB, the output voltage, the noise gain and the bandwidth. A warning appears if the output clips.
  5. For inverting or non-inverting stages, switch to Resistors from gain, enter the target, and pick a standard pair from the table.

Worked examples

Inverting amplifier with gain −10

Input

Rf 100 kΩ, Rin 10 kΩ, Vin 0.5 V, ±15 V, GBW 1 MHz

Output

Gain −10 V/V (20.00 dB), Vout −5 V, noise gain 11, bandwidth about 90.9 kHz

The bandwidth uses the noise gain of 11, not the signal gain of 10, so it is GBW ÷ 11 rather than GBW ÷ 10.

Clipping on the rails

Input

Inverting gain −23, Vin 1 V, ±15 V, swing loss 1.5 V

Output

Ideal −23 V, actual −13.5 V (clipped)

The output can only reach 1.5 V short of the negative rail. Halve the input or the gain, or use a rail-to-rail part on a wider supply.

Standard resistors for a gain of −23

Input

Design, |G| 23, Rin 10 kΩ, E24

Output

Best pair 2.7 kΩ and 62 kΩ: −22.963 (−0.161%)

The exact Rf for 10 kΩ input is 230 kΩ, not an E24 value. Changing the input resistor as well finds a much closer ratio.

Difference amplifier and resistor matching

Input

R1 10 kΩ, R2 100 kΩ, R3 10 kΩ, R4 100 kΩ, V1 1.0 V, V2 1.1 V

Output

Vout 1.000 V, differential gain 10, CMRR perfect

With unity gain and R4 just 1% high (10.1 kΩ), the CMRR falls to about 46 dB, which shows how much the resistors matter.

Background and insight

The formulas come from two rules for an ideal op-amp with negative feedback: no current flows into the inputs, and the output moves so that the two inputs sit at the same voltage. In the inverting amplifier the non-inverting input is grounded, so the inverting input is a virtual ground; the input current Vin ÷ Rin must all flow through Rf, giving Vout = −(Rf ÷ Rin) × Vin. In the non-inverting amplifier the divider Rf and Rg feeds back a fraction Rg ÷ (Rf + Rg) of the output, which must equal Vin, so the gain is 1 + Rf ÷ Rg. With Rf = 0 and Rg removed this becomes the voltage follower with a gain of exactly 1.

The difference amplifier subtracts: Vout = V2 × R4/(R3 + R4) × (1 + R2/R1) − V1 × R2/R1, which reduces to (R2/R1)(V2 − V1) when R4/R3 equals R2/R1. Any mismatch in those ratios lets common-mode voltage through; the calculator reports the resulting common-mode gain and CMRR, which is why 0.1% resistors or an integrated difference amplifier are used where CMRR matters. The summing amplifier extends the inverting stage: each input sees the virtual ground through its own resistor, so Vout = −Rf × (V1/R1 + V2/R2 + …).

Real op-amps have finite gain that falls with frequency. For a single-pole, unity-gain-stable part the closed-loop bandwidth is roughly GBW divided by the noise gain, 1 + Rf/Rin for both inverting and non-inverting stages. That is why an inverting gain of −1 has only half the bandwidth of a follower. The output also cannot reach the rails: older bipolar parts such as the 741 and TL07x swing to within about 1.5 to 2 V, while rail-to-rail output parts get within tens of millivolts at light load. The datasheet values for GBW, slew rate and output swing are what to enter.

Common use cases

  • Sensor signal conditioning

    Scale a thermocouple, strain gauge or photodiode signal up to an ADC range without clipping.

  • Audio preamps and mixers

    Set the gain of a microphone or line stage, or mix several sources with a summing amplifier.

  • Current-sense amplifiers

    Use the difference amplifier across a shunt resistor and check how resistor tolerance limits common-mode rejection.

  • Coursework and lab checks

    Verify hand calculations of gain, output voltage and bandwidth before building on a breadboard.

Tips and limitations

  • Keep feedback resistors roughly between 1 kΩ and 1 MΩ. Below that the network loads the output; above it bias current, noise and stray capacitance matter.
  • Balance the input bias current error on bipolar op-amps by putting a resistor equal to Rin ∥ Rf in series with the non-inverting input of an inverting stage.
  • Large-signal bandwidth is often limited by slew rate rather than GBW: the full-power bandwidth is slew rate ÷ (2π × peak output).
  • A non-inverting stage cannot have gain below 1. For attenuation use an inverting stage or a divider ahead of a follower.
  • Some fast op-amps are not stable at low noise gains. Check the minimum stable gain in the datasheet before using them as followers.

Frequently asked questions

What is the gain of an inverting op-amp?

G = −Rf ÷ Rin. With 100 kΩ feedback and 10 kΩ input the gain is −10: the output is ten times the input and inverted. The input impedance is simply Rin.

What is the gain of a non-inverting op-amp?

G = 1 + Rf ÷ Rg, where Rg runs from the inverting input to ground. 47 kΩ and 4.7 kΩ give a gain of 11. The input impedance is the op-amp's own, usually very high.

How do I convert op-amp gain to decibels?

Gain in dB = 20 × log10(|Vout ÷ Vin|). A gain of 10 is 20 dB, 100 is 40 dB, and the minus sign of an inverting stage does not change the dB figure.

Why is my op-amp output lower than the formula says?

Usually the output has hit the rail limit, the signal frequency is above GBW ÷ noise gain, or the slew rate is too low for the amplitude. Check the swing limits and bandwidth the calculator shows.

What is noise gain in an op-amp?

The gain seen by noise and offset at the non-inverting input, 1 + Rf ÷ Rin for both inverting and non-inverting stages. It, not the signal gain, sets the closed-loop bandwidth and stability.

What is gain-bandwidth product?

For a voltage-feedback op-amp with a single dominant pole, gain times bandwidth is roughly constant. A 1 MHz GBW part gives about 100 kHz at a noise gain of 10 and 10 kHz at 100.

How do I choose resistor values for a given op-amp gain?

Fix one resistor around 10 kΩ, calculate the other, then round to a standard value. Searching pairs of standard values, as the design table does, usually finds a ratio within a fraction of a percent.

Is there an in-depth guide to the Op-Amp Gain Calculator?

Yes. “Op-Amp Gain Formulas: Inverting, Non-Inverting and Beyond” covers the background, how it works, common pitfalls and worked examples. Read the full guide.