An operational amplifier ("op-amp") on its own has enormous, poorly-controlled open-loop gain. Real circuits tame this with negative feedback: a resistor (or resistor network) feeds a fraction of the output back to the inverting input, and the two resistors alone — not the op-amp's own gain — set the precise, predictable closed-loop gain. There are two standard ways to wire this feedback:
The formulas above are ideal and assume the op-amp has unlimited output swing. In reality, an op-amp's output can only swing between its two supply rails, and most real (non "rail-to-rail") op-amps stop short of the actual rail by roughly 1–2 V of "headroom". If the ideal calculation predicts an output beyond this real limit, the amplifier clips: the top (or bottom) of the waveform is chopped flat at the maximum swing, distorting the signal. This calculator flags exactly when that happens and shows it directly on the transfer chart.
| Quantity | Formula |
|---|---|
| Inverting gain | Av = −Rf/Rin |
| Non-inverting gain | Av = 1 + Rf/Rin |
| Output voltage | Vout = Av×Vin (clamped to the real output swing) |
| Gain in decibels | Av(dB) = 20×log₁₀|Av| |
| Voltage follower (unity gain) | Non-inverting with Rf=0 (or Rin=∞): Av=1 |
Av = −Rf/Rin, where Rf is the feedback resistor and Rin is the input resistor. The negative sign means the output is inverted (180° out of phase) relative to the input.
Av = 1+Rf/Rin, where Rf is the feedback resistor from output to the inverting input, and Rin connects that same node to ground. The gain is always positive and always at least 1.
Non-inverting gain is 1+Rf/Rin, and since Rf/Rin≥0 for real resistors, the gain can never drop below 1. Inverting gain is −Rf/Rin with no "+1" term, so choosing Rf smaller than Rin gives a gain magnitude below 1 (attenuation), which the non-inverting configuration cannot do.
It is the non-inverting configuration with Rf=0 (direct feedback wire) or Rin=∞ (open), giving Av=1. It is used to buffer a signal — providing high input impedance and low output impedance — without amplifying it.
The ideal gain formula assumes unlimited output swing, but a real op-amp can only swing within (and usually somewhat short of) its supply rails. If Av×Vin exceeds the realistic output swing (supply voltage minus the op-amp's headroom), the output clips flat at that limit, distorting the waveform.
Standard (non rail-to-rail) op-amps typically need about 1–2 V of headroom from each supply rail before clipping. Rail-to-rail output op-amps can swing much closer to (sometimes within millivolts of) the actual supply rails — check the specific op-amp's datasheet for its exact swing limits.
Av(dB) = 20×log₁₀|Av|. For example, a gain of 10 is 20 dB, a gain of 100 is 40 dB, and a gain of 1 (unity) is 0 dB.
The inverting amplifier's input impedance is approximately Rin (since the inverting input is a virtual ground), which can load a weak source. The non-inverting amplifier's input impedance is extremely high (the op-amp's own input impedance, typically megaohms or more), making it far less loading on the source.
Yes — adding more input resistors, each from a separate input signal to the same inverting-input summing node, creates a summing amplifier where Vout = −Rf×(V1/R1+V2/R2+...), a very common building block for audio mixers and analog summation.
Not directly, as long as the open-loop gain is very large (which it is for virtually all real op-amps, typically 100,000 or more) and the circuit is stable. The closed-loop gain formulas above depend only on the external resistor ratio, which is the entire point of negative feedback — precise, predictable gain independent of the op-amp's own (imprecise) internal gain.
Av=−Rf/Rin approaches infinite (or undefined) gain as Rin→0, which is not physically meaningful — Rin must be a real, non-zero resistance for the formula and the circuit to behave as intended.
Choose non-inverting when you need high input impedance (to avoid loading a weak source) or when signal inversion is undesirable; choose inverting when you need to sum multiple signals, need a gain below 1, or when the signal inversion (180° phase shift) is acceptable or even desired in your signal chain.
Sallen-Key Active Filter • Slew Rate & Bandwidth Calculator • RC Low/High-Pass Filter • All Calculators