MakerKiln

Op-Amp Gain Calculator

The gain of an inverting or non-inverting amplifier from its two resistors, in volts per volt and decibels.

Local onlyThe math runs in JavaScript in this tab. Your figures are remembered in this browser's local storage, and nothing is uploaded.

An op-amp amplifies by whatever its two resistors tell it to, and the gain comes from their ratio. This gives you the gain of an inverting or non-inverting amplifier from the feedback and gain resistors, in plain volts-per-volt and in decibels, and the output voltage for an input you enter, so you can size the parts for the amplification you need.

The ratio sets the gain

In both configurations the gain is a function of the two resistors, Rf and Rg. A non-inverting amp gives one plus Rf over Rg, so its gain is always at least one and it keeps the signal's polarity. An inverting amp gives minus Rf over Rg, which flips the signal upside down and can be any value, including less than one to attenuate. Because it is a ratio, the exact resistor values do not set the gain, only their proportion, which gives you freedom to pick convenient parts.

Non-inverting versus inverting

Choose non-inverting when you want the output to follow the input's polarity and a high input impedance, which it naturally has. Choose inverting when a flipped signal is fine or wanted, or when you need gain below one, or to sum several inputs. The inverting input sits at a virtual ground, which makes it handy for mixing. They behave differently at the edges, so pick the one that fits the job, not just the one whose formula you remember.

Picking the actual values

Since only the ratio matters, use it to choose sensible resistors. Too large and the circuit picks up noise and the op-amp's tiny input currents cause offset; too small and the output has to push a lot of current into the feedback network. A common comfortable range is a few kilohms to a few hundred kilohms. Use 1 percent resistors if the gain has to be accurate, because the gain is only as precise as the two parts that set it.

Gain is not free forever

This gives the ideal, textbook gain, and a real op-amp holds it only up to a point. Every op-amp has a gain-bandwidth product, so the more gain you ask for, the lower the frequency where it starts to fall off. It also has output swing limits, a slew rate, and offsets. For audio and slow signals the ideal gain is what you get; for high frequency or high gain, check the part's gain-bandwidth so the amplifier still delivers at the frequencies you care about.

More MakerKiln tools

Put this calculator on your site

Free to embed, and welcome. It runs the same way, in your visitor's browser, and it sizes itself to fit. Paste this where you want it, and it stays current on its own:

<iframe src="https://makerkiln.com/op-amp-gain-calculator/embed/" title="Op-Amp Gain Calculator" loading="lazy" style="width:100%;max-width:560px;height:560px;border:1px solid #d9dee8;border-radius:14px"></iframe>
<p style="font:13px/1.4 system-ui,sans-serif;margin:6px 2px">Free calculator by <a href="https://makerkiln.com/op-amp-gain-calculator/" target="_blank" rel="noopener">MakerKiln</a></p>
<script>window.addEventListener("message",function(e){if(e.data&&e.data.mk==="h"&&e.data.slug==="op-amp-gain-calculator"){var f=document.querySelector('iframe[src="https://makerkiln.com/op-amp-gain-calculator/embed/"]');if(f){f.style.height=e.data.h+"px"}}});</script>
Download the file

Prefer to host it yourself, offline or on an intranet? Download the file above. Keep the MakerKiln credit and it is free to use.