Boneyard Tools

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

  1. Choose the Configuration: Inverting or Non-inverting.
  2. Enter the Input resistor (Rin) value and pick its unit: ohm, k ohm or M ohm.
  3. Enter the Feedback resistor (Rf) value and its unit.
  4. Read the Voltage gain and the Gain in decibels below the formula line.
  5. 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

Related tools