Op-Amp Gain Calculator
Size the feedback network for a single op-amp stage in seconds. Enter the input resistor Rin and feedback resistor Rf, pick inverting or non-inverting, and read the closed-loop voltage gain and the gain in decibels. An inverting stage gives minus Rf over Rin, while a non-inverting stage gives 1 plus Rf over Rin, so the same resistors give different gains depending on topology.
How to use the op-amp gain calculator
- Choose the Configuration: Inverting or Non-inverting.
- Enter the Input resistor (Rin) value and pick its unit: ohm, k ohm or M ohm.
- Enter the Feedback resistor (Rf) value and its unit.
- Read the Voltage gain and the Gain in decibels below the formula line.
- Use the copy button to save the configuration, gain and dB value.
Examples
Inverting, Rin 1k and Rf 10k
Inverting, Rin = 1 k ohm, Rf = 10 k ohm
gain = -10, 20 dB
Non-inverting, same resistors
Non-inverting, Rin = 1 k ohm, Rf = 10 k ohm
gain = 11, 20.8279 dB
Inverting, Rin 2k and Rf 47k
Inverting, Rin = 2 k ohm, Rf = 47 k ohm
gain = -23.5, 27.4214 dB
Frequently asked questions
What is the inverting amplifier gain formula?
Gain equals minus the feedback resistor over the input resistor, gain = -Rf / Rin. With Rin = 1k and Rf = 10k the gain is -10, and the decibel figure uses the magnitude, so 20 dB.
What is the non-inverting amplifier gain formula?
Gain equals 1 plus the feedback resistor over the input resistor, gain = 1 + Rf / Rin. Because of the added 1, a non-inverting stage can never go below unity gain, and the minimum is exactly 1.
Why is the inverting gain negative?
The output swings opposite to the input, 180 degrees out of phase, so the gain carries a minus sign. The magnitude is still Rf over Rin, which is what sets the decibel value.
How is gain converted to decibels?
Gain in decibels is 20 times the base-10 logarithm of the gain magnitude, 20 * log10(|gain|). A gain of 10 is exactly 20 dB, a gain of 11 is about 20.83 dB, and a gain of 1 (unity) is 0 dB.
Can I mix resistor units like k ohm and M ohm?
Yes. Each resistor has its own unit selector, so you can enter Rin in k ohm and Rf in M ohm. The tool converts both to ohms before dividing, and only the ratio matters, not the absolute values.
Does this assume an ideal op-amp?
Yes. It uses the ideal closed-loop equations and ignores finite open-loop gain, gain-bandwidth product, slew rate and input offsets, which is accurate for most low-frequency, moderate-gain designs.
What if I need a gain below 1?
Use the inverting topology, where any Rf smaller than Rin gives a magnitude under 1 (attenuation). The non-inverting topology cannot attenuate because of the 1 plus Rf over Rin term.
Is anything sent to a server?
No. The math runs locally in your browser, so your resistor values are never uploaded or stored. The page keeps working offline once it has loaded.
What other tools pair with this one?
For the surrounding design, see the voltage divider calculator for reference and bias networks, the Ohm's law calculator for currents, and the RC time constant calculator for filter corners.
Learn more
- Inverting vs Non-Inverting Op-Amp Gain Explained
How Rin and Rf set closed-loop gain, why the two topologies differ by one, and how to read gain in decibels, with worked resistor examples.
Related tools
Voltage Divider Calculator
Calculate the output of a resistive voltage divider. Enter the input voltage and two resistors to get Vout, the current and the divider ratio instantly.
Ohm's Law Calculator
Solve Ohm's law online. Enter any two of voltage, current, resistance or power and get the other two, with the V, I, R and P formulas shown.
RC Time Constant Calculator
Find the RC time constant from resistance and capacitance, plus charge times and the cutoff frequency. Enter any two of R, C and tau to solve the third.
555 Timer Calculator
Calculate 555 timer astable frequency, period, high and low times and duty cycle from R1, R2 and the timing capacitor. Free oscillator design helper.
Absolute Humidity Calculator
Calculate absolute humidity in grams of water vapor per cubic meter from air temperature and relative humidity. Fast, free and works in your browser.
Allele Frequency Calculator
Find allele frequencies from genotype counts. Enter the number of AA, Aa and aa individuals to get the A and a allele frequencies and allele totals.