Op-amp inverting/non-inverting gain calculator

R_f connects the output to the inverting (āˆ’) input. R_in feeds the signal into that input; R_g connects it to ground.

Signal and output swing (optional)

Enter decimals or scientific notation, such as 4.7 or 4.7e3. Voltages may be negative.

No valid result to draw.

Show the steps

Interactive calculation is unavailable until JavaScript loads. The formulas, worked examples and references below remain available.

Calculate ideal inverting or non-inverting op-amp gain from two resistors, or the feedback resistor for a target gain, with output clipping.

How to use

Choose Inverting or Non-inverting to match your circuit.

Choose Gain from resistors, or Feedback resistor for a target gain.

Enter the resistor values with their units, or the target gain and the other resistor.

Optionally enter an input voltage, or drag the input-voltage slider, and the op amp's output high and low limits to see the output and any clipping.

Read the gain, its decibel value and the transfer line. Copy result copies the labeled values. Reset restores the starting example.

Science

With negative feedback, an ideal op amp adjusts its output until its two inputs are at the same voltage, and no current flows into the inputs. The resistor network then fixes the ratio of output to input.

In the inverting amplifier the non-inverting input is grounded, so the inverting input sits at 0 V. The input current V_in Ć· R_in must all flow through R_f, giving V_out = āˆ’(R_f Ć· R_in) Ɨ V_in. The source sees R_in as the input resistance.

In the non-inverting amplifier the signal drives the non-inverting input. R_f and R_g divide the output back to the inverting input, so V_out = (1 + R_f Ć· R_g) Ɨ V_in. The gain is at least 1, the output is in phase, and the source sees the op amp's very high input resistance.

Real op amps cannot drive their output beyond limits set by the supply and the load. Past those limits the output clips: the transfer line goes flat, and only inputs inside the linear input range are amplified faithfully.

Limitations: the tool assumes an ideal op amp, with no bandwidth, slew rate, offset, bias current or noise. The closed-loop bandwidth is roughly the gain-bandwidth product divided by 1 + R_f Ć· R_in or 1 + R_f Ć· R_g. The output limits are the values you enter, a source resistance adds to R_in in the inverting stage, and resistor tolerances shift the gain. Summing, difference, integrator and differentiator circuits are separate tools, and the tool suggests no standard resistor values.

Formulas

Inverting gain: G = āˆ’R_f Ć· R_in. Resistances in Ī©, G in V/V.

Non-inverting gain: G = 1 + R_f Ć· R_g.

Decibels: G_dB = 20 Ɨ log10(|G|).

Feedback for a target: Inverting R_f = |G| Ɨ R_in; non-inverting R_f = (G āˆ’ 1) Ɨ R_g.

Output with limits: V_out = G Ɨ V_in, limited to the range V_OL to V_OH.

Examples

Inverting, R_f 100 kĪ©, R_in 10 kĪ©, V_in 0.25 V, output limits ±12 V: G = āˆ’10 V/V (20 dB), V_out = āˆ’2.5 V. The output is ten times larger and inverted; the source sees 10 kĪ©. Inputs between āˆ’1.2 V and 1.2 V stay linear.

Non-inverting, R_f 100 kĪ©, R_g 10 kĪ©, V_in 1.5 V, limits ±12 V: G = 11 V/V; output clips at 12 V (ideal 16.5 V). Inputs between āˆ’1.091 V and 1.091 V stay linear.

Non-inverting, target gain 0.5: No result. A non-inverting stage cannot attenuate. Use an inverting stage with |G| = 0.5 (R_f = R_in Ć· 2) or a divider before a follower.

References

Texas Instruments: Op Amps for Everyone, chapter 3 (SLOD006)

Texas Instruments: Handbook of Operational Amplifier Applications (SBOA092)