How it works
Non-inverting configuration
The output is in phase with the input. Gain is set by the R1/Rf voltage divider on the inverting input:
G = 1 + Rf / R1 (always ≥ 1)
Rf = R1 × (G − 1)
For unity gain (voltage follower / buffer), short Rf to 0 Ω and leave R1 open. The non-inverting input sees a high impedance — useful for buffering sensors.
Inverting configuration
The output is 180° out of phase with the input. Input impedance equals Rin:
G = −Rf / Rin (negative = inverted)
Rf = Rin × |G|
The inverting input is a virtual ground (held at 0 V by feedback). Input current flows through Rin and is “absorbed” by Rf. This makes the input impedance well-defined and load-independent.
Gain-bandwidth product (GBP)
Every op-amp has a unity-gain bandwidth — the frequency at which open-loop gain drops to 1×. GBP is approximately constant:
GBP = G × f_signal
→ f_max = GBP / G
→ G_max = GBP / f_signal
An LM358 with 1 MHz GBP can only deliver 100× gain up to 10 kHz. Above that, the actual gain starts rolling off. For a 100× audio pre-amp targeting 20 kHz, you need GBP > 2 MHz — use an NE5532 (10 MHz GBP) or OPA2134 (8 MHz GBP).
Resistor values
Keep Rf between 1 kΩ and 1 MΩ:
- Below 1 kΩ: output stage has to source significant current just to drive the feedback network, increasing dissipation
- Above 1 MΩ: bias current errors and noise become significant; input bias current through Rf creates an offset voltage
For a precision op-amp with 10 nA bias current and 1 MΩ Rf, the input-referred offset is 10 nA × 1 MΩ = 10 mV — significant for a sensor reading millivolts.
Balancing input bias current
Add a resistor R_bal = Rf ∥ R1 in series with the non-inverting input. This makes both inputs see the same impedance, so bias current creates equal offsets that cancel in the differential pair.
R_bal = Rf × R1 / (Rf + R1)
For a LM358 (input bias ~45 nA), this can save several millivolts of systematic offset.
Common op-amp selection
| Op-amp | GBP | Vos | Ib | Supply | Notes |
|---|---|---|---|---|---|
| LM358 | 1 MHz | 2 mV | 45 nA | 3–32V single | Cheap, general purpose |
| NE5532 | 10 MHz | 0.5 mV | 200 nA | ±5–±15V | Low noise audio |
| TL072 | 3 MHz | 3 mV | 65 pA | ±5–±18V | JFET input, low Ib |
| MCP6002 | 1 MHz | 4.5 mV | 1 pA | 1.8–6V | Rail-to-rail, 3.3V |
| OPA2134 | 8 MHz | 0.5 mV | 5 pA | ±5–±18V | High precision audio |
| INA128 | 1 MHz | 25 µV | 5 nA | ±2.25–±18V | Instrumentation amp |
Common mistakes
Exceeding the GBP limit and not knowing it. The circuit appears to work on a bench at low signal levels, but gain collapses at higher frequencies. Always calculate f_max = GBP / G and verify you’re below it with 3× headroom.
Floating the non-inverting input. If the + input is connected to a high-impedance source (photodiode, high-value resistor), it picks up 50/60 Hz interference. Add a 100 kΩ pull-down to establish a DC bias point, or use a JFET-input op-amp with its own bias network.
Rail-to-rail confusion. “Rail-to-rail output” means the output swings to within a few millivolts of the supply rails — but the input may not. A rail-to-rail input op-amp (RRIO) can accept inputs at or beyond the rails; a standard op-amp input must stay within the common-mode input range, typically Vss+1.5V to Vdd−1.5V.
Choosing Rf too large for the bias current. At 10 MΩ Rf and 100 pA bias current (TL072), the offset is only 1 mV. At 10 MΩ and 45 nA (LM358), offset is 450 mV — saturating the output. Match your resistor range to the op-amp’s bias current specification.