NewAI Part GeneratorFree to get started
FREE TOOL

Op amp gain calculator

Work out the gain of an inverting, non-inverting, difference or summing circuit from its resistors with this op amp gain calculator, or get the feedback resistor for the gain you want, rounded to E24 or E96 values. Add the op amp’s gain-bandwidth product and supply rails to see the bandwidth, the frequency response and whether the output clips.

Circuit
Examples
Calculate
Ω
Ω
V

Optional: DC level or peak of the signal.

Hz

Optional: GBW or unity-gain bandwidth from the datasheet.

V

Optional, with V−: checks the output against the rails.

V

0 for a single supply.

Gain

-10 V/V

Gain in dB
20 dB
Input resistance
10 kΩ = Rin (virtual ground)
Noise gain
11 V/V sets bandwidth, noise and stability

Enter the op amp’s gain-bandwidth product to get the closed-loop bandwidth and a frequency response.

How to calculate op amp gain

For an inverting amplifier, G = −Rf ÷ Rin; for a non-inverting amplifier, G = 1 + Rf ÷ Rg. With Rf = 100 kΩ and 10 kΩ the gain is −10 inverting or 11 non-inverting (20.8 dB). The bandwidth is the op amp’s gain-bandwidth product divided by the noise gain, 1 + Rf ÷ Rin, so an LM358 (0.7 MHz typical) gives about 63.6 kHz in either case.

Op amp gain formula for each circuit

With negative feedback, an op amp drives its output until both inputs sit at the same voltage. The resistors then fix the ratio of output to input. These are the ideal-op-amp results; they hold while the open-loop gain at your frequency is much larger than the noise gain.

Inverting amplifier

G = −Rf ÷ Rin     noise gain = 1 + Rf ÷ Rin
Rin
input resistor, from the signal to the inverting input (the input resistance)
Rf
feedback resistor, from the output to the inverting input

Non-inverting amplifier

G = 1 + Rf ÷ Rg     noise gain = G
Rg
resistor from the inverting input to ground

Difference amplifier (four resistors)

Vout = (V2 − V1) × R2 ÷ R1     CMR = 20 log10[(1 + R2/R1) ÷ Kr]
R1, R3
input resistors to the inverting and non-inverting inputs (R3 = R1)
R2, R4
feedback resistor and the resistor from the non-inverting input to ground (R4 = R2)
Kr
net fractional mismatch of R2/R1 against R4/R3

With four discrete resistors of tolerance t, the worst-case mismatch is Kr = 4t. V1 sees an input resistance of R1; V2 sees R3 + R4.

Inverting summing amplifier

Vout = −Rf × (V1/R1 + V2/R2 + V3/R3)     noise gain = 1 + Rf ÷ (R1 ∥ R2 ∥ R3)

Bandwidth

f−3dB = GBW ÷ noise gain
GBW
gain-bandwidth product (unity-gain bandwidth) of a voltage-feedback op amp

Op amp gain calculation examples

Example 1: a ×11 non-inverting stage on an LM358

Rf = 100 kΩ and Rg = 10 kΩ give G = 1 + 100 ÷ 10 = 11 (20.8 dB), so 0.2 V in becomes 2.2 V. The noise gain is also 11, and with the LM358’s 0.7 MHz typical GBW the closed-loop bandwidth is 0.7 MHz ÷ 11 = 63.6 kHz.

Example 2: Rf for an inverting gain of −4.7

With Rin = 10 kΩ, Rf = 4.7 × 10 kΩ = 47 kΩ, which is not an E96 value. The nearest E96 resistor is 47.5 kΩ, giving G = −4.75, 1.06% high. The noise gain is 1 + 4.75 = 5.75, so the same LM358 reaches 122 kHz.

Example 3: a ×20 difference amplifier on a current-sense shunt

R1 = R3 = 1 kΩ and R2 = R4 = 20 kΩ turn a 50 mV shunt drop into 1 V. The common-mode rejection is set by the resistors: worst case 54.4 dB with 1% parts and 74.4 dB with 0.1% parts. On a high-side shunt the inputs sit near the supply, so the input divider R3/R4 must bring them inside the op amp’s common-mode range.

Op amp resistor values for standard gains (E96)

Rf for common gains with Rg (non-inverting) or Rin (inverting) fixed at 10 kΩ, rounded to the nearest E96 value, and the gain it actually gives. For any other gain, the calculator solves for Rf.

GainNon-inverting RfActual gainInverting RfActual gain
210 kΩ220 kΩ−2
320 kΩ330.1 kΩ−3.01
540.2 kΩ5.0249.9 kΩ−4.99
1090.9 kΩ10.09100 kΩ−10
20191 kΩ20.1200 kΩ−20
50487 kΩ49.7499 kΩ−49.9
1001 MΩ1011 MΩ−100

Noise gain and bandwidth by gain

Closed-loop −3 dB bandwidth for an op amp with a 1 MHz gain-bandwidth product. Scale the bandwidth columns by your op amp’s GBW ÷ 1 MHz.

|Gain|Non-inverting noise gainBandwidthInverting noise gainBandwidth
111 MHz (follower)2500 kHz
22500 kHz3333 kHz
55200 kHz6167 kHz
1010100 kHz1190.9 kHz
202050 kHz2147.6 kHz
505020 kHz5119.6 kHz
10010010 kHz1019.9 kHz

What the ideal formulas leave out

The gain formulas assume infinite open-loop gain. In practice the closed-loop gain is the ideal gain divided by (1 + noise gain ÷ open-loop gain), so at frequencies where the open-loop gain has fallen toward the noise gain the gain drops and the phase shifts; keep the signal well below the closed-loop bandwidth if the gain must be accurate. Large output swings are also limited by slew rate, not just bandwidth. A summing amplifier of three equal 10 kΩ inputs and a 10 kΩ feedback resistor turns 0.5 V, 0.3 V and −0.2 V into -600 mV, but each extra input raises the noise gain (to 4 here) and cuts the bandwidth. Capacitance at the inverting input, including the op amp’s own few pF, makes the noise gain rise at high frequency and eats into the phase margin: with large feedback resistors a small capacitor across Rf keeps the stage stable. Finally, the output cannot swing past the rails, and most op amps stop well short of them, so enter your supplies to see the usable input range.

Glossary

Signal gain
Vout ÷ Vin for the signal you apply: −Rf/Rin inverting, 1 + Rf/Rg non-inverting.
Noise gain
1 + Rf ÷ (everything from the inverting input to a source or ground). It sets bandwidth, offset at the output and stability.
Gain-bandwidth product (GBW)
For a voltage-feedback op amp, the frequency where the open-loop gain falls to 1. Closed-loop bandwidth is GBW ÷ noise gain.
Virtual ground
In an inverting stage with the non-inverting input grounded, feedback holds the inverting input at 0 V, so each input resistor sees ground at its far end.
Common-mode rejection (CMR)
How strongly a differential stage ignores a voltage common to both inputs, in dB.
Rail-to-rail output
An output stage that swings to within tens of millivolts of each supply rail.

Related guides

Frequently asked questions

What is the op amp gain equation?

Inverting amplifier: G = −Rf / Rin. Non-inverting amplifier: G = 1 + Rf / Rg, where Rg runs from the inverting input to ground. Both assume an ideal op amp, which is accurate when the open-loop gain at your signal frequency is much larger than the noise gain.

How do you calculate the gain of an inverting amplifier?

Divide the feedback resistor by the input resistor and make it negative: G = −Rf / Rin. With Rin = 10 kΩ, the E96 value 47.5 kΩ gives −4.75. The calculator above also solves for Rf from a target gain.

What is the non-inverting amplifier gain formula?

G = 1 + Rf / Rg, with Rg from the inverting input to ground. Rf = 100 kΩ and Rg = 10 kΩ give 11 (20.8 dB), and the noise gain equals the signal gain, so the bandwidth is GBW ÷ G.

What is the summing amplifier formula?

Vout = −Rf × (V1/R1 + V2/R2 + V3/R3). Three equal 10 kΩ inputs with a 10 kΩ feedback resistor turn 0.5 V, 0.3 V and −0.2 V into -600 mV, and the noise gain rises to 4.

What gain do 100 kΩ and 10 kΩ give?

As a non-inverting amplifier, 1 + 100 kΩ / 10 kΩ = 11 (20.8 dB). As an inverting amplifier, −100 kΩ / 10 kΩ = −10 (20.0 dB), with a 10 kΩ input resistance.

Why does an inverting amplifier have less bandwidth than a non-inverting one of the same gain?

Bandwidth is set by the noise gain, 1 + Rf / Rin, not the signal gain. An inverting gain of −1 has a noise gain of 2, so on a 1 MHz GBW op amp it reaches 500 kHz, while a follower reaches the full 1 MHz.

How do I choose the resistor values?

The ratio sets the gain; the absolute value is a trade-off. Values from about 1 kΩ to 100 kΩ suit most op amps: much lower and the feedback network loads the output, much higher and bias current, leakage and stray capacitance across Rf start to matter. Use 1% (E96) resistors when the gain needs to be within a couple of percent.

What is noise gain?

The gain the op amp applies to its own input offset and noise voltage, 1 + Rf divided by everything connected from the inverting input to a source or ground. It sets the closed-loop bandwidth (GBW ÷ noise gain) and the stability margin, so it is the number to use with the gain-bandwidth product.

How well do difference amplifier resistors need to match?

Resistor matching, not the op amp, sets the common-mode rejection. With four 1% resistors at unity gain the worst case is only 34 dB; 0.1% parts give 54 dB. For more, use a matched resistor network or an instrumentation amplifier.

Can an op amp gain be less than 1?

An inverting amplifier can: make Rf smaller than Rin (Rf = 10 kΩ with Rin = 22 kΩ gives −0.45). A non-inverting amplifier cannot go below 1, so attenuate with a divider first and buffer it with a follower.

Can the output swing all the way to the supply rails?

Only with a rail-to-rail output op amp, and even then it stops tens of millivolts short under load. A TL072 on ±15 V swings to ±13.5 V typical (±12 V minimum) into 10 kΩ. Enter the supplies in the op amp calculator to see the input range that keeps the output inside them.

More free PCB tools

See all free electronics tools →

Sources

Design the whole board, not one number

ProtoFlow is free AI PCB design software: describe a circuit and get a schematic with real parts, PCB layout with an autorouter, SPICE simulation and Gerber files. Native KiCad, Altium and EAGLE import and export. Free on macOS, Windows and Linux.

Get for Mac

Free to start. No card required.