Try it

+RfVoutVinRin

Inverting: Vin enters through Rin at −; + is grounded. Rf feeds Vout back to −. Ideal linear operation; supply rails omitted.

Gain-10×
Gain in dB20dB

Understand the result

What's going on

An op-amp on its own has huge, unpredictable gain - nearly useless as-is. Wire two resistors around it in a feedback loop and that wild gain gets tamed into a precise, predictable multiplier set entirely by the resistor values you chose.

The formula

Inverting: Gain = −Rf / Rin

Non-inverting: Gain = 1 + Rf / Rg

Rg is the resistor from the inverting input to ground; it uses the same resistance field as Rin in inverting mode.

Show the derivation, mnemonic, and worked example

Build it up

The feedback resistor (Rf) and input resistor (Rin) form a ratio, and the op-amp forces its output to whatever it takes to keep its two inputs balanced. In the inverting layout, the signal enters through Rin and the output flips sign - the gain is just Rf over Rin. In the non-inverting layout the input bypasses Rin entirely and the output stays the same polarity, which is why that configuration always adds one to the ratio instead of just returning it.

Worked example

Worked example

Inverting, Rf = 10 kΩ, Rin = 1 kΩ

Gain = −10,000 / 1,000

Gain = −10 (10× louder, inverted)