What Is an Op-Amp Gain Calculator?
An operational amplifier (op-amp) is a high-gain voltage amplifier whose closed-loop gain is set almost entirely by two external resistors: the feedback resistor (Rf) and the input resistor (Rin). This calculator determines the voltage gain (Av) for both the inverting and non-inverting configurations and also reports the gain in decibels (dB). It is a universal electronics tool that applies to any standard ideal op-amp circuit.
How to Use It
Select the amplifier configuration, then enter the feedback resistor Rf and the input resistor Rin in ohms. The calculator returns the voltage gain in V/V and the corresponding decibel value. For a non-inverting amplifier the output is in phase with the input (positive gain); for an inverting amplifier the gain is negative, indicating a 180° phase shift.
The Formula Explained
For a non-inverting amplifier, the gain is $$A_v = 1 + \frac{\text{R}_f}{\text{R}_{in}}$$ Because of the leading "1", a non-inverting amplifier always has a gain of at least 1 (unity). For an inverting amplifier, the gain is $$A_v = -\frac{\text{R}_f}{\text{R}_{in}}$$ which can be less than, equal to, or greater than 1 in magnitude. The decibel value is computed as \(20 \cdot \log_{10}(|A_v|)\).
Worked Example
Suppose Rf = 10,000 Ω and Rin = 1,000 Ω in a non-inverting configuration. Then $$A_v = 1 + \frac{10{,}000}{1{,}000} = 1 + 10 = 11 \text{ V/V}$$ In decibels this is \(20 \cdot \log_{10}(11) \approx 20.83 \text{ dB}\). The same resistors in an inverting circuit give $$A_v = -\frac{10{,}000}{1{,}000} = -10 \text{ V/V}$$ or 20 dB in magnitude.
Gain Comparison for Common Resistor Pairs
The table applies the ideal closed-loop formulas: inverting gain \(A_v = -\frac{R_f}{R_{in}}\) and non-inverting gain \(A_v = 1 + \frac{R_f}{R_{in}}\). The dB value is the magnitude, \(20\log_{10}|A_v|\), so the sign (phase inversion) is not reflected in dB.
| Rf / Rin | Rf/Rin ratio | Inverting gain (V/V) | Inverting |Av| (dB) | Non-inverting gain (V/V) | Non-inverting (dB) |
|---|---|---|---|---|---|
| 1 kΩ / 1 kΩ | 1 | −1 | 0.00 dB | 2 | 6.02 dB |
| 10 kΩ / 1 kΩ | 10 | −10 | 20.00 dB | 11 | 20.83 dB |
| 100 kΩ / 1 kΩ | 100 | −100 | 40.00 dB | 101 | 40.09 dB |
| 47 kΩ / 4.7 kΩ | 10 | −10 | 20.00 dB | 11 | 20.83 dB |
| 100 kΩ / 10 kΩ | 10 | −10 | 20.00 dB | 11 | 20.83 dB |
Key observations:
- With 1 kΩ / 1 kΩ the inverting stage has unity magnitude (0 dB), while the non-inverting stage has a gain of 2, about 6.02 dB.
- Only the ratio matters, not the absolute values: 10k/1k, 47k/4.7k and 100k/10k all give the same gain. The absolute values do affect input impedance, noise, and loading.
- The non-inverting gain is always exactly 1 V/V higher than the inverting magnitude, so the two configurations converge in dB at high gain (40.00 dB vs 40.09 dB at a ratio of 100).
- Worked check: for 10 kΩ / 1 kΩ non-inverting, \(A_v = 1 + \frac{10\,000}{1\,000} = 11\), and \(20\log_{10}(11) \approx 20.83\) dB.
Interpreting Your Gain Result
Sign and phase. A negative gain (inverting configuration) means the output is 180° out of phase with the input: a positive input gives a negative output. A positive gain (non-inverting configuration) means the output is in phase with the input. The decibel value only expresses magnitude.
Decibel reference points. Because voltage gain in dB is \(20\log_{10}|A_v|\):
- 0 dB corresponds to 1 V/V (output magnitude equals input).
- 20 dB corresponds to 10 V/V.
- 40 dB corresponds to 100 V/V.
- Every additional 6 dB is roughly a doubling of voltage gain.
Output limits. The output cannot exceed what the supply rails allow. If the ideal output (gain × input) is larger than the available swing, the output saturates and the waveform clips. Many op-amps cannot reach the rails exactly and stop a little short of them (rail-to-rail types get closer). For example, with ±15 V supplies and a gain of 10, an input amplitude above roughly 1.5 V will start to clip, a bit less for a non-rail-to-rail device.
Bandwidth. The gain-bandwidth product (GBW) of an op-amp is approximately constant, so the usable closed-loop bandwidth is roughly
$$f_{-3\text{dB}} \approx \frac{GBW}{A_{cl}}$$
For instance, an op-amp with a GBW of 1 MHz at a closed-loop gain of 10 has a bandwidth of about 100 kHz. Higher gain means lower bandwidth. For an inverting stage, the relevant gain for this estimate is set by the noise gain \(1 + R_f/R_{in}\), which is slightly higher than the signal gain magnitude.
Ideal assumption. The formulas on this page assume a very high open-loop gain (and negligible input current), so the closed-loop gain depends only on the resistor ratio. If the required closed-loop gain approaches the open-loop gain at the signal frequency, the real gain will fall short of the ideal value.
Input impedance. In the inverting configuration, the inverting input is held near virtual ground, so the input impedance seen by the source is approximately \(R_{in}\). In the non-inverting configuration, the signal drives the op-amp's non-inverting input directly, which presents a very high input impedance, so it loads the source very little.
Key Terms and Symbols
- Op-amp (operational amplifier)
- A high-gain differential voltage amplifier with two inputs and one output, normally used with negative feedback so its behavior is set by external components.
- Closed-loop gain
- The gain of the amplifier with feedback applied. With ideal assumptions it depends only on Rf and Rin.
- Open-loop gain
- The gain of the op-amp itself without feedback. It is very large at low frequencies and falls as frequency rises.
- Feedback resistor (Rf)
- The resistor connected from the output back to the inverting input, setting how much of the output is fed back.
- Input resistor (Rin)
- The resistor from the signal source (inverting) or from ground (non-inverting) to the inverting input node. Together with Rf it sets the gain.
- Av (V/V)
- Voltage gain expressed as the ratio of output voltage to input voltage, in volts per volt.
- Decibel (dB)
- A logarithmic unit. For voltage ratios, gain in dB = 20·log10(|Vout/Vin|).
- Inverting input (−) and non-inverting input (+)
- The two op-amp inputs. A signal applied to the inverting input appears at the output with opposite polarity; a signal at the non-inverting input appears with the same polarity.
- Virtual ground
- In an inverting amplifier with negative feedback, the inverting input is held at nearly the same voltage as the grounded non-inverting input, so it behaves like ground without being connected to it.
- Voltage follower
- A non-inverting amplifier with the output tied directly to the inverting input (Rf = 0, no Rin), giving a gain of 1 V/V, very high input impedance, and low output impedance.
- Gain-bandwidth product (GBW)
- The product of closed-loop gain and bandwidth, approximately constant for a voltage-feedback op-amp. It is used to estimate bandwidth as GBW divided by closed-loop gain.
FAQ
Why is the inverting gain negative? The negative sign indicates the output signal is inverted (180° out of phase) relative to the input; the magnitude is what determines amplification.
Can the non-inverting gain be less than 1? No. The "+1" term guarantees a minimum gain of 1 (a voltage follower when Rf = 0).
What happens if Rin is zero? Dividing by zero is undefined, so a valid non-zero input resistance is required for a meaningful gain.