Op-Amp Gain Calculator

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free op-amp gain calculator. Find the voltage gain, gain in dB and output voltage of an inverting or non-inverting amplifier from two resistors.

Gain (dB)
0
Output voltage (V)
0

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the op-amp gain calculator

  1. Choose the amplifier type: inverting or non-inverting.
  2. Enter the feedback resistor, Rf, connected between the output and the inverting input. You can use prefixes: "100k" for 100 kilohms, "4.7k" for 4.7 kilohms, "1M" for 1 megohm.
  3. Enter the input resistor. For an inverting amplifier, this is Rin, between the input signal and the inverting input. For a non-inverting amplifier, it's Rg, between the inverting input and ground.
  4. Optionally enter an input voltage to see the expected output voltage.

The op-amp gain calculator shows the voltage gain, the gain in decibels, and the output voltage.

Inverting and non-inverting amplifiers

An operational amplifier, or op-amp, is a high-gain amplifier that's almost always used with negative feedback: part of the output is fed back to the inverting input. The resistors in the feedback network, rather than the op-amp itself, then set the gain, which makes it accurate and stable.

Inverting amplifier: the input signal goes to the inverting input through Rin. The output is inverted, so a positive input gives a negative output.

Gain = −Rf ÷ Rin

Non-inverting amplifier: the input signal goes to the non-inverting input, and Rg connects the inverting input to ground. The output is in phase with the input.

Gain = 1 + Rf ÷ Rg

How the op-amp gain calculator works

With the default figures, an inverting amplifier with Rf = 100 kΩ and Rin = 10 kΩ has a gain of −100 ÷ 10 = −10. An input of 0.2 volts gives an output of −2 volts.

The gain in decibels is:

Gain (dB) = 20 × log₁₀(|gain|)

A gain of 10, or −10, is 20 dB. The minus sign shows inversion, and doesn't change the size of the gain.

For a non-inverting amplifier with Rf = 90 kΩ and Rg = 10 kΩ, the gain is 1 + 90 ÷ 10 = 10, so 0.2 volts in gives 2 volts out.

A worked example: a microphone preamp

You want a non-inverting stage with a gain of about 11 to boost a small sensor signal, using standard resistor values.

  1. Choose Rf = 47 kΩ and Rg = 4.7 kΩ.
  2. Gain: 1 + 47 ÷ 4.7 = 11.
  3. In decibels: 20 × log₁₀(11) ≈ 20.8 dB.
  4. Output for 0.1 volts in: 1.1 volts.

Enter "47k", "4.7k" and 0.1 in the op-amp gain calculator, with the non-inverting type, to check.

Choosing between them

  • Input impedance: a non-inverting amplifier has a very high input impedance, so it hardly loads the signal source. An inverting amplifier's input impedance is roughly Rin, which can load a high-impedance source.
  • Minimum gain: a non-inverting amplifier's gain is always at least 1. An inverting amplifier can have a gain below 1, attenuating the signal while inverting it.
  • Phase: an inverting amplifier flips the signal; a non-inverting amplifier doesn't.
  • Summing: inverting amplifiers can easily add several signals, each through its own input resistor, which is the basis of audio mixers.

A special case of the non-inverting amplifier, with no Rg and the output connected directly to the inverting input, is a voltage follower or buffer, with a gain of exactly 1.

Limits of real op-amps

The gain formulas assume an ideal op-amp. Real ones have limits:

  • Output swing: the output can't exceed the supply voltages, and many op-amps can't swing all the way to the supply rails. If the gain multiplied by the input would exceed that, the output clips.
  • Gain-bandwidth product: an op-amp's gain falls at high frequencies. Its gain-bandwidth product, from the datasheet, divided by the closed-loop gain gives roughly the bandwidth available at that gain.
  • Slew rate: the maximum rate at which the output can change, which limits large, fast signals.
  • Offset voltage: a small error at the input, multiplied by the gain, can shift the output, especially in high-gain DC circuits.

Check the op-amp's datasheet for these figures, particularly at high gains or frequencies.

Choosing resistor values

The same gain can be set with many resistor pairs. Very low values draw more current and load the op-amp's output. Very high values, in the megohm range, increase noise and make the circuit more sensitive to stray capacitance and input bias currents. Values from about 1 kΩ to 100 kΩ are common in general-purpose circuits. Standard E12 or E24 resistor values may not give the exact gain you want; the op-amp gain calculator makes it quick to try combinations.

Who uses an op-amp gain calculator

Electronics engineers use it to design amplifiers, filters and signal conditioning. Students use it in electronics courses and labs. Audio hobbyists use it for preamps, mixers and effects pedals. Sensor and instrumentation designers use it to scale signals for analogue-to-digital converters, and repair technicians use it to check expected signal levels.

Need more customers from Google?

This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit is a Google Ads agency that does PPC and nothing else: we build the campaigns, block the searches that waste money, write the ads, set up conversion tracking and send you a short report every week. Request a free PPC audit and we will show you, in dollars, what we would fix first.

Single-supply circuits

Many op-amp circuits run from a single supply, such as 5 volts, rather than positive and negative supplies. Since the output can't go below ground, AC signals are usually biased to half the supply voltage, and an inverting amplifier's non-inverting input is connected to that mid-supply point rather than ground. The gain formulas stay the same, but the output then swings around the mid-supply voltage. Rail-to-rail op-amps let the output swing closer to the supply limits, which makes the most of a low-voltage supply.

Common mistakes

  • Forgetting the "1 +" in the non-inverting gain formula.
  • Expecting an output beyond the supply voltages, which clips.
  • Ignoring bandwidth at high gains and frequencies.
  • Mixing up Rin and Rf, which gives the reciprocal gain in an inverting amplifier.

Summing amplifiers

An inverting amplifier can add several signals together. Each input connects to the inverting input through its own resistor, and the output is the sum of each input multiplied by its own gain:

Vout = −Rf × (V1 ÷ R1 + V2 ÷ R2 + ...)

If all the input resistors equal Rf, the output is simply the negative sum of the inputs. Choosing different input resistors weights the inputs differently, which is how a simple audio mixer sets the level of each channel. You can use the op-amp gain calculator to find each input's gain by entering Rf and that input's resistor, then add the contributions.

Difference amplifiers

A difference amplifier, using four resistors, amplifies the difference between two inputs while rejecting signals common to both, such as noise picked up on a pair of wires. With matched resistor pairs, its gain is Rf ÷ Rin, the same magnitude as an inverting amplifier. Its ability to reject common signals depends on how closely the resistors match, so precision resistors or a dedicated instrumentation amplifier are often used in measurement circuits, where tiny sensor signals sit on top of larger common voltages.

Gain stages in decibels

Expressing gain in decibels makes it easy to combine stages: the total gain in dB is the sum of each stage's gain in dB. Two stages of 20 dB each give 40 dB, a voltage gain of 100. For very high gains, splitting the gain across two or more stages often works better than one stage, because each op-amp then needs less bandwidth and its offset errors are smaller. The op-amp gain calculator's decibel figure makes planning multi-stage gain simple.

Adding filtering

Placing a small capacitor in parallel with the feedback resistor turns a simple amplifier into a low-pass filter, reducing gain at high frequencies. The cut-off frequency is about 1 ÷ (2π × Rf × C). This is often used to limit noise and prevent oscillation. A capacitor in series with Rin or Rg can block DC, so the circuit amplifies only AC signals. Our reactance calculator shows how a capacitor's reactance changes with frequency, which explains how these filters work.

Stability

Op-amps are designed to be stable at the gains they're intended for, but some are only stable above a minimum gain, noted in the datasheet as "decompensated". Driving capacitive loads, such as long cables, can also cause ringing or oscillation. A small resistor in series with the output, or following the datasheet's guidance on capacitive loads, usually solves this. Good layout, with short connections and decoupling capacitors close to the supply pins, helps keep any op-amp circuit stable.

Sources and further reading

Frequently asked questions

What is the gain of an inverting amplifier?

−Rf ÷ Rin. With 100 kΩ and 10 kΩ, the gain is −10.

What is the gain of a non-inverting amplifier?

1 + Rf ÷ Rg. With 90 kΩ and 10 kΩ, the gain is 10.

How do I convert gain to decibels?

20 × log₁₀ of the gain's magnitude. A gain of 10 is 20 dB.

Why is the inverting gain negative?

The output is inverted, 180 degrees out of phase with the input.

Can the output exceed the supply voltage?

No. It clips at or near the supply rails.

Is the op-amp gain calculator free?

Yes. It's free, needs no sign-up, and works in your browser.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep