Op-Amp Gain Calculator
Get the voltage gain, gain in decibels and output voltage of an inverting or non-inverting amplifier.
Input and output
Formulas
Non-inverting amplifier: Av = 1 + (Rf)/(Rg). Inverting amplifier: Av = −(Rf)/(Rin). Gain in decibels is 20·log10|Av|. These assume an ideal op-amp, so a real output clips a little below the supply voltage.
Worked example: a non-inverting amplifier with a gain of 11
- Non-inverting, Rf = 100 kΩ, Rg = 10 kΩ: gain = 1 + (Rf)/(Rg) = 1 + (100 kΩ)/(10 kΩ) = 11×
- In decibels: 20·log10(11) = 20.83 dB
- With a 200 mV input the output is 11 × 200 mV = 2.2 V, as long as it stays inside the supply rails.
Resistor values for common gains (E24)
| Target gain | Non-inverting Rf, Rg | Actual gain | Inverting Rf, Rin | Actual gain |
|---|---|---|---|---|
| Target gain2× (6.0 dB) | Non-inverting Rf, Rg10 kΩ, 10 kΩ | Actual gain2× | Inverting Rf, Rin20 kΩ, 10 kΩ | Actual gain−2× |
| Target gain5× (14.0 dB) | Non-inverting Rf, Rg30 kΩ, 7.5 kΩ | Actual gain5× | Inverting Rf, Rin75 kΩ, 15 kΩ | Actual gain−5× |
| Target gain10× (20.0 dB) | Non-inverting Rf, Rg180 kΩ, 20 kΩ | Actual gain10× | Inverting Rf, Rin100 kΩ, 10 kΩ | Actual gain−10× |
| Target gain20× (26.0 dB) | Non-inverting Rf, Rg82 kΩ, 4.3 kΩ | Actual gain20.07× | Inverting Rf, Rin200 kΩ, 10 kΩ | Actual gain−20× |
| Target gain50× (34.0 dB) | Non-inverting Rf, Rg330 kΩ, 6.8 kΩ | Actual gain49.53× | Inverting Rf, Rin750 kΩ, 15 kΩ | Actual gain−50× |
| Target gain100× (40.0 dB) | Non-inverting Rf, Rg1 MΩ, 10 kΩ | Actual gain101× | Inverting Rf, Rin1 MΩ, 10 kΩ | Actual gain−100× |
Both resistors are E24 values, chosen for the gain closest to the target (Rg and Rin between 1 and 100 kΩ, nearest 10 kΩ on a tie). Non-inverting gain is 1 + (Rf)/(Rg); inverting gain is −(Rf)/(Rin).
Using it in practice
Step by step
- Choose inverting or non-inverting, then enter the feedback resistor and the input (or ground) resistor.
- Read the gain as a ratio and in dB, and the output for your input voltage.
- Compare the output with your supply rails; if it is close to or beyond them, the real op-amp will clip.
Common mistakes
- Forgetting the output swing limit. A classic LM358 on a 5 V supply cannot drive its output much above about 3.5 V. Only rail-to-rail output parts get close to both rails.
- Asking for too much gain at high frequency. Gain times bandwidth is roughly constant. A part with a 1 MHz gain-bandwidth product set to a gain of 100 is flat only up to about 10 kHz.
- Single supply with no bias. On a single supply an AC input swings below ground. Bias the non-inverting input to mid-supply and AC-couple the signal.
Choosing resistor values
Values between about 1 kΩ and 100 kΩ work for most general-purpose op-amps. Much lower values load the output and the source; much higher values make bias current and stray capacitance matter. In the inverting amplifier the input resistor is also the input impedance seen by the source, so a 1 kΩ input resistor is a heavy load on a sensor. Add a small capacitor across a large feedback resistor if the circuit oscillates or picks up noise.
Frequently asked questions
Can a non-inverting amplifier have a gain below 1?
No. Its gain is 1 + (Rf)/(Rg), so the minimum is 1. With Rf shorted and Rg removed it becomes a unity-gain voltage follower (buffer). To attenuate, add a divider in front or use an inverting amplifier.
What if the calculated output is higher than the supply?
The output clips near the supply rail and the waveform distorts. Unless the op-amp is rail-to-rail, expect clipping 1 to 2 V below the supply and leave headroom.