Op-Amp Gain Calculator
An op-amp and two resistors make an amplifier. What gain do the resistors give, what comes out, and where does it clip? Pick the circuit, set the two resistors, the input signal and the supply, and watch the output. You can also click or drag on the graphs.
How it works
An op-amp (operational amplifier) is a chip with two inputs, marked + and −, and one output. On its own it has enormous gain. Feeding part of the output back to the − input tames it, and the two resistors set exactly how much it amplifies: Rf (the feedback resistor) runs from the output back to the − input, and Rg (the gain resistor) sets how much of that comes back.
- Non-inverting: the signal goes into the + input, and Rg runs from the − input to ground. The output is the same way up as the input. Gain = 1 + Rf ÷ Rg. The gain can’t go below 1.
- Inverting: the signal goes in through Rg to the − input, and the + input goes to ground. The output is flipped upside down. Gain = −Rf ÷ Rg. The minus sign just means flipped, and the gain can go below 1, so this circuit can make a signal smaller.
A gain of 11 means a 0.2 V input comes out as 2.2 V. Gain is also given in decibels (dB): 20 dB is ×10, 40 dB is ×100.
Clipping
The output can’t go beyond the supply. Most op-amps can’t even reach it: a TL072 stays about 1.5 V away from each rail. That gap is the headroom. Ask for more than the output can reach and the tops of the wave get flattened off. That’s clipping, and it’s how a guitar overdrive pedal gets its sound.
On a split supply (like ±4.5 V) the signal swings around 0 V. On a single supply (like 9 V) it has to swing around the middle, half the supply, so it has room to go both up and down.
Handy shortcuts
- Buffer: set Rf to 0 and leave Rg out. The gain is 1: the output copies the input, but it can drive things the input couldn’t.
- Cf: a capacitor across Rf cuts the high frequencies. Above its corner frequency, 1 ÷ (2π × Rf × Cf), the gain falls away.
- Gain-bandwidth: an op-amp can’t give lots of gain at high frequencies. The gain-bandwidth number on the datasheet, divided by your gain, is roughly the highest frequency it can amplify properly. A TL072 (3 MHz) at a gain of 100 only keeps up to about 30 kHz.
Watch out
- The inputs of most op-amps must also stay within their own range of the rails. Check the datasheet’s “input common-mode range”.
- Op-amps put out tens of milliamps at most. That’s not enough for a speaker or a motor.
- Put a 100 nF capacitor from each power pin to ground, right at the chip.
- Tie off any unused op-amp in the package (for example, wire it as a buffer with its + input at the middle voltage), or it can oscillate and cause trouble.


