Op-Amp Gain Calculator

Gain, noise gain, bandwidth, output swing, DC offset, noise and resistor-tolerance effects of inverting, non-inverting, difference and summing op-amp stages, with standard-value resistor pairs for a target gain.

Method, formulas and references

Signal gain and noise gain

Rg is the resistance from the inverting input to the signal sources (R1, or R1 ∥ R2 ∥ R3 for the summer) and Rf the feedback resistor. The signal gain is −Rf/R1 for the inverting stage and 1 + Rf/R1 for the non-inverting stage; the noise gain, the gain seen by a voltage in series with an op amp input, is the same for both:

(1)NG = 1 + Rf / Rg

The difference amplifier (MT-068 figure 1) gives Vout = V2 · R2′/(R1′ + R2′) · NG − V1 · R2/R1 + Vref · R1′/(R1′ + R2′) · NG with NG = 1 + R2/R1. Writing V1 = Vcm − Vd/2 and V2 = Vcm + Vd/2 splits this into the differential gain (a1 + a2)/2 and the common-mode gain a2 − a1, where a1 = R2/R1 and a2 = R2′/(R1′ + R2′) · NG. Vref is the voltage at the grounded end of the network: the + input of the inverting stages (output term NG · Vref), the foot of R1 of the non-inverting stage (−Rf/R1 · Vref) and the REF terminal of the difference amplifier.

Finite open-loop gain and bandwidth

With an open-loop gain AOL the loop gain is AOL/NG for every topology, and the closed-loop gain is the ideal gain divided by 1 + NG/AOL (MT-033 eq. 1; SLOD006B eq. 6-18 for the inverting stage):

(2)G = Gideal / (1 + NG / AOL)

For a single-pole op amp, AOL(f) = AOL / (1 + j f/fp) with fp = GBW / AOL. The closed loop then has one pole; its −3 dB frequency is GBW/NG + GBW/AOL, which is the MT-033 estimate GBW/NG when AOL ≫ NG. Real op amps have further poles, so treat the bandwidth as an estimate and check stability at low noise gain for decompensated parts. The full-power bandwidth for an output of peak amplitude Vpk is SR/(2π Vpk), the TI rule SR = π · Vpp · f solved for f. Vpk is taken as half the span of the ideal output range.

Output and input range

The output range is the ideal output over the entered input range (the output is linear in each input, so the end points are enough). It is compared with V− + headroom … V+ − headroom. The op amp input voltage is Vref for the inverting stages, the input voltage for the non-inverting stage and (V2 R2′ + Vref R1′)/(R1′ + R2′) for the difference amplifier; it is compared with the common-mode input range. Take both headroom figures from the datasheet at your supply voltage and load.

DC offset

Vos appears at the output multiplied by NG (MT-037). The bias currents give IB− · Rf − NG · R+ · IB+, where R+ is the DC resistance at the + input. With IB± = IB ± Ios/2 the worst case is

(3)|Vout| ≤ NG |Vos| + IB |Rf − NG R+| + (Ios/2)(Rf + NG R+)

With R+ = Rg ∥ Rf the IB term vanishes and the bias error is Rf · Ios (MT-038 figure 3); the tool can add that resistor, rounded to the selected series. The difference amplifier has this balance when R1′ ∥ R2′ = R1 ∥ R2. Compensation does not help op amps with internally bias-compensated or rail-to-rail inputs, whose two bias currents are not matched (MT-038).

Noise

The six white-noise sources of MT-049 are referred to the output: en, the current noise in R+ and the Johnson noise √(4kTR+) times NG; the current noise at the − input times Rf; the Johnson noise of Rg times Rf/Rg; and the Johnson noise of Rf directly. They are uncorrelated and add as a root sum of squares. The rms value uses the equivalent noise bandwidth 1.57 × f−3dB of the closed loop (MT-048), unless a noise bandwidth is entered. Referred-to-input noise follows MT-049 (divide by NG); dividing by the signal gain gives the noise relative to the signal source instead. k = 1.380649 × 10⁻²³ J/K. Peak-to-peak is estimated as 6.6 × rms, the usual figure for Gaussian noise.

Resistor tolerance and CMRR

The gain range evaluates every combination of resistors at nominal × (1 ± tolerance). For the difference amplifier all 16 corners are evaluated and the lowest |Ad/Acm| is the worst-case CMRR. MT-068 eq. 1 gives the first-order result for four discrete resistors of tolerance Kr, which the corner calculation reproduces for small Kr:

(4)CMR = 20 log₁₀((1 + R2/R1) / (4 Kr))

Four unselected 1 % resistors at unity gain give about 34 dB. The op amp's own CMRR, assumed much higher, is not included.

Standard-value pairs

Design mode searches the selected E series for Rin with Rin + Rf within a factor of √10 of the entered total, takes the two series values either side of the exact Rf, and ranks the pairs by gain error from the nominal values. For the difference amplifier the same pair is used for R1 = R1′ and R2 = R2′.

References

  1. ADI MT-033, Voltage Feedback Op Amp Gain and Bandwidth (Rev. 0, 10/08)
    Signal gain, noise gain (eq. 2–4), closed-loop gain with finite AVOL (eq. 1), gain-bandwidth product and closed-loop bandwidth (figure 5).
  2. TI SLOD006B, Op Amps for Everyone, chapter 6
    Inverting and non-inverting transfer functions with finite op amp gain a (eq. 6-11, 6-18) and their common loop gain (eq. 6-15, 6-19).
  3. ADI MT-037, Op Amp Input Offset Voltage (Rev. 0, 10/08)
    Vos modelled in series with an input and amplified by the noise gain.
  4. ADI MT-038, Op Amp Input Bias Current (Rev. 0, 10/08)
    IB+, IB−, Ios = IB+ − IB−; compensation resistor R3 = R1 ∥ R2 leaves VO = R2 · Ios (figure 3); not useful with bias-compensated inputs.
  5. ADI MT-048, Op Amp Noise Relationships: 1/f Noise, RMS Noise, and Equivalent Noise Bandwidth (Rev. 0, 10/08)
    Equivalent noise bandwidth of a single pole, 1.57 fc (figure 4).
  6. ADI MT-049, Op Amp Total Output Noise Calculations for Single-Pole System (Rev. 0, 10/08)
    Six noise sources, their gains to the output (figure 2) and the RTI expression with BW = 1.57 fCL (figure 1).
  7. ADI MT-068, Difference and Current Sense Amplifiers (Rev. 0, 10/08)
    Four-resistor difference amplifier (figure 1) and worst-case CMR with resistor tolerance (eq. 1, 2).
  8. TI SLOA088, Active Filter Design Techniques (Op Amps for Everyone, chapter 16), section 16.8.4
    Slew rate for full-power output, SR = π · Vpp · f.

Related electronics tools