Op-Amp Gain Calculator
Compute ideal inverting or non-inverting op-amp gain from the input resistor and the feedback resistor.
🔒 Processed entirely in your browser — nothing you enter here is ever uploaded.
The result appears on this page after you run the tool. Nothing you enter is uploaded.
Result
About this tool
Two resistors set the gain, and the mode menu picks the topology. Non-inverting is the default. Its gain is 1 + Rf/Rin, the classic non-inverting divider where the feedback resistor sits from output to the inverting input and the input resistor sits from there to ground. Inverting mode uses gain −Rf/Rin. Both resistors are multiplied by the unit next to them: ohms, kilohms, or megohms. If either resistor is not strictly positive, the report stops. The input voltage is optional. It is read with no unit menu, in volts. When that box parses as a finite number, including zero and negatives, the output voltage is the input times the gain. A blank box does not parse as a finite number, so the output line is omitted.
The form opens in non-inverting mode with an input of 1 V, an input resistor of 10 with the unit menu on kilohms, and a feedback resistor of 100 with the unit menu on kilohms. That is 10 kΩ and 100 kΩ, a ratio of 10. Non-inverting gain is 1 + 100/10 = 11. The decibel line is 20 × log10(11) = 20.83 dB, because toFixed(2) rounds 20.827 to 20.83. The 1 V input then prints an output of 11 V. The same resistors in inverting mode give gain −10. The absolute value is 10, so the decibel line is 20.00 dB, and the same 1 V input prints an output of −10 V. The sign is the electrical inversion. The decibel figure always uses the absolute gain, so a gain of −10 is not reported as a negative decibel number.
These are ideal closed-loop ratios. The formula does not know the op-amp's open-loop gain, its gain-bandwidth product, its input offset, or the supply rails. A gain of 11 with a 1 volt input will cheerfully print 11 volts even if the real part is running from ±5 volt rails and would clip. There is no slew-rate term and no noise-gain term beyond the resistor ratio. A non-inverting gain cannot fall below 1 with positive resistors, because of the leading 1. An inverting gain is always negative for positive resistors. You cannot get a gain between 0 and 1 from the non-inverting formula on this page. The gain ratio is printed with the shared number formatter, and the decibel line always has two digits after the decimal. Output voltage uses the engineering formatter, so 0.005 volts would print as millivolts. Resistor prefixes matter: a feedback box of 10 with kilohms selected is 10000 ohms, and the same 10 with ohms selected is 10 ohms. Leave the input voltage empty if you only want the ratio. Filling it with 0 prints an output of 0 V, because zero is a finite number and is multiplied through.
Example. The form opens non-inverting, with Rin 10 kΩ, Rf 100 kΩ, and 1 V in. That reports gain 11x, 20.83 dB, and output 11 V. Inverting mode with those same defaults reports gain -10x, 20.00 dB, and output -10 V.
Limit. The gain is the ideal resistor ratio. Open-loop gain, bandwidth, offset, and the supply rails are not applied. Both resistor unit menus open on kilohms. Both resistors must be strictly positive.
What do the default 10 kΩ and 100 kΩ give?
The input box shows 10 and the feedback box shows 100, both with kilohms selected, and the input voltage shows 1. Non-inverting gain is 1 + 100/10 = 11, and 20×log10(11) prints as 20.83 dB. The output line is 11 V. Switch the mode to inverting and the gain is −10, the decibel line is 20.00 dB, and the same 1 V prints −10 V.
Why is the decibel number positive for an inverting stage?
The decibel line is 20 times log10 of the absolute value of the gain. A gain of −10 has absolute value 10, so the line reads 20.00 dB. The minus sign stays on the gain ratio and on the output voltage.
Will this tell me if the op-amp clips?
No. The output is input times the ideal gain, with no rail check. A requested 11 V from a part supplied at 5 V is still printed as 11 V. Bandwidth and slew rate are not in the formula either.
Can the non-inverting gain be less than 1?
Not with the formula on this page. Non-inverting gain is 1 + Rf/Rin, and both resistors have to be positive, so the result is always greater than 1. Inverting gain is −Rf/Rin, so its magnitude can be below 1 if Rf is smaller than Rin, and the sign stays negative.