Op-Amp Gain Calculator
- Non-inverting gain = 1 + Rf / Rin = 10 with Rf = 90 kohms and Rin = 10 kohms - the resistor ratio alone sets the gain.
- In decibels that is 20 x log10(10.000) = 20.00 dB, the figure datasheets and Bode plots use.
- Ideal output = gain x input = 10 x 0.5 = 5.00 V.
- Against +/-15 V rails the output keeps 10.00 V of headroom, comfortably clear of clipping.
This op amp gain calculator turns two resistor values into the voltage gain of a standard op-amp circuit, reported both as a multiplier and in decibels. Enter Rf and Rin and it applies the non-inverting gain of 1 + Rf / Rin or the inverting gain of -Rf / Rin, depending on the configuration you pick. For example, 90 kohms over 10 kohms in the non-inverting setup gives a gain of 10 x (20.00 dB), turning 0.5 V in into 5.00 V out. In the inverting setup, 47 kohms over 4.7 kohms gives -10 x, turning 0.2 V into -2.00 V, where the minus sign is a 180-degree phase flip. Decibel gain is 20 x log10 of the voltage gain, so 10 x is 20.00 dB and 23 x is 27.23 dB. The calculator also shows rail clipping: a gain of 23 on 1 V asks for 23.00 V, but +/-12 V rails flatten the output at 12.00 V.
This is the accepted standard for the calculation because only the resistor ratio sets the ideal gain; the op-amp's own huge open-loop gain is spent on accuracy, not on the number. That is why the resistor-ratio formulas hold across a wide range of parts and are the ones used in design work. This page shows the formula, the step-by-step workings, worked examples and sources, so you can check every result by hand and see where each number comes from.
Worked examples
Non-inverting x10, 0.5 V in
Output voltage = 5.00 V. Voltage gain: 10 x; Gain: 20.00 dB; Ideal (unclipped) output: 5.00 V. (Non-inverting · 90000 ohm · 10000 ohm · 0.5 V · 15 V)
| Output voltage | 5.00 V |
| Voltage gain | 10 x |
| Gain | 20.00 dB |
| Ideal (unclipped) output | 5.00 V |
Inverting x-10, 0.2 V in
Output voltage = -2.00 V. Voltage gain: -10 x; Gain: 20.00 dB; Ideal (unclipped) output: -2.00 V. (Inverting · 47000 ohm · 4700 ohm · 0.2 V · 15 V)
| Output voltage | -2.00 V |
| Voltage gain | -10 x |
| Gain | 20.00 dB |
| Ideal (unclipped) output | -2.00 V |
Non-inverting x23 into 12 V rails (clips)
Output voltage = 12.00 V. Voltage gain: 23 x; Gain: 27.23 dB; Ideal (unclipped) output: 23.00 V. (Non-inverting · 220000 ohm · 10000 ohm · 1 V · 12 V)
| Output voltage | 12.00 V |
| Voltage gain | 23 x |
| Gain | 27.23 dB |
| Ideal (unclipped) output | 23.00 V |
The two classic configurations
An op amp gain calculator deals with two circuits that look similar on a schematic but behave very differently at the output. In the non-inverting configuration, the input signal feeds the positive terminal and the feedback network sets the gain as 1 + Rf / Rin. In the inverting configuration, the input signal enters through Rin to the negative terminal, and the gain is -Rf / Rin. The formulas differ by that leading 1, and the minus sign matters as much as the numbers do.
The non-inverting case is the friendlier one: its gain never drops below 1, and the output stays in phase with the input. Pick Rf = 90 kohms and Rin = 10 kohms and the ratio is 9, so 1 + 9 gives a gain of 10 x, which is 20.00 dB. Feed that stage 0.5 V and the output is 5.00 V, same polarity, just larger. This is why non-inverting stages are common as input buffers and preamplifiers: they load the source lightly and ask nothing of the signal except that it fit inside the rails.
The inverting case flips the sign. With Rf = 47 kohms and Rin = 4.7 kohms, the ratio is 10, so the gain is -10 x. An input of 0.2 V comes out as -2.00 V. The magnitude is the same 10 x, and the decibel figure is the same 20.00 dB, because decibels measure magnitude; the minus sign is a 180-degree phase flip, not a loss. In audio and control loops that inversion is often harmless or even useful, but in a single-supply circuit it can push a signal toward the wrong rail, so check the polarity before you commit.
Decibels compress both cases onto one scale. Gain in dB is 20 x log10 of the voltage gain, so 10 x is 20.00 dB and 23 x is 27.23 dB. That second number is worth keeping in mind when you size resistors, because the rails, not the resistors, decide what actually comes out. A gain of 23 on a 1 V input asks for 23.00 V, but +/-12 V rails flatten the output at 12.00 V. The circuit is not broken; it is simply out of headroom, and no resistor change will fix it without more supply voltage or less gain.
One point keeps the arithmetic honest: only the resistor ratio sets the ideal gain. The op amp's own huge open-loop gain is spent on accuracy, not on the number. That is why a 90 kohm and 10 kohm pair gives 10 x in the ideal case regardless of which op amp you drop in, and why the calculator's job is to get the ratio right before you worry about bandwidth, tolerance, or loading.
- Non-inverting: gain = 1 + Rf / Rin; 90 kohms over 10 kohms gives 10 x (20.00 dB), 0.5 V in to 5.00 V out.
- Inverting: gain = -Rf / Rin; 47 kohms over 4.7 kohms gives -10 x, 0.2 V in to -2.00 V, with the minus sign a 180-degree phase flip.
- Decibels: 20 x log10 of the voltage gain; 10 x is 20.00 dB and 23 x is 27.23 dB.
- Rails clip ambition: a gain of 23 on 1 V asks for 23.00 V, but +/-12 V rails flatten the output at 12.00 V.
Gain in decibels
Decibels are the language datasheets and bench notes use for gain, and the conversion is simple: gain in decibels is 20 x log10 of the voltage gain. A gain of 10 x becomes 20.00 dB, and a gain of 23 x becomes 27.23 dB. Once you have the number from an op amp gain calculator, this step lets you compare it directly against the figures printed in a datasheet or measured on a signal generator.
Why bother with the logarithm? Because dB compresses a wide range of gains into friendly numbers, and because cascaded stages add in dB where they would otherwise multiply. The shortcut worth memorizing is 6 dB per doubling. Each time the gain doubles, you add about 6 dB, so 2 x is near 6 dB, 4 x near 12 dB, 8 x near 18 dB, and 16 x near 24 dB. That gets you close enough to sanity-check a result before you trust it.
The dB figure follows the resistor ratio, not the op-amp. Non-inverting gain is 1 + Rf / Rin, so 90 kohms over 10 kohms gives a gain of 10 x, or 20.00 dB, turning 0.5 V in into 5.00 V out. Inverting gain is -Rf / Rin, so 47 kohms over 4.7 kohms gives -10 x, turning 0.2 V into -2.00 V; the minus sign is a 180-degree phase flip, and the magnitude still reads 20.00 dB. Only the resistor ratio sets the ideal gain. The op-amp's own huge open-loop gain is spent on accuracy, not on the number.
Decibels also make clear how far you can push a circuit before the supply complains. Rails clip ambition: a gain of 23 on 1 V asks for 23.00 V, but +/-12 V rails flatten the output at 12.00 V. The math says 27.23 dB, yet the waveform tells a different story. Check the dB gain against the rails before you trust a clean sine wave on the bench.
Clipping and headroom
Every gain you set with an op amp gain calculator describes what the circuit will do as long as the output stays inside the limits the amplifier can actually reach. Those limits are set by the supply rails and, more tightly, by how close the output stage can swing toward them. Push the gain high enough and the output stops following the input; it flattens against a ceiling and the signal is clipped.
The rail limit is easy to state and just as easy to ignore. With a gain of 23 on a 1 V input, the math asks for 23.00 V at the output. Feed that stage from +/-12 V rails and it cannot deliver: the output flattens at 12.00 V. Everything above that is simply missing, and a sine wave comes out with its peaks sliced off. The gain itself has not changed — 23 x is still 27.23 dB on paper — but the waveform no longer carries the information the calculation promised. For contrast, a gain of 10 x (20.00 dB) turns 0.5 V in into 5.00 V out, which sits comfortably inside the same +/-12 V rails.
Real parts make the ceiling lower than the supply voltage suggests. An op amp's output stage needs some voltage between its output and each rail to keep working, commonly called headroom, so the largest clean swing is always somewhat less than the rail voltage. If your design needs the full swing, check the datasheet's output swing specification at your load and supply, and leave margin below the rails rather than designing right up to them. The same caution applies at the other end of the range and to the input side, where the input signal must also stay within the range the part accepts.
Clipping also shows up in the numbers a calculator reports. Gain in decibels is 20 x log10 of the voltage gain, so 10 x is 20.00 dB and 23 x is 27.23 dB — but neither figure tells you whether 23.00 V can exist at the output. Only the resistor ratio sets the ideal gain; the op-amp's own huge open-loop gain is spent on accuracy, not on the number. That is why the ratio can be perfectly correct while the output is clipped: the resistors did their job, and the supply did not.
A quick check before you build: multiply your expected input amplitude by the gain, compare the result with the rail voltage minus the headroom your part needs, and lower the gain or raise the supply if the answer does not fit. When the result does fit, the op amp gain calculator's figure is the one you will measure.
Choosing resistor values
When you use an op amp gain calculator, the number it gives you depends on one thing only: the ratio of the feedback resistor to the input resistor. Only the resistor ratio sets the ideal gain - the op-amp's own huge open-loop gain is spent on accuracy, not on the number. That means you can scale both resistors up or down together and keep the same gain. What changes is everything else: noise, loading, current draw, and how much the input bias current starts to matter.
The two standard decades show why this is convenient. For a non-inverting stage, gain is 1 + Rf / Rin, so 90 kohms over 10 kohms gives a gain of 10 x (20.00 dB), turning 0.5 V in into 5.00 V out. For an inverting stage, gain is -Rf / Rin, so 47 kohms over 4.7 kohms gives -10 x, turning 0.2 V into -2.00 V - the minus sign is a 180-degree phase flip. Both pairs are the same 10-to-1 ratio in sensible decades, so they are easy to buy, easy to match, and easy to read on a schematic. If you want a different gain, the decibel form is handy: gain in decibels is 20 x log10 of the voltage gain, so 10 x is 20.00 dB and 23 x is 27.23 dB.
Absolute values are where the trade-offs live. Smaller resistors draw more current from the source and load the previous stage harder, but they resist noise and stray capacitance better. Larger resistors are gentler on the source and draw less current, but they add thermal noise and become sensitive to the op-amp's input bias current. That last effect is why megohm designs deserve caution: bias current flowing through a megohm-scale feedback network produces an offset voltage that can swamp a small signal, so very high resistance values are a poor default unless the op-amp is chosen for low bias current.
It also pays to check the output against the supply rails before you commit. Rails clip ambition: a gain of 23 on 1 V asks for 23.00 V, but +/-12 V rails flatten the output at 12.00 V. A resistor pair that promises the gain you want can still deliver a clipped waveform if the rails cannot supply the swing. Pick the ratio for the gain, then pick the absolute values for the noise, loading and current your circuit can tolerate, and confirm the result fits inside the rails.
FAQs
What is the gain of a non-inverting amp with Rf 90k and Rin 10k?
For a non-inverting amplifier, the gain is 1 plus the feedback resistor divided by the input resistor. With Rf at 90k and Rin at 10k, that is 1 + 90 / 10 = 10 x. In decibels, that same gain equals 20.00 dB, so the output is ten times the input voltage.
What does an inverting amp do to the signal?
An inverting amplifier both amplifies the signal and flips its phase, so a positive input becomes a negative output. With a gain of -10 x, an input of 0.2 V produces an output of -2.00 V. The magnitude of the gain sets the size of the output; the minus sign sets the inversion.
How do I convert voltage gain to dB?
Use the formula dB = 20 x log10(gain), where gain is the voltage gain as a plain ratio. A gain of x10 becomes 20.00 dB, and a gain of x23 becomes 27.23 dB. This conversion applies to voltage gain, not power gain, so the multiplier in the formula is 20.
Why is my output stuck at 12.00 V?
The op-amp is clipping. If the ideal output would be 23.00 V but the supply rails are only +/-12 V, the amplifier cannot produce more than the rail voltage. The waveform flattens at the rail instead of following the input, so the output sits at 12.00 V and the signal is distorted.
Do the resistor values matter, or just the ratio?
The ratio of the feedback resistor to the input resistor sets the gain, so that ratio is what determines amplification. The absolute resistor values still matter: they set noise, loading and bias-current errors. Two pairs of resistors with the same ratio give the same gain but can behave differently in a real circuit.
What input gives 5.00 V out at a gain of 10?
Divide the output by the gain: 5.00 V divided by 10 equals 0.5 V. This is the same relationship used in the non-inverting example, where the output equals the input multiplied by the gain. So an input of 0.5 V produces 5.00 V out at a gain of 10.