Choose a circuit and enter the resistors and input voltage to get the gain and output voltage of an op-amp amplifier. You can also check whether the output would exceed the supply and saturate, and find E24 resistor pairs close to a target gain.
Your inputs are kept in this page's URL, so a bookmark or a shared link opens the same calculation. Favorites and recently used calculators are stored only in this browser (localStorage).
Results
Gain
–
Gain (dB)
–
Output voltage
–
Input impedance
–
The output would exceed the supply voltage, so it saturates
E24 resistor pairs near a target gain
Rf
Input resistor Rin / Rg (to ground) / R1
Gain
±
Values are DC results for an ideal op-amp. Frequency response (gain-bandwidth product), slew rate and input offset voltage are not included. The output voltage shown is clipped at the supply rails, but a real op-amp saturates somewhat inside them. The differential amplifier assumes matched resistor ratios (V2 is also divided by R1 and Rf). The pair search picks Rin (Rg for the non-inverting amplifier, R1 for the differential amplifier) from E24 values between 1 kΩ and 100 kΩ.
See it as a graph
Other inputs stay at their current values while the chosen input varies from 1/4 to 4 times its current value. The red dot is the current value.
Ideal op-amp assumptions: virtual short and no input current
Amplifier formulas are derived from the ideal op-amp: very high open-loop gain, no current into the inputs (infinite input impedance) and zero output impedance. With negative feedback, the output settles where the two input voltages are almost equal. With an open-loop gain of 10⁵ (100 dB), an output of 10 V needs only 0.1 mV between the inputs. Because the inputs look shorted without being connected, this property is called a virtual short. It holds only while negative feedback is applied and the output is not saturated.
Deriving the inverting amplifier, and virtual ground
In an inverting amplifier, the non-inverting input is grounded, the input voltage Vin drives the inverting input through Rin, and Rf feeds the output back to the inverting input. The virtual short holds the inverting input at 0 V (virtual ground), so the current Vin/Rin through Rin cannot enter the op-amp and flows entirely through Rf. The output is Vout = 0 − Rf·Vin/Rin, so the gain is G = −Rf/Rin. With Rf = 100 kΩ and Rin = 10 kΩ, G = −10 (20 dB), and Vin = 0.5 V gives an output of −5 V. The minus sign means the phase is inverted (180°). The input impedance seen by the source is simply Rin, the resistance to virtual ground. Making Rf smaller than Rin gives a gain magnitude below 1.
Non-inverting amplifier and voltage follower
In a non-inverting amplifier, Vin goes straight to the non-inverting input, and a divider of Rf and Rg feeds the output back to the inverting input. The virtual short puts the inverting input at Vin as well, so Vin = Vout·Rg/(Rf + Rg), or G = 1 + Rf/Rg. With Rf = 100 kΩ and Rg = 10 kΩ, G = 11 (about 20.8 dB), and the output is in phase with the input. Because the input connects directly to the op-amp's input terminal, the input impedance is very high and draws almost no current from the source. Shorting Rf (0 Ω) and removing Rg gives a voltage follower with G = 1. It serves as a buffer that passes the signal from a high-impedance sensor or divider to later stages without changing its voltage.
Differential amplifier, and why resistor matching matters
A differential amplifier applies V1 to the inverting input through R1 and applies V2 to the non-inverting input through a divider of R1 and Rf. When the two resistor ratios match, Vout = (Rf/R1)(V2 − V1), so only the difference between the inputs is amplified. With Rf/R1 = 10, V1 = 1.0 V and V2 = 1.2 V, the output is 2.0 V. Noise that appears equally on both inputs (a common-mode signal) cancels, but only if the ratios match exactly. Any mismatch lets common-mode signal reach the output and lowers the CMRR (common-mode rejection ratio). Estimated with the rule of thumb (1 + G)/(4 × tolerance), a gain-of-1 stage built with 1% resistors has a worst-case CMRR of only about 34 dB, and even 0.1% resistors give about 54 dB. For high CMRR, use a matched resistor network or an instrumentation amplifier. Seen from a floating (ungrounded) source, the differential input impedance is 2·R1.
Real op-amp limits (this tool gives ideal DC values)
This tool shows ideal DC values; real circuits have further limits. Output swing: the output cannot reach the supply rails, typically saturating about 1–2 V inside them for a general-purpose op-amp, and tens of millivolts inside depending on load even for rail-to-rail output types. Bandwidth: it is roughly GBW ÷ noise gain, where the noise gain is 1 + Rf/Rin for both inverting and non-inverting amplifiers. With a 1 MHz GBW, an inverting gain of −10 and a non-inverting gain of 11 both give about 91 kHz. Slew rate: the output can only change so fast, so a 0.5 V/µs op-amp can deliver a 10 V-peak sine wave only up to about 8 kHz. Offset: the input offset voltage is also multiplied by the noise gain, so 2 mV becomes 22 mV at the output with a noise gain of 11.
An inverting amplifier's gain is −Rf/Ri, here −100 kΩ/10 kΩ = −10. Because the inverting input is a virtual ground, the input current Vin/Ri flows entirely through Rf, giving an output of −Rf × Vin/Ri. The input impedance equals Ri (10 kΩ), which loads the signal source. +11 is the gain of a non-inverting amplifier with the same resistors (1 + Rf/Ri).
A non-inverting amplifier's gain is 1 + R2/R1 = 1 + 90/10 = 10, with the output in phase with the input. Since the input goes straight into the non-inverting terminal, the input impedance is very high and does not load the source. Its gain cannot be less than 1 (R2 = 0 gives a voltage follower). Don't confuse it with the inverting gain −R2/R1 (−9 here).
An internally compensated op-amp's open-loop gain falls at −20 dB/decade, so gain × bandwidth is roughly constant. With a 1 MHz GBW, a gain of 10 gives about 1 MHz ÷ 10 = 100 kHz. Strictly, divide by the non-inverting (noise) gain, so an inverting gain of −10 divides by 11, about 91 kHz. To get both high gain and wide bandwidth, choose a higher-GBW op-amp or split the gain across stages.
FAQ
How do I calculate the gain of an inverting amplifier?
G = −Rf/Rin. With Rf = 100 kΩ and Rin = 10 kΩ, G = −10, or 20·log10(10) = 20 dB. The minus sign means the output is inverted relative to the input. The input impedance equals Rin, so make Rin much larger than the source's output resistance.
How do I calculate the gain of a non-inverting amplifier?
G = 1 + Rf/Rg. With Rf = 100 kΩ and Rg = 10 kΩ, G = 11, or about 20.8 dB. With the same resistors, its gain is one more than the inverting amplifier's magnitude. The gain cannot be less than 1, and Rf = 0 turns it into a voltage follower with a gain of 1.
When should I use an inverting or a non-inverting amplifier?
As a rule, use a non-inverting amplifier when you don't want to load the source (when you need high input impedance). Use an inverting amplifier when you need to invert the phase, need a gain below 1 or want to sum several inputs. In an inverting amplifier the inputs sit at a constant voltage (virtual ground), which also makes it less constrained by the op-amp's common-mode input range.
Why doesn't the output voltage match the calculation?
If the calculated output exceeds the supply, the output clips and saturates. Feeding 2 V into an inverting amplifier with a gain of −10 on ±15 V supplies should give −20 V, but in practice it stops around −13 V, inside the rail (the exact value depends on the part and the load). The output can also differ from the calculation at high frequencies because of the gain-bandwidth product and slew rate, and at DC because of the input offset voltage.
How should I choose the size of the resistors?
The gain depends only on the resistor ratio, so you can still choose their size. Values from about 1 kΩ to 100 kΩ are common. Values that are too small draw more current through the feedback resistor and the load, running into the op-amp's output current limit and raising power consumption. Values that are too large increase thermal noise, errors from input bias current and bandwidth loss from parasitic capacitance. This tool's pair search also picks Rin from 1 kΩ to 100 kΩ.