Part 2 · Chapter 12
How to calculate op-amp gain: inverting and non-inverting amplifiers
With negative feedback, an ideal op-amp's gain depends only on two resistors. An inverting amplifier has gain G = −Rf / Rin and a non-inverting amplifier has G = 1 + Rf / Rin. With Rin = 10 kΩ and Rf = 47 kΩ, the inverting gain is −4.7.
How negative feedback sets the gain
An operational amplifier has a very large open-loop gain, so with negative feedback the output moves until the voltage difference between its two inputs is almost zero. This is the "virtual short" rule. The inputs also draw almost no current. These two rules are enough to derive both gain formulas.
The gain you get from the resistors is the closed-loop gain, and it is far below the open-loop gain. The price of the feedback is predictability: the gain depends on resistor ratios, not on the op-amp's own tolerances. The two connections are described in op-amp configuration.
Inverting amplifier
The signal goes through to the inverting input, the non-inverting input is grounded, and connects the output back to the inverting input. The inverting input is held at virtual ground, so the input current is . All of it flows through , so :
The output is inverted, and the input impedance seen by the source is , so it is not very high.
Example: = 10 kΩ, = 47 kΩ gives . A 0.5 V input produces V at the output.
Non-inverting amplifier
The signal goes straight to the non-inverting input and and form a divider from the output to ground, with the midpoint feeding the inverting input. The virtual short makes that midpoint equal , so :
The output has the same sign as the input, the gain is never below 1, and the input impedance is very high.
Example: = 10 kΩ, = 90 kΩ gives . A 0.3 V input gives 3 V at the output. With the circuit is a voltage follower with .
Limits: saturation, bandwidth and slew rate
The formulas hold only while the output stays within its limits.
- Saturation: the output cannot exceed the supply rails. On a ±5 V supply, the gain-of-10 amplifier above clips for any input over about 0.5 V. A 0.8 V input asks for 8 V and the output stays near the rail.
- Bandwidth: the closed-loop bandwidth is about . For an op-amp with a gain-bandwidth product of 1 MHz, a gain of 10 gives 100 kHz and a gain of 100 gives only 10 kHz.
- Slew rate: the output cannot change faster than . A large sine of peak is undistorted only up to . With = 0.5 V/µs and = 5 V that is 15.9 kHz.
Choosing the resistors
Only the ratio sets the gain, but the absolute values matter. Resistors that are too small load the output and waste power, and ones that are too large add noise and let the input bias current cause errors. Values from 1 kΩ to 100 kΩ are the usual range. Pick standard values, for example from the E24 series, and remember that the gain error is about the sum of the two resistor tolerances.
For the inverting circuit, choose for the input impedance you need and then . For a gain of −4.7 with = 10 kΩ, = 47 kΩ is a standard value, so no rounding is needed.
Try it in the op-amp simulator
Open the op-amp simulator. Switch between the inverting and non-inverting modes, set and , and read the gain.
- Enter 10 kΩ and 47 kΩ in inverting mode and compare the output with .
- Raise the input until the output saturates and note the voltage at which it clips.
- Look at the closed-loop Bode plot and see the bandwidth fall as the gain rises.
- Use a resistor colour-code lookup to identify the standard values you would use on a real build.
Sources and further reading
- A. S. Sedra and K. C. Smith, "Microelectronic Circuits", chapter on operational amplifiers.
- P. Horowitz and W. Hill, "The Art of Electronics", chapter on operational amplifiers.
- R. Mancini (ed.), "Op Amps for Everyone", Texas Instruments application report SLOD006.
Try it in the simulator
Frequently asked questions
- What is the gain of an inverting op-amp?
- . The negative sign means the output is inverted. With = 10 kΩ and = 47 kΩ the gain is −4.7.
- What is the gain of a non-inverting op-amp?
- . It is always 1 or more, and the output has the same polarity as the input.
- Why does my op-amp output stop at a constant voltage?
- The output has saturated at the supply rail (or slightly below it). The gain formula only holds while the output stays inside the supply range.
- Why does gain reduce bandwidth?
- An op-amp has a roughly constant gain-bandwidth product, so the closed-loop bandwidth is about GBW divided by the gain. A gain of 100 on a 1 MHz op-amp gives about 10 kHz.