The op-amp gain calculator above turns a pair of resistor values into the closed-loop gain of an operational amplifier stage, and then tells you the three things the gain figure alone does not: what the output voltage actually becomes, whether that output fits between the supply rails, and how much bandwidth is left once the gain has been taken. A stage can have a perfectly correct gain on paper and still be useless because one of those three has been overlooked.
Arb Digital builds free calculators that carry the consequences through rather than stopping at the headline formula. Switch between the inverting and non-inverting configurations and the sign, the minimum achievable gain and the input impedance behaviour all change with it.
What This Op-Amp Gain Calculator Does
It computes the ideal closed-loop gain of a single op-amp stage in either of the two standard configurations, and reports it as a plain ratio, as a decibel figure and as an output voltage for the input level you supply.
The non-inverting stage has gain 1 + Rf/Rin. Its output follows the input in sign, and because the one is always there the gain can never fall below unity. Set Rf to zero, or Rin to an open circuit, and it becomes a voltage follower with a gain of exactly one — a buffer that adds no gain but presents a very high input impedance.
The inverting stage has gain −Rf/Rin. It flips the sign, and it can attenuate as easily as it amplifies, because nothing stops Rf being smaller than Rin. Its input impedance is Rin itself, which is the practical price of the configuration: a low Rin loads the source that drives it.
How to Use It
- Choose the configuration first. The two formulas differ by more than a sign, and picking the wrong one gives an answer that is out by exactly one unit of gain — small at a gain of 100, decisive at a gain of two.
- Enter the two resistors. Only their ratio sets the gain, so 10 kΩ with 1 kΩ and 100 kΩ with 10 kΩ give the same figure. The absolute values matter for noise, loading and current draw, which is a separate judgement.
- Set the input voltage. Enter a DC level or the peak of an AC signal; whichever you enter, the output figure is in the same measure.
- Give the supply rail and the gain-bandwidth product. These two turn an abstract gain into a stage that either works or does not. The headroom figure goes negative the moment the demanded output exceeds the rail, and the tool says the output clips.
The Formula: How Closed-Loop Gain Is Calculated
Both results come from the two idealisations that make op-amp circuits tractable: no current flows into either input, and negative feedback drives the voltage difference between the inputs to zero.
For the non-inverting stage the input voltage appears at the non-inverting pin, so feedback forces the inverting pin to the same voltage. That pin sits at the junction of Rf and Rin, which form a divider from the output to ground, so Vin = Vout × Rin ÷ (Rin + Rf). Rearranged, A = 1 + Rf ÷ Rin.
For the inverting stage the non-inverting pin is grounded, so feedback holds the inverting pin at zero volts — the virtual earth. The current through Rin, which is Vin ÷ Rin, has nowhere to go but through Rf, giving Vout = −Vin × Rf ÷ Rin, so A = −Rf ÷ Rin. HyperPhysics at Georgia State University sets out both gain expressions on its op-amp varieties page.
Work the defaults. A non-inverting stage with Rf = 10 kΩ and Rin = 1 kΩ gives A = 1 + 10 = 11. In decibels that is 20 log10(11) = 20.83 dB. With 0.2 V in, the output is 2.2 V, which leaves 9.8 V of headroom against a 12 V rail. With a 1 MHz gain-bandwidth product, the closed-loop bandwidth is 1 MHz ÷ 11 = 90.9 kHz.
Switch the same resistors to the inverting configuration and the gain becomes −10, not −11. That difference of one is where the two formulas are most often confused.
Gain-Bandwidth Product: The Constraint People Discover Too Late
An op-amp's open-loop gain is enormous at DC and falls steadily with frequency, typically by a factor of ten for every factor of ten in frequency. The product of gain and frequency along that slope is roughly constant, and that constant is the gain-bandwidth product quoted on the data sheet.
The consequence is a direct trade. Take a gain of ten from a 1 MHz part and roughly 100 kHz of bandwidth remains. Take a gain of a hundred and you have 10 kHz. Take a thousand and you are down to 1 kHz, which will not pass an audio signal, let alone anything faster.
This is why a high gain is usually built as two moderate stages rather than one extreme one. Two stages of gain 32 give a total of 1,024 with each stage still enjoying roughly thirty times the bandwidth of a single stage of the same total gain. The bandwidth figure in the grid updates as you change the resistors, so you can watch the trade happen.
The bandwidth reported here is the small-signal figure. A large output swing can be limited earlier still by slew rate, which is a separate data-sheet number and a different mechanism: the output simply cannot change fast enough, and a sine wave turns into a triangle. If your output is a few volts rather than a few millivolts, check slew rate as well as bandwidth.
Clipping, and Why the Rail Is Not the Limit
The gain equation is happy to tell you that a 2 V input at a gain of 11 gives 22 V. If the amplifier runs on ±12 V, it does not. The output flattens at whatever the part can reach and the waveform is destroyed, which the calculator flags rather than reporting an output the circuit cannot produce.
Real amplifiers stop short of the rail. Older general-purpose parts may give up a volt or more at each end; parts marketed as rail-to-rail get much closer, but how close depends on the load current, and none reaches the rail exactly. This tool deliberately publishes no table of output-swing limits for particular devices, because that figure belongs to your data sheet under your load conditions. Treat the rail figure here as an absolute ceiling and design with margin below it.
Clipping is also the reason to check the input side. A stage running from a single supply has its output centred somewhere above ground, and a signal that swings symmetrically about zero at the input will clip on one side long before the other. That asymmetry is a biasing problem, not a gain problem, and the gain formula gives no hint of it.
Choosing the Absolute Resistor Values, Not Just the Ratio
The gain depends only on the ratio, so the choice of absolute values is free — and that freedom is where quiet mistakes live. Very large values, in the megohm range, generate more thermal noise and make the circuit sensitive to stray capacitance and to the amplifier's own input bias current, which flows through them and creates an offset voltage. Very small values, in the tens of ohms, load the output heavily and waste current for no benefit.
Values from about one kilohm to a hundred kilohms sit comfortably between those failure modes for most general-purpose work, which is why so many published circuits use them. If the value you want is not a standard one, the resistor combination calculator will build it from two you can actually buy, and the resistor color code calculator reads the bands on the part you have.
Tolerance matters more than beginners expect. A gain of 11 built from two 1 per cent resistors carries roughly 2 per cent of uncertainty in the Rf/Rin term. Where the gain has to be accurate, matched resistors or a resistor network are the usual answer rather than tighter individual parts.
How This Differs From the Site's Other Circuit Tools
This page covers active gain: a stage that puts more signal out than went in, using power from the supply. The voltage divider calculator covers the passive opposite, where two resistors can only ever reduce a voltage and the source has to drive the load directly. The two are easily confused because the non-inverting stage contains a divider — but there the divider sits in the feedback path and works backwards from the output.
For the underlying current and voltage relations, use the Ohm's law calculator. For a stage whose output level is set by a resistor ratio in a regulator rather than an amplifier, see the LM317 resistor calculator. To add a frequency-shaping element and turn a flat amplifier into a filter, the filter cutoff calculator gives the corner frequency, and the LED resistor calculator handles the other classic single-resistor sizing problem.
Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.
Browse All Free Tools Talk to Arb DigitalCommon Mistakes to Avoid
- Using the inverting formula for a non-inverting stage — the extra one is not decoration. At a gain of two it is the difference between doubling and merely passing the signal through inverted.
- Ignoring the gain-bandwidth product — a stage with a gain of 1,000 built from a 1 MHz part has about 1 kHz of bandwidth, and every measurement above that frequency will be low.
- Forgetting the input impedance of an inverting stage — it is Rin, and a small Rin loads the source. The non-inverting configuration does not have this problem.
- Designing to the rail voltage — no output reaches its supply rail, and how close it gets depends on the part and the load current. Leave margin and check the data sheet.
- Assuming a single supply behaves like a split one — with one supply the output cannot go below ground, so a signal centred on zero clips on every negative half cycle until the stage is biased.
Related Free Tools From Arb Digital
Build an awkward resistor value with the resistor combination calculator and identify the ones in your parts drawer with the resistor color code calculator. Work the passive case with the voltage divider calculator and the basics with the Ohm's law calculator. Set a corner frequency with the filter cutoff calculator, size a current-limiting resistor with the LED resistor calculator, and set a regulator's output with the LM317 resistor calculator. Everything Arb Digital publishes is listed at the free online tools hub.
Frequently Asked Questions
Because the input signal reaches the output through the amplifier as well as being scaled by the feedback divider. Even with the feedback resistor set to zero the output still equals the input, giving a gain of one. The inverting configuration has no such path, so its gain is simply the resistor ratio.
No. The formula is 1 + Rf/Rin, and both resistors are positive, so the result is always at least one. If you need to attenuate, use an inverting stage with a feedback resistor smaller than the input resistor, or a passive divider ahead of the amplifier.
It is the roughly constant product of gain and frequency along the open-loop roll-off of the amplifier, quoted on the data sheet. Dividing it by your closed-loop gain gives the frequency at which the stage starts to lose accuracy, so higher gain always costs bandwidth.
Yes, for reasons outside the gain equation. Very large values add thermal noise and make input bias current produce an offset; very small values load the output and waste current. Values roughly between one kilohm and a hundred kilohms avoid both problems in general-purpose designs.
The output clips. It flattens at whatever the amplifier can reach, which is short of the rail by an amount that depends on the part and the load, and the waveform is distorted. This calculator flags that case rather than reporting a voltage the circuit cannot produce.
For the inverting stage it is the input resistor Rin, because the inverting pin is held at a virtual earth. For the non-inverting stage the signal goes straight to the amplifier's own input, which is very high impedance, so it barely loads the source at all.
The MIT OpenCourseWare materials for 6.002 Circuits and Electronics cover the op-amp abstraction, the concept of feedback and the non-inverting amplifier in their later lectures, and work from the same two idealisations this calculator uses.
This tool is provided for educational and study use. It models an ideal amplifier with resistive feedback and does not account for offset voltage, bias current, noise, slew rate or the output-swing limits of any particular device, all of which must come from the data sheet. MIT OpenCourseWare 6.002 Circuits and Electronics readings covers the underlying theory.