About the Op-Amp Gain Calculator
This calculator finds the closed-loop voltage gain of the two most common operational-amplifier circuits — the inverting amplifier and the non-inverting amplifier — from the feedback resistor (Rf) and input resistor (Rin) you specify. It then applies that gain to an input voltage to report the ideal output voltage, the gain expressed in decibels, and whether the result would clip against the supply rails of a real op-amp.
The two standard gain formulas
- Inverting amplifier: Av = -Rf / Rin. The input signal drives the inverting (-) terminal through Rin, and Rf feeds back from the output to that same node. The output is an inverted (180° phase-shifted), scaled copy of the input, and the input impedance seen by the source is approximately Rin.
- Non-inverting amplifier: Av = 1 + Rf / Rin. The input signal drives the non-inverting (+) terminal directly, while Rf and Rin form a feedback divider from the output back to the inverting terminal. The output stays in phase with the input, and gain can never drop below 1.
Where the formulas come from
Both formulas follow from the ideal op-amp model: infinite open-loop gain, infinite input impedance (no current flows into either input pin), and — in a stable negative-feedback loop — a "virtual short" that forces the two input terminals to sit at nearly the same voltage. Applying Kirchhoff's current law at the inverting node under these assumptions, with no current flowing into the op-amp, yields the two gain equations above directly from Rf and Rin.
Output voltage and clipping
The ideal output is simply Vout = Av × Vin. A real op-amp, however, cannot swing its output past roughly its supply rails (±Vs, or in some designs a bit less due to internal headroom losses). If the ideal Vout would exceed the supply voltage you enter, the amplifier saturates: the actual output flattens near the rail instead of following the formula. This calculator reports both the situation — clipped or not — and the clamped, realistic output voltage.
Reading the decibel figure
Voltage gain in decibels is 20 × log10(|Av|). A gain of 1 (0 dB) means no amplification; positive dB values above that indicate amplification, and a fractional gain (below 1, only possible in some inverting designs) gives a negative dB value, indicating attenuation.