How to Calculate Op-Amp Gain (Inverting / Non-Inverting)
Op-amp gain is set by two resistors. In the non-inverting configuration A_v = 1 + Rf/Rin; in the inverting configuration A_v = −Rf/Rin. For example, with Rin = 1 kΩ and Rf = 9 kΩ the non-inverting gain is 10. A buffer (voltage follower) has a gain of 1.
In an operational amplifier (op-amp) circuit, gain is the ratio of output voltage to input voltage (Av). Its value is set not by the chip but by two external resistors — the feedback Rf and the input/ground Rin. There are two basic configurations: inverting and non-inverting.
Non-inverting gain: Av = 1 + Rf/Rin
The signal goes to the (+) input; feedback Rf and Rin (from the (−) input to ground) set the gain:
Av = 1 + Rf / Rin
The output is in phase with the input and the gain is always ≥ 1 (it cannot attenuate). Input impedance is very high — ideal for sensors and high-impedance sources.
Inverting gain: Av = −Rf/Rin
The signal enters the (−) input through Rin; the (+) input is grounded:
Av = − Rf / Rin
The output is inverted by 180° (minus sign). Gain can be below 1 (attenuation). Input impedance ≈ Rin.
Voltage follower (buffer): gain = 1
In the non-inverting form with Rf = 0 (short) and Rin = ∞ (open), Av = 1. This buffer (voltage follower) passes the voltage unchanged while giving high input / low output impedance — it isolates a source from its load.
How to calculate it, step by step
- Identify the configuration: signal at the (+) input (non-inverting) or through Rin to the (−) input (inverting)?
- Read the Rf (feedback) and Rin values.
- Apply the right formula: non-inverting 1 + Rf/Rin; inverting −Rf/Rin.
- For a target gain, pick the resistor ratio in reverse.
Worked examples
- Non-inverting, Rin = 1 kΩ, Rf = 9 kΩ: Av = 1 + 9/1 = 10 (10×, in phase).
- Inverting, Rin = 1 kΩ, Rf = 10 kΩ: Av = −10/1 = −10 (10×, inverted).
- Inverting attenuation, Rin = 10 kΩ, Rf = 2 kΩ: Av = −0.2 (0.2×).
Gain in dB: 20 × log₁₀|Av|
Gain is often expressed in decibels (dB): Gain(dB) = 20 × log₁₀|Av|. For example 10× = 20 dB, 100× = 40 dB, 2× ≈ 6 dB.
The gain–bandwidth (GBW) limit
High gain is not free: an op-amp's gain–bandwidth product (GBW) is constant. With a 1 MHz GBW op-amp, a gain of 10× leaves only ~100 kHz of bandwidth. For high gain at high frequency, choose an op-amp with a larger GBW.
Common mistakes
- Mixing the formulas: non-inverting ADDS 1, inverting does not (and is negative).
- Rail limit: if gain × input exceeds the supply, the output clips.
- Ignoring input impedance: the inverting form loads the source with Rin; for high-impedance sources, non-inverting is better.
Use the calculator
Enter the resistors to find the gain (as a ratio and in dB) instantly with our Op-Amp Gain Calculator.