Audited ·Last updated 31 Jul 2026·5 citations·Tier 1·0 uses

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

Configuration
Only the RATIO of Rf to Ri sets the gain, but the absolute values matter in practice: too small and the op-amp has to drive the feedback network, too large and bias current, noise and stray capacitance start to dominate. Values from about 1 kΩ to 100 kΩ are the usual compromise.
Ri unit
The resistor from the output back to the inverting input. Together with Ri it sets both the signal gain and the noise gain.
Rf unit
Zero and negative values are allowed. In the difference configuration this field is the inverting input, V₋.
V
The non-inverting input of the difference amplifier. Ignored in the other three configurations.
V
From the first page of the op-amp's datasheet, often listed as unity-gain bandwidth. A 741 is about 1 MHz; a modern precision part is 10–100 MHz.
GBW unit
A symmetric supply is assumed. Remember that a real op-amp does not swing all the way to its rails — a classic part on ±15 V clips at about ±13 V.
V
Closed-loop voltage gain
10
Signed. 1 + Rf/Ri non-inverting, −Rf/Ri inverting, 1 for the follower, Rf/Ri for the difference amplifier. The negative sign on the inverting configuration is the 180° phase inversion, not an error — Fiore Eq. 4.1 and 4.2.
Output voltage
5 V
Gain in decibels
20 dB
Gain magnitude
10
Voltage actually amplified
0.5 V
Noise gain
10
Closed-loop bandwidth
100,000 Hz
Feedback factor β
0.1
Reading of the result
Non-inverting: the signal enters the + input, so the output is in phase and the input impedance is very high. Signal gain and noise gain are equal here, which is why this configuration gets the most bandwidth for a given gain. 5 V sits comfortably inside the ±12 V supply, using 41.67 % of the available swing. Note that a real op-amp does not swing all the way to its rails: Fiore works his examples with a ±15 V supply giving roughly ±13 V of usable output, so this comparison is optimistic by about that margin unless the part is specified rail-to-rail. This page also models only the small-signal bandwidth — 100000 Hz here. A large signal is additionally limited by slew rate, and the smaller of the two limits is the one that governs.

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.

  1. 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.
  2. 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.
  3. 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₋.
  4. 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.
  5. Enter the supply rail. A symmetric supply is assumed, so ±12 V means entering 12.
  6. Read the signed gain and the output voltage. A negative gain is the inverting configuration's 180-degree phase shift, not an error.
  7. 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.
  8. 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.

A_v = 1 + R_f/R_i · A_v = −R_f/R_i · A_noise = 1 + R_f/R_i · f₂ = GBW ⁄ A_noise

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.

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.

gain Bandwidth Product1
supply Rail Voltage12
gbw UnitMHz
input Resistance Unitkilohm
second Input Voltage0.2
configurationnon-inverting
feedback Resistance9
feedback Resistance Unitkilohm
input Voltage0.5
input Resistance1

Frequently asked questions.

What is the gain formula for a non-inverting op amp?
Av = 1 + Rf/Ri, where Rf is the feedback resistor and Ri the resistor from the inverting input to ground. Fiore's Operational Amplifiers and Linear Integrated Circuits gives it as Eq. 4.1. Note the 'one plus': the non-inverting configuration cannot have a gain below unity, because even with Rf at zero the gain is 1. If you need attenuation, use an inverting stage or a divider ahead of the amplifier.
Why is the inverting amplifier's gain negative?
Because the output really is inverted — 180 degrees out of phase with the input. Fiore's Eq. 4.2 is Av = −Rf/Ri, and the text explains that 'there is a change in polarity because we reference the output signal to ground'. The minus sign is information, not an error, and this calculator keeps it in the signed gain output. The decibel figure uses the magnitude instead, because the logarithm of a negative number is undefined.
What is noise gain and why is it different from signal gain?
Noise gain is the gain the feedback loop sees, always 1 + Rf/Ri, and it is what determines stability and bandwidth. For a non-inverting amplifier it equals the signal gain. For an inverting amplifier the signal gain is Rf/Ri while the noise gain is one unit larger, so the two differ. Since the closed-loop bandwidth is the gain-bandwidth product divided by the noise gain, an inverting stage always has less bandwidth than a non-inverting stage of the same gain — which is why this calculator shows both numbers.
How do I calculate the bandwidth of an op amp circuit?
Divide the gain-bandwidth product from the datasheet by the noise gain: f₂ = GBW / A_noise, Fiore Eq. 5.1. A 1 MHz part at a noise gain of 10 gives 100 kHz. Use the linear noise gain, never the decibel figure — Fiore's text carries an explicit warning about that. And remember this is the small-signal bandwidth: a large output is separately limited by slew rate, and whichever limit is lower is the one you will actually hit.
Does a unity-gain inverter have the same bandwidth as a buffer?
No — it has exactly half. A voltage follower has a noise gain of 1 and gets the full gain-bandwidth product. A unity-gain inverter with equal resistors has a signal gain of −1 but a noise gain of 1 + 1 = 2, so its bandwidth is GBW ÷ 2. This is the clearest demonstration of why noise gain is worth tracking separately, and this calculator asserts the identity as a test.
What resistor values should I use?
Only the ratio sets the gain, so start with the ratio and then choose the scale. Values that are too small make the op-amp waste output current driving its own feedback network and can push it toward its output current limit. Values that are too large let input bias current create offset voltage, raise the resistors' own thermal noise, and let stray capacitance form an unintended pole with the feedback resistor. Somewhere between about 1 kΩ and 100 kΩ is the usual compromise; precision DC circuits tend lower, low-power and high-impedance circuits higher.
Will my output really swing to the supply rails?
No, and this is the caveat this page states beside the result rather than hiding. A classic op-amp on a ±15 V supply clips at roughly ±13 V — Fiore uses exactly those figures when working slew-rate examples — so about two volts of headroom is lost at each rail. Rail-to-rail output parts get much closer, often within tens of millivolts at light load, but the margin grows with output current. Treat this calculator's rail comparison as optimistic and check the output-voltage-swing specification in your part's datasheet at your actual load.
Can I trust the difference amplifier mode for a real design?
As a starting point, yes; as a prediction of common-mode rejection, no. The equation Vout = (Rf/Ri)(V₊ − V₋) assumes the two resistor pairs match exactly. Any mismatch degrades CMRR directly, and Fiore notes that high-CMRR systems may need resistor matching better than 0.01 percent — far tighter than ordinary 1 percent parts. The simple circuit also loads the sources unequally, and 'the impedance of one input may very well be a function of the signal present on the other input'. That is precisely why three-op-amp instrumentation amplifiers with trimmed resistor networks exist.
What limits the output at high frequency — bandwidth or slew rate?
Whichever is lower for the amplitude you want. The closed-loop bandwidth on this page is a small-signal limit and applies regardless of amplitude. Slew rate is a large-signal limit: the maximum volts per microsecond the output can move, giving a power bandwidth of f_max = SR / (2πVp) for a peak amplitude Vp. A stage can be perfectly flat to 100 kHz on a small signal and distort badly at 20 kHz on a 10 V peak. This page does not compute slew rate, and says so.
How do I get a gain of less than one from an op amp?
Not from the non-inverting configuration, whose gain is 1 + Rf/Ri and therefore never below unity. Use the inverting configuration with Rf smaller than Ri: 1 kΩ of feedback against 10 kΩ of input gives a gain of −0.1, or −20 dB. Bear in mind that the noise gain is still 1 + Rf/Ri = 1.1, so you keep almost the full bandwidth, and that the input impedance is the 10 kΩ input resistor. A passive divider ahead of a follower is the alternative when you need attenuation without inversion.

References& sources.

  1. [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. [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. [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. [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. [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
Coming soon