Op-Amp Inverting Amplifier Calculator

Op-Amp Inverting Amplifier Calculator

Gain, gain in decibels and output voltage of an inverting op-amp stage, whether the output clips against your supply rails, the input impedance it presents — and standard resistor pairs for a target gain.

Inverting amplifier

Rin, Rf, Vin → gain and Vout
This is also the stage’s input impedance — the source has to drive it.
Calculated in design mode.
0 for a single supply — but an inverting stage then needs its + input biased to mid-rail.
From your op-amp’s datasheet. 0 for a rail-to-rail part; TI’s LM358B stops about 1.4 V short of V+. Use the figures from your part’s datasheet; typical values vary widely between manufacturers.
About 0.1 V for an LM358B; 0.02 V for a rail-to-rail CMOS part such as the TLV9062. Use the figures from your part’s datasheet; typical values vary widely between manufacturers.
In the first mode this box shows |gain|, the magnitude without the minus sign.
The inverting amplifier. Feedback through Rf holds the − input at the same voltage as the + input — the virtual earth — so the whole of Vin ÷ Rin flows on through Rf and out of the op-amp's output. The dots show that current; none of it enters the op-amp's inputs.
-10.00V/VExample

Rin = 1 kΩ, Rf = 10 kΩ, Vin = 100 mV, rails ±12 V

Advertisement

Inverting amplifier

Gain = −Rf ÷ Rin    Vout = −Vin × Rf ÷ Rin    Gain (dB) = 20 × log10(Rf ÷ Rin)    Zin = Rin    Rbias = Rin ∥ Rf
Rin
from the source to the inverting input; it is the stage’s input impedance
Rf
from the inverting input back to the output
virtual earth
the inverting input, held by feedback at whatever the + input sits at — usually 0 V
Rbias
the resistor to put between the + input and ground so both inputs see the same resistance and the bias currents cancel

Worked example

Rin = 1 kΩ, Rf = 10 kΩ, Vin = 100 mV, rails ±12 V
Gain = −Rf ÷ Rin = −10 kΩ ÷ 1 kΩ = −10
In decibels: 20 × log10(10) = 20.00 dB (decibels have no sign — they describe the size, not the inversion)
Vout = −10 × 100 mV = −1 V, comfortably inside the −11.90 V to 10.60 V the rails allow
Input impedance = Rin = 1 kΩ, so the source supplies 100 mV ÷ 1 kΩ = 100 µA
Bias-compensation resistor = 1 kΩ ∥ 10 kΩ = 909.1 Ω from the + input to ground

Standard 1% feedback resistors for common gains

Gain wantedIn decibelsExact RfNearest E96Gain you getError
26.02 dB20 kΩ20 kΩ2.000.00%
513.98 dB50 kΩ49.9 kΩ4.99−0.20%
1020.00 dB100 kΩ100 kΩ10.000.00%
2026.02 dB200 kΩ200 kΩ20.000.00%
5033.98 dB500 kΩ499 kΩ49.90−0.20%
10040.00 dB1 MΩ1 MΩ100.000.00%
Rin = 10 kΩ throughout. E96 (1%) values land within a few tenths of a per cent of any sensible gain; with E24 (5%) parts the resistor tolerance matters far more than the step.

How the inverting amplifier works

Feedback from the output to the inverting input forces the op-amp to do whatever it takes to keep its two inputs at the same voltage. With the + input grounded, the − input therefore sits at 0 V — a virtual earth: it is not connected to ground, but it behaves as if it were. The input current is then simply Vin ÷ Rin, and because no current flows into the op-amp’s input, all of it continues through Rf. The voltage at the far end of Rf must be −Vin × Rf ÷ Rin, and that is the output. The gain depends only on the ratio of two resistors, not on the op-amp.

The price of the virtual earth is input impedance. Because the − input is pinned at 0 V, the source sees Rin and nothing more — 1 kΩ in the example above, drawing 100 µA from a 100 mV source. A sensor or a piezo or a high-impedance divider will be loaded down by that, and the signal you measure will be smaller than the signal that exists. Raise Rin (and Rf with it, to hold the gain), or use the non-inverting amplifier calculator instead, whose input impedance is the op-amp’s own — hundreds of megohms for a CMOS part. That is the main reason to choose one topology over the other; the other reasons are the sign, and that the inverting stage can have a gain below 1 while the non-inverting one cannot.

Bias current and the third resistor. A real op-amp’s inputs draw a small current — tens of nanoamps for a bipolar part such as TI’s LM358B, picoamps for CMOS. That current flows through whatever resistance each input sees and turns into an offset voltage. Putting a resistor equal to Rin ∥ Rf between the + input and ground makes both inputs see the same resistance, so the two offsets cancel instead of adding. Here that is 909.1 Ω. With a CMOS op-amp it makes no measurable difference and you can tie the + input straight to ground.

Clipping. The gain equation does not know about the power supply. Ask for 20 V out of a part running on ±12 V rails and the output simply stops at whatever it can reach — for an LM358B that is about 1.4 V short of V+ and 0.1 V above V−, so a ±12 V supply gives roughly −11.9 V to +10.6 V. The page checks your numbers against the rails and the headroom you enter. Single supply: with V− = 0 an inverting stage has nowhere to go — a positive input would drive the output below ground — so the + input has to be biased to mid-rail with a voltage divider calculator, and everything then swings about that point instead of about zero. For the amplifier’s speed limits, see the gain–bandwidth and slew-rate section of the non-inverting amplifier calculator; for the resistor colours, the resistor colour code calculator.

Advertisement

Frequently asked questions

What is the gain of an inverting op-amp?

−Rf ÷ Rin. A 10 kΩ feedback resistor with a 1 kΩ input resistor gives a gain of −10: ten times bigger and upside down. In decibels that is 20 dB, since decibels describe the magnitude only.

Why is the gain negative?

The signal enters the inverting input. When the input goes up the output must go down to hold the virtual earth at 0 V. For a sine wave that is a 180° phase shift; for DC it is a change of sign. Two inverting stages in series put it back the right way up.

What is the input impedance of an inverting amplifier?

Rin, and only Rin, because the inverting input is a virtual earth held at 0 V. That is usually the deciding drawback: a non-inverting stage presents the op-amp’s own input impedance instead.

What is the resistor on the + input for?

Bias-current compensation. Make it Rin ∥ Rf so both inputs see the same resistance and the bias currents produce equal offsets that cancel. For 1 kΩ and 10 kΩ that is 909.1 Ω. With a CMOS op-amp the bias current is so small that you can ground the + input directly.

Can an inverting amplifier have a gain less than one?

Yes — make Rf smaller than Rin. Rf = 1 kΩ with Rin = 10 kΩ gives a gain of −0.1. A non-inverting stage cannot do this: its gain is 1 + Rf ÷ R1, which is never below 1.

Related calculators

References

  1. Horowitz P, Hill W. The Art of Electronics, 3rd ed. Cambridge University Press, 2015. §4.2.1 the inverting amplifier, §4.2.2 the noninverting amplifier, §4.4 a detailed look at op-amp behaviour — gain–bandwidth product, slew rate and the departures from the ideal op-amp.
  2. Texas Instruments. LM358B, LM2904B industry-standard dual operational amplifiers, datasheet SLOS068AB. Gain–bandwidth product 1.2 MHz typical, slew rate 0.5 V/µs typical, supply 3–36 V; the output reaches to within about 100–150 mV of V− but stops 1.35–1.42 V short of V+ at 50 µA.
  3. Texas Instruments. TLV906xS 10-MHz, RRIO, CMOS operational amplifiers for cost-sensitive systems, datasheet SBOS839N. Gain–bandwidth product 10 MHz typical, slew rate 6.5 V/µs typical, supply 1.8–5.5 V, output within 20 mV of either rail into 10 kΩ.
  4. IEC 60063:2015. Preferred number series for resistors and capacitors (E6, E12, E24, E48, E96 and E192). International Electrotechnical Commission.