Op-Amp Gain Calculator

Gain and output voltage for inverting and non-inverting op-amp amplifiers, with a clipping-aware transfer chart.
Inverting Amplifier
Non-Inverting Amplifier

Inverting Amplifier

Av = −Rf/Rin   •   Vout = Av×Vin
100k/10k, Vin=0.5V, ±12V supply
Same gain, Vin=2V (clips!)
200k/10k (2× gain), Vin=0.5V
V
V
V
Enter values and press Calculate.

Input→Output Transfer Characteristic

Non-Inverting Amplifier

Av = 1 + Rf/Rin   •   Vout = Av×Vin
22k/2.2k, Vin=0.1V
Rf=0 (unity-gain follower)
V
V
V
Enter values and press Calculate.

Input→Output Transfer Characteristic

The Two Basic Op-Amp Amplifier Configurations

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:

Why Vout can never actually exceed the supply rails

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.

QuantityFormula
Inverting gainAv = −Rf/Rin
Non-inverting gainAv = 1 + Rf/Rin
Output voltageVout = Av×Vin (clamped to the real output swing)
Gain in decibelsAv(dB) = 20×log₁₀|Av|
Voltage follower (unity gain)Non-inverting with Rf=0 (or Rin=∞): Av=1

Real-World Applications & Fully-Explained Examples

Worked examples — explained in full

1. Inverting amplifier, Rf=100 kΩ, Rin=10 kΩ, Vin=0.5 V, ±12 V supply. Av=−100/10=−10. Vout=−10×0.5=−5.00 V — well within the realistic ±10.5 V swing (12 V rail minus 1.5 V headroom), so no clipping.
2. Same amplifier, but Vin=2 V instead. The ideal calculation gives Vout=−10×2=−20.00 V — impossible on a ±12 V supply. The real output clips at about −10.5 V (the realistic negative swing limit) and the waveform's negative peaks are chopped flat — a clear illustration of why gain and expected input swing must be chosen together.
3. Non-inverting amplifier, Rf=22 kΩ, Rin=2.2 kΩ, Vin=0.1 V. Av=1+22/2.2=1+10=11. Vout=11×0.1=1.10 V, comfortably inside the output swing limit.
4. Voltage follower (unity-gain buffer). Non-inverting with Rf=0: Av=1+0/Rin=1, so Vout=Vin exactly — the output simply tracks the input with no scaling, used purely for its high input impedance / low output impedance buffering, not for gain.
5. Doubling the feedback resistor (inverting, Rf=200 kΩ, Rin=10 kΩ). Av=−200/10=−20 — exactly double example 1's gain magnitude, confirming that Av scales linearly and directly with Rf for a fixed Rin.
6. Expressing gain in decibels. A gain magnitude of 10 (as in example 1) converts to Av(dB)=20×log₁₀(10)=20.0 dB — a convenient way to compare or add gain stages in a signal chain, since dB gains simply add across cascaded stages.

Frequently Asked Questions

What is the gain formula for an inverting op-amp amplifier?

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.

What is the gain formula for a non-inverting op-amp amplifier?

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.

Why is non-inverting gain always at least 1, but inverting gain can be less than 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.

What is a voltage follower / unity-gain buffer?

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.

Why does my op-amp output clip even though the calculated gain looks correct?

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.

What is typical op-amp output headroom?

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.

How do I convert op-amp gain to decibels?

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.

What input impedance does each configuration present to the signal source?

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.

Can I use an inverting amplifier to sum multiple signals?

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.

Does the op-amp's own open-loop gain matter for these formulas?

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.

What happens if Rin is zero in the inverting configuration?

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.

Should I choose the inverting or non-inverting configuration for my design?

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.

Related Calculators

Sallen-Key Active FilterSlew Rate & Bandwidth CalculatorRC Low/High-Pass FilterAll Calculators