Op Amp Gain Calculator — Inverting, Non-Inverting, Buffer and Difference
Closed-loop gain, output voltage, noise gain and bandwidth for inverting, non-inverting, buffer and difference op-amp stages, with a supply-rail headroom check.
Op Amp Gain Calculator
Background.
An operational amplifier's closed-loop gain is set almost entirely by two resistors, and that is the whole reason the device took over analogue electronics. The op-amp's own gain is enormous, poorly controlled and varies from part to part; wrap feedback around it and the gain becomes a ratio of two components you can buy to one percent. This calculator works out that gain for the four configurations that cover most of what anyone builds, together with the output voltage, the bandwidth you actually get, and whether the result will fit between your supply rails.
The four configurations are not interchangeable. The non-inverting amplifier has a gain of one plus the resistor ratio, keeps the signal in phase, and presents a very high input impedance because the signal goes straight into the op-amp's own input. The inverting amplifier has a gain of minus the resistor ratio — the negative sign is a real 180 degree phase inversion, not a slip — and its input impedance is simply the input resistor, which is why, as Fiore puts it, it is very hard to get both high gain and high input impedance out of that circuit. The voltage follower has no resistors at all, unity gain, and exists purely to convert a high source impedance into a low one. The difference amplifier subtracts one input from the other and multiplies by the resistor ratio.
The number that catches people out is noise gain, and it is why this page shows it separately. Noise gain is one plus the resistor ratio for both the inverting and the non-inverting configuration — it does not follow the signal gain. For the non-inverting amplifier the two are equal. For the inverting amplifier the noise gain is one unit larger than the signal gain, and since it is the noise gain that divides the gain-bandwidth product, an inverting stage always has less bandwidth than a non-inverting stage of the same gain. The extreme case is instructive: a unity-gain inverter has a noise gain of two and therefore exactly half the bandwidth of a unity-gain follower built from the same op-amp. Fiore states the rule directly and draws the same conclusion — for maximum bandwidth at low gain, the non-inverting form is generally preferred.
Bandwidth here is the small-signal figure, the gain-bandwidth product divided by the noise gain. It is a genuine limit but it is not the only one. A large output signal is separately limited by slew rate, the maximum volts per microsecond the output can move, and the frequency at which slew rate becomes the binding constraint depends on the amplitude you are asking for. The smaller of the two limits governs. This page computes the small-signal number and says so rather than pretending it is the whole story.
Two caveats sit next to the result rather than in a footnote, because both change how the number should be read. The first is that a real op-amp does not swing to its rails. Fiore works his examples with a plus and minus fifteen volt supply giving roughly plus and minus thirteen volts of usable output — about two volts of headroom lost at each rail on a classic part. Rail-to-rail devices get much closer but still do not arrive. The rail comparison on this page is therefore optimistic by that margin, and a result that reads as comfortably inside the rails at ninety-five percent of the supply is in reality already clipping on most parts.
The second caveat applies to the difference configuration. Its equation assumes the two resistor pairs are perfectly matched, and they never are. Any mismatch degrades common-mode rejection directly, and Fiore records that for high-CMRR systems resistor matching may need to be better than one part in ten thousand. That is why a real instrumentation amplifier uses three op-amps and a laser-trimmed resistor network rather than one op-amp and four discrete parts. Treat the difference mode here as the ideal case and the starting point of a design, not as a prediction of the common-mode rejection you will measure.
What is op amp gain calculator?
An operational amplifier is a very high gain differential amplifier designed to be used with negative feedback. On its own its open-loop gain is enormous — often more than a hundred thousand — and neither accurate nor stable across parts and temperature. Feeding a fraction of the output back to the inverting input tames that: the closed-loop gain becomes almost entirely a function of the feedback network, so two resistors set it and the op-amp's own imperfections are divided down by the loop gain. The four standard resistive configurations follow from where the signal enters. In the non-inverting amplifier the signal drives the + input and the feedback network divides the output down to match it, giving Av = 1 + Rf/Ri. In the inverting amplifier the signal drives the − input through Ri while the + input is grounded; the op-amp holds the − input at a virtual ground, and Av = −Rf/Ri. The voltage follower is the non-inverting amplifier with Rf zero and Ri infinite, so Av = 1. The difference amplifier combines both paths and gives Vout = (Rf/Ri)(V₊ − V₋). Alongside signal gain sits noise gain — the gain the feedback loop itself sees, always 1 + Rf/Ri — which determines stability and bandwidth and is not the same number as the signal gain in the inverting case. Closed-loop bandwidth is the gain-bandwidth product divided by the noise gain, which is the formal statement of the familiar trade: more gain, less bandwidth, with the product fixed by the part you chose.
How to use this calculator.
- Choose the configuration. Non-inverting for high input impedance and maximum bandwidth; inverting when you want a virtual-ground summing point or a defined input impedance; buffer for impedance conversion at unity gain; difference to subtract one signal from another.
- Enter the two resistors with their units. Only the ratio sets the gain, but keep the absolute values in the 1 kΩ to 100 kΩ range: smaller and the op-amp wastes output current driving its own feedback network, larger and bias current, noise and stray capacitance start to matter.
- Enter the input voltage. In the difference configuration this field is V₋ and the second field is V₊, so the output follows V₊ minus V₋.
- Enter the gain-bandwidth product from the datasheet — often listed as unity-gain bandwidth. It is the single number that decides how much bandwidth you get at your chosen gain.
- Enter the supply rail. A symmetric supply is assumed, so ±12 V means entering 12.
- Read the signed gain and the output voltage. A negative gain is the inverting configuration's 180-degree phase shift, not an error.
- Read the noise gain separately from the signal gain, especially for an inverting stage, because the noise gain is what divides the gain-bandwidth product and it is one unit larger.
- Check the headroom verdict, then discount it. A real op-amp clips a volt or two short of each rail unless it is specified rail-to-rail, so treat anything above about 80 % of the supply as needing verification against the datasheet's output-swing specification.
The formula.
The gain equations. Fiore's Operational Amplifiers and Linear Integrated Circuits §4.2 gives the non-inverting amplifier as Eq. 4.1, Av = 1 + Rf/Ri, and the inverting amplifier as Eq. 4.2, Av = −Rf/Ri, noting that 'there is a change in polarity because we reference the output signal to ground'. The same section contrasts the two on input impedance: the non-inverting form offers a very high Zin, while for the inverting form 'there is a definite interrelation between Zin(Ri) and Av(−Rf/Ri)', so 'it is very hard to achieve both high gain and high Zin with this circuit'. The voltage follower is the non-inverting case with the feedback network removed, giving unity gain. The difference amplifier appears at §4.2.8 and again as Eq. 6.1 in §6.2: Vout = (Rf/Ri)(V_b − V_a), which this page implements as (Rf/Ri)(V₊ − V₋).
Noise gain, and why it is a separate output. Fiore §5.3 defines the noise gain as A_noise = 1 + Rf/Ri and states plainly that it 'is the same as ordinary voltage gain for the noninverting voltage amplifier, but is one unit larger than the inverting amplifier's ordinary gain (Rf/Ri)'. It matters because Eq. 5.1 divides by it: f₂ = GBW/A_noise. The consequence, in Fiore's own words, is that 'for the same gain, noninverting amplifiers will exhibit a higher break frequency than inverting types. Thus, for maximum bandwidth with low gain circuits, the noninverting form is generally preferred.' The starkest case is a unity-gain inverter, whose noise gain is 2 and whose bandwidth is therefore exactly half that of a unity-gain follower built from the same part — an identity this calculator asserts as a test. Fiore adds one warning worth repeating: 'Never use the gain in dB form for this calculation.' The bandwidth here is computed from the linear noise gain, never from the decibel figure.
Decibels. The gain in decibels is 20·log₁₀ of the gain magnitude, using the magnitude because the logarithm of a negative number is undefined. The sign lives in the signed gain output instead. A gain of 10 is exactly 20 dB; a gain of 9 is 19.0848501888 dB.
What the headroom check does and does not tell you. The verdict compares the magnitude of the computed output against the supply rail, classifying the unrounded value: comfortable below 90 % of the rail, close between 90 % and 100 %, clipping at or above it. The classification is deliberately run on the unrounded number so that a result sitting a hair over a boundary is not reported as sitting on it. But the comparison itself is optimistic, because an ideal op-amp swings to its rails and a real one does not. Fiore §5.4 works its slew-rate examples with 'a ±15 V supply yielding approximately ±13 V clipping levels' and advises setting the peak voltage to the op-amp's clipping level rather than to the supply. Rail-to-rail parts close most of that gap but not all of it, and the remaining headroom loss grows with load current.
Slew rate, which this page does not compute. Fiore §5.4 defines slew rate as the rate of change of voltage versus time and gives the power bandwidth as f_max = SR/(2πV_p): the highest frequency at which the op-amp can reproduce a sine wave of peak amplitude V_p without slewing-induced distortion. That is a large-signal limit, entirely independent of the small-signal bandwidth this page returns, and the smaller of the two is the one that governs. A stage with 100 kHz of small-signal bandwidth and a slew rate too low for a 10 V peak at 100 kHz will distort long before its Bode plot suggests it should.
The difference amplifier's honest limitation. Fiore §6.2 gives Eq. 6.1 and then dismantles the simple circuit: 'the input impedances are not isolated; indeed, the impedance of one input may very well be a function of the signal present on the other input', and 'Any mismatch in gain between the two inputs will result in a degradation of CMRR... For high CMRR systems, resistor matching may need to be better than 0.01%.' That is the reason real instrumentation amplifiers exist. The difference mode here computes the ideal case.
Rounding stage. Every quantity is carried at full decimal precision and rounded once, at the return boundary — ten decimal places for values of one and above, ten significant digits below one. The second rule matters for a feedback factor of 1e-6 or a deliberately attenuating stage, both of which a fixed decimal-place rule would flatten to zero.
Also not modelled: input offset voltage and bias current, which set the DC error and matter most at high gain; common-mode and power-supply rejection; noise; output current limit; and stability margin, which depends on the feedback network's phase as well as its magnitude.
A worked example.
A non-inverting stage with a 1 kΩ input resistor and a 9 kΩ feedback resistor, driven by 0.5 V, built from a 1 MHz op-amp on ±12 V rails. The resistor ratio is 9000 ÷ 1000 = 9, so the closed-loop gain is 1 + 9 = 10 — positive, because the non-inverting configuration does not invert. Ten is exactly 20 dB. The output is 10 × 0.5 = 5 V, and the voltage actually amplified is the input itself, 0.5 V. The noise gain is also 10, identical to the signal gain, which is the defining property of this configuration, and the feedback factor is 1 ÷ 10 = 0.1. Dividing the gain-bandwidth product by the noise gain gives a closed-loop bandwidth of 1,000,000 ÷ 10 = 100,000 Hz — 100 kHz. At 5 V against a 12 V rail the output uses 41.67 % of the available swing, comfortably inside the 90 % threshold, so the verdict reads as inside the supply rails. Now change only the configuration and watch what happens. Inverting, with the same two resistors, gives a gain of −9: the magnitude drops by one and the sign flips, so the output is −4.5 V and the gain in decibels falls to 19.0848501888. But the noise gain is still 10, so the bandwidth is still 100 kHz — the same bandwidth for less signal gain, which is exactly Fiore's point that a non-inverting stage is preferable when bandwidth matters. The voltage follower is starker still: unity gain, 0 dB, an output of 0.5 V, a noise gain of 1, and the full 1,000,000 Hz of bandwidth. And a unity-gain inverter built from 10 kΩ and 10 kΩ would have a noise gain of 2 and only 500 kHz — half the follower's bandwidth for the same gain magnitude. The difference configuration, with V₋ = 0.5 V and V₊ = 0.2 V, amplifies the difference of −0.3 V by 9 to give −2.7 V. Two things to carry away from the numbers. First, the 12 V rail comparison is optimistic: a classic op-amp on ±15 V clips around ±13 V, so on ±12 V you should expect usable output closer to ±10 V and treat anything above about 9.6 V as suspect. Second, 100 kHz is the small-signal bandwidth. If you ask this stage for a 10 V peak at 100 kHz, slew rate — not bandwidth — will decide whether you get it.
Frequently asked questions.
What is the gain formula for a non-inverting op amp?
Why is the inverting amplifier's gain negative?
What is noise gain and why is it different from signal gain?
How do I calculate the bandwidth of an op amp circuit?
Does a unity-gain inverter have the same bandwidth as a buffer?
What resistor values should I use?
Will my output really swing to the supply rails?
Can I trust the difference amplifier mode for a real design?
What limits the output at high frequency — bandwidth or slew rate?
How do I get a gain of less than one from an op amp?
References& sources.
- [1]James M. Fiore, Operational Amplifiers and Linear Integrated Circuits: Theory and Application, §4.2 'Inverting and Noninverting Amplifiers' (Engineering LibreTexts). Source of the two core gain equations: Eq. 4.1 Av = 1 + Rf/Ri for the non-inverting configuration and Eq. 4.2 Av = −Rf/Ri for the inverting one, with the printed explanation that 'There is a change in polarity because we reference the output signal to ground'. Also the source of the differential-amplifier statement at §4.2.8 and Eq. 4.11 — 'the output voltage is found by multiplying the differential input signal by Rf/Ri' — and of the input-impedance contrast between the two configurations. Open access; retrieved 2026-07-29.
- [2]James M. Fiore, Operational Amplifiers and Linear Integrated Circuits, §5.3 'Gain-Bandwidth Product' (Engineering LibreTexts). Source of Eq. 5.1, f₂ = GBW/A_noise, and of the noise-gain definition A_noise = 1 + Rf/Ri. Contains the statement this page's noise-gain output exists to make visible: 'Noise gain is the same as ordinary voltage gain for the noninverting voltage amplifier, but is one unit larger than the inverting amplifier's ordinary gain (Rf/Ri)', and therefore 'for the same gain, noninverting amplifiers will exhibit a higher break frequency than inverting types'. Also the warning 'Never use the gain in dB form for this calculation!'. Open access; retrieved 2026-07-29.
- [3]James M. Fiore, Operational Amplifiers and Linear Integrated Circuits, §5.4 'Slew Rate and Power Bandwidth' (Engineering LibreTexts). Source of the slew-rate definition ('the rate of change of voltage versus time', dv/dt), of the power-bandwidth relation f_max = Slew Rate/(2πVp), of the instruction 'To be on the conservative side, set Vp to the op amp's clipping level', and of the worked figure of 'a ±15 V supply yielding approximately ±13 V clipping levels' — which is the basis for this page's statement that a real op-amp does not swing to its rails. Open access; retrieved 2026-07-29.
- [4]James M. Fiore, Operational Amplifiers and Linear Integrated Circuits, §6.2 'Instrumentation Amplifiers' (Engineering LibreTexts). Source of Eq. 6.1, Vout = (Rf/Ri)(V_b − V_a), the exact difference-amplifier expression implemented here, together with the limitations that make this page's difference mode an idealisation: 'the input impedances are not isolated; indeed, the impedance of one input may very well be a function of the signal present on the other input', and 'Any mismatch in gain between the two inputs will result in a degradation of CMRR... For high CMRR systems, resistor matching may need to be better than 0.01%'. Open access; retrieved 2026-07-29.
- [5]James M. Fiore, AC Electrical Circuit Analysis: A Practical Approach, §10.3 'Bode Plots' (Engineering LibreTexts). Cited for the decibel and break-frequency conventions this page's gain-in-dB and closed-loop-bandwidth outputs rest on: Eq. 10.15 fc = 1/(2πRC), Eq. 10.14 the lag-network gain −10·log₁₀(1 + f²/fc²), and the statement that break frequencies are 'also known as the half-power points, or corner frequencies'. Open access; retrieved 2026-07-29.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 977 calculators remain free
- No billing is enabled