TExcelTAD
Home › Analog Electronics: Diodes, Transistors & Op-Amps › Real Op-Amps: Offset, Bias Currents, CMRR and Rail-to-Rail

Real Op-Amps: Offset, Bias Currents, CMRR and Rail-to-Rail

A type K thermocouple produces about 41 μV41\ \mu\text{V} per degree. Amplify it by 101 with a general-purpose op-amp, short the input, and the output reads 200 mV200\ \text{mV}: the amplifier claims a temperature of almost 50 ∘C50\ ^\circ\text{C} with nothing connected. The ideal model of The Ideal Op-Amp has no way to explain that. Real op-amps have a small offset voltage, draw small bias currents, pass a little of the common-mode and supply voltages, and cannot take their inputs or outputs all the way to the rails. Each effect is one entry in a datasheet table and one source in a model. This lesson turns those entries into an error budget, and covers the single-supply and rail-to-rail tricks that modern low-voltage designs depend on. The dynamic limits (bandwidth, slew rate) are in Gain-Bandwidth and Slew Rate.

+ - ideal vin Rp 990 Ohm ip - + Vos 2 mV IB+ 105 nA IB- 95 nA R1 1 kOhm Rf 100 kOhm out

The DC error model

Draw an ideal op-amp and put the errors outside it:

Error Symbol What it is General-purpose bipolar Precision / zero-drift CMOS
Input offset voltage VOSV_{OS} the input difference that gives 0 V0\ \text{V} out 0.50.5 to 5 mV5\ \text{mV} 11 to 25 μV25\ \mu\text{V}
Offset drift ΔVOS/ΔT\Delta V_{OS}/\Delta T change with temperature 22 to 20 μV/K20\ \mu\text{V/K} 0.0050.005 to 0.1 μV/K0.1\ \mu\text{V/K}
Input bias current IBI_B average current into the inputs 1010 to 500 nA500\ \text{nA} 11 to 200 pA200\ \text{pA}
Input offset current IOSI_{OS} ∣IB+−IB−∣\lvert I_{B+} - I_{B-} \rvert about IB/10I_B/10 similar to IBI_B
Common-mode rejection CMRR ΔVcm\Delta V_{cm} / input-referred change 7070 to 100 dB100\ \text{dB} 110110 to 140 dB140\ \text{dB}
Power-supply rejection PSRR ΔVS\Delta V_S / input-referred change 7070 to 100 dB100\ \text{dB} 110110 to 140 dB140\ \text{dB}

The ranges are typical of each class as of 2026, not of any one part: always read your part's datasheet, and use its maximum values for a worst-case design. CMOS bias currents are leakage of the input protection diodes and double about every 10 ∘C10\ ^\circ\text{C}.

For the non-inverting amplifier of the figure (and the inverting one, which has the same noise gain), superposition of the error sources gives the output error

Vout,err=VOS(1+RfR1)+IB−Rf−IB+Rp(1+RfR1)V_\text{out,err} = V_{OS}\left(1 + \frac{R_f}{R_1}\right) + I_{B-} R_f - I_{B+} R_p \left(1 + \frac{R_f}{R_1}\right)

The offset voltage is amplified by the noise gain 1+Rf/R11 + R_f/R_1, not the signal gain. The two bias-current terms cancel when Rp=R1∥RfR_p = R_1 \parallel R_f, the bias-current compensation resistor: both inputs then see the same resistance, and only the offset current remains, IOSRfI_{OS} R_f. With CMOS inputs at picoamperes this resistor is pointless (and only adds noise); with bipolar inputs it can matter.

CMRR and PSRR are easiest to use as input-referred errors: a common-mode change ΔVcm\Delta V_{cm} acts like an offset of ΔVcm/CMRR\Delta V_{cm}/\text{CMRR}, a supply change ΔVS\Delta V_S like ΔVS/PSRR\Delta V_S/\text{PSRR} (both as plain ratios, 10dB/2010^{\text{dB}/20}). In a non-inverting amplifier the input common mode is the signal, so a finite CMRR becomes a small gain error; in an inverting amplifier the inputs sit at ground and CMRR hardly matters. Both ratios fall with frequency, typically 20 dB/decade20\ \text{dB/decade} above a few tens of hertz, which is why supply ripple at 100 kHz100\ \text{kHz} from a switching regulator gets through far more easily than DC changes.

Input and output range, rail-to-rail

The input stage of a classic op-amp (The Differential Pair) needs a volt or two of headroom: the datasheet's input common-mode range might be VEE+2 VV_{EE} + 2\ \text{V} to VCC−1.5 VV_{CC} - 1.5\ \text{V}. Outside it the gain collapses, and some older parts even invert their output ("phase reversal"). The output stage likewise saturates a volt or so from each rail.

  • Rail-to-rail input op-amps use two complementary input pairs, one working near each rail. Where the two hand over (typically 11 to 1.5 V1.5\ \text{V} below the positive rail) the offset jumps by tens to hundreds of microvolts, a source of distortion; some parts avoid it with an internal charge pump.
  • Rail-to-rail output op-amps use common-source (or common-emitter) output transistors that can pull to within millivolts of a rail at light load; the datasheet gives the headroom against load current, e.g. 10 mV10\ \text{mV} at 100 μA100\ \mu\text{A} but 200 mV200\ \text{mV} at 10 mA10\ \text{mA}.

On a single 3.3 V3.3\ \text{V} or 5 V5\ \text{V} supply, neither is a luxury.

Single-supply design

With only 00 and VCCV_{CC}, an AC signal must be centred somewhere between them. The usual answer is a mid-supply reference: a divider of two equal resistors, decoupled by a capacitor and buffered by a follower, gives VCC/2V_{CC}/2. Input signals are AC-coupled and biased to that reference, the amplifier's "ground" resistor (R1R_1) returns to it, and the output swings around it. For DC-coupled sensors, choose a rail-to-rail op-amp and make sure the signal's minimum is above the output's lower headroom, or shift it with a reference as in Instrumentation Amplifiers.

Worked example: a thermocouple amplifier

Given: non-inverting gain 101101 (R1=1 kΩR_1 = 1\ \text{k}\Omega, Rf=100 kΩR_f = 100\ \text{k}\Omega), a general-purpose bipolar op-amp with VOS=2 mVV_{OS} = 2\ \text{mV}, IB+=105 nAI_{B+} = 105\ \text{nA}, IB−=95 nAI_{B-} = 95\ \text{nA} (IB=100 nAI_B = 100\ \text{nA}, IOS=10 nAI_{OS} = 10\ \text{nA}), drift 10 μV/K10\ \mu\text{V/K}; thermocouple 41 μV/K41\ \mu\text{V/K} with negligible resistance.

Find: the output error at 25 ∘C25\ ^\circ\text{C} without and with RpR_p, and the drift over 25±25 ∘C25 \pm 25\ ^\circ\text{C}, in degrees.

Solve:

Rp=R1∥Rf=1⋅100101 kΩ=990 ΩVerr(Rp≈0)=2 mV⋅101+95 nA⋅100 kΩ=202+9.5=211.5 mVVerr(Rp=990 Ω)=202+9.5−105 nA⋅990 Ω⋅101=202+9.5−10.5=201.0 mVinput-referred=201 mV101=1.99 mV  ⇒  1.99 mV41 μV/K=48.5 Kdrift=10 μV/K⋅25 K=250 μV  ⇒  6.1 K\begin{aligned} R_p &= R_1 \parallel R_f = \frac{1 \cdot 100}{101}\ \text{k}\Omega = 990\ \Omega \\ V_\text{err} (R_p \approx 0) &= 2\ \text{mV} \cdot 101 + 95\ \text{nA} \cdot 100\ \text{k}\Omega = 202 + 9.5 = 211.5\ \text{mV} \\ V_\text{err} (R_p = 990\ \Omega) &= 202 + 9.5 - 105\ \text{nA} \cdot 990\ \Omega \cdot 101 = 202 + 9.5 - 10.5 = 201.0\ \text{mV} \\ \text{input-referred} &= \frac{201\ \text{mV}}{101} = 1.99\ \text{mV} \;\Rightarrow\; \frac{1.99\ \text{mV}}{41\ \mu\text{V/K}} = 48.5\ \text{K} \\ \text{drift} &= 10\ \mu\text{V/K} \cdot 25\ \text{K} = 250\ \mu\text{V} \;\Rightarrow\; 6.1\ \text{K} \end{aligned}

Check: the compensation resistor reduces the bias-current error from 9.5 mV9.5\ \text{mV} to 1.0 mV1.0\ \text{mV} (that is IOSRfI_{OS} R_f), but the offset voltage dominates. A one-point calibration removes the 48.5 K48.5\ \text{K} at room temperature; the 6 K6\ \text{K} of drift remains. The conclusion: this job needs a precision op-amp.

In Python: an error budget for two op-amp classes

python · try it yourself
G, Rf, R1 = 101, 100e3, 1e3
Rp = R1 * Rf / (R1 + Rf)
S = 41e-6        # V/K, type K thermocouple near room temperature
dT = 25          # K from the calibration temperature
dVs = 0.25       # V of supply variation (5 V +/- 5 %)
amps = {
    "general bipolar": dict(Vos=2e-3, drift=10e-6, Ibp=105e-9, Ibn=95e-9, cmrr=90, psrr=90),
    "zero-drift CMOS": dict(Vos=10e-6, drift=0.05e-6, Ibp=300e-12, Ibn=200e-12, cmrr=120, psrr=120),
}
for name, a in amps.items():
    terms = {
        "Vos": a["Vos"],
        "bias (with Rp)": (a["Ibn"] * Rf - a["Ibp"] * Rp * G) / G,
        "drift over 25 K": a["drift"] * dT,
        "CMRR (Vcm 0.5 V)": 0.5 / 10 ** (a["cmrr"] / 20),
        "PSRR (0.25 V)": dVs / 10 ** (a["psrr"] / 20),
    }
    print(f"{name}: input-referred errors")
    for k, v in terms.items():
        print(f"  {k:18s} {v*1e6:9.2f} uV = {v/S:7.3f} K")
    rss = sum(v * v for k, v in terms.items() if k != "Vos") ** 0.5
    print(f"  after calibrating Vos out, RSS of the rest: {rss*1e6:.2f} uV = {rss/S:.3f} K")
general bipolar: input-referred errors
  Vos                  2000.00 uV =  48.780 K
  bias (with Rp)         -9.90 uV =  -0.241 K
  drift over 25 K       250.00 uV =   6.098 K
  CMRR (Vcm 0.5 V)       15.81 uV =   0.386 K
  PSRR (0.25 V)           7.91 uV =   0.193 K
  after calibrating Vos out, RSS of the rest: 250.82 uV = 6.118 K
zero-drift CMOS: input-referred errors
  Vos                    10.00 uV =   0.244 K
  bias (with Rp)         -0.10 uV =  -0.002 K
  drift over 25 K         1.25 uV =   0.030 K
  CMRR (Vcm 0.5 V)        0.50 uV =   0.012 K
  PSRR (0.25 V)           0.25 uV =   0.006 K
  after calibrating Vos out, RSS of the rest: 1.37 uV = 0.033 K

After a room-temperature calibration, the general-purpose part still leaves about 6 K6\ \text{K}, almost all of it offset drift; the zero-drift part leaves 0.03 K0.03\ \text{K}, so the thermocouple's own cold-junction compensation becomes the limit.

Cross-check with SPICE: error sources outside the macro-model

The deck adds a 2 mV2\ \text{mV} offset source and two bias-current sources to the op-amp macro-model written for this course (the next lesson builds them into the subcircuit). The input is grounded, so the output is pure error. alter then fits the 990 Ω990\ \Omega compensation resistor.

bash · try it yourself
cat > dcerr.cir <<'EOF'
* non-inverting G = 101, input grounded: output = DC error
.subckt OA inp inn out
G1 0 n1 inp inn 1m
R1 n1 0 100meg
C1 n1 0 159.2p
E1 out 0 n1 0 1
.ends
Rp ip 0 1m
Ibp ip 0 105n
Vos ipp ip 2m
Ibn n 0 95n
R1 n 0 1k
Rf n out 100k
X1 ipp n out OA
.control
op
print v(out)
alter Rp = 990
op
print v(out)
.endc
.end
EOF
ngspice -b dcerr.cir 2>&1 | grep -E '^v\('
v(out) = 2.112866e-01
v(out) = 2.007982e-01

211.5 mV211.5\ \text{mV} and 201.0 mV201.0\ \text{mV}, less the 0.1 %0.1\ \% that the finite A0=105A_0 = 10^5 takes off: the hand formula holds.

Interactive: tune the compensation resistor

Here the op-amp is the ideal controlled source E1 out 0 ipp n 1meg (gain 10610^6), with the offset Vos and the bias currents Ibp, Ibn drawn outside it as in the figure. ee-netlist has no op-amp element, so this is exactly the error model of this lesson.

node voltages (to ground 0)ip-103.9 uVipp1.896 mVn1.896 mVout201.0 mVnetlistRp ip 0 990Ibp ip 0 105nVos ipp ip 2mR1 n 0 1kRf n out 100kIbn n 0 95nE1 out 0 ipp n 1megelement currents (node 1 to node 2 through it)Rpip>0-105 nAIbpip>0105 nAVosipp>ip0 AR1n>01.90 uARfn>out-1.99 uAIbnn>095.0 nAE1out>0-1.99 uA

At the defaults the lab shows V(out)=201.0 mVV(\text{out}) = 201.0\ \text{mV}; slide RpR_p to 10 Ω10\ \Omega for 211.4 mV211.4\ \text{mV}, and set VOSV_{OS} to zero to see the bias-current error alone, which crosses zero near Rp=900 ΩR_p = 900\ \Omega (where IB+Rp G=IB−RfI_{B+} R_p\,G = I_{B-} R_f) rather than at 990 Ω990\ \Omega, because the two currents are not equal.

Guided lab: measure an op-amp's offset and bias current

Hand calculation. Non-inverting, R1=100 ΩR_1 = 100\ \Omega, Rf=100 kΩR_f = 100\ \text{k}\Omega (noise gain 10011001), input grounded: Vout=1001 VOS+IB−⋅100 kΩV_\text{out} = 1001\,V_{OS} + I_{B-} \cdot 100\ \text{k}\Omega. For VOS=1 mVV_{OS} = 1\ \text{mV} that is about 1 V1\ \text{V}. Then put Rs=100 kΩR_s = 100\ \text{k}\Omega in series with the ++ input: the output changes by −1001 IB+Rs-1001\,I_{B+} R_s, about −10 V-10\ \text{V} per 100 nA100\ \text{nA} (pick Rs=10 kΩR_s = 10\ \text{k}\Omega for a bipolar part to stay inside the rails).

Simulation. The SPICE deck with your datasheet's typical values; the lab.

What you would measure. General-purpose op-amp on ±12 V\pm 12\ \text{V} from a current-limited split supply, 1 % resistors. Read VoutV_\text{out} with a DMM (±0.1 %\pm 0.1\ \%), divide by 10011001: expect VOSV_{OS} within the datasheet's maximum, with any sign. Several op-amps from one bag will scatter widely: that is why datasheets give a typical and a maximum. Warm the chip with your finger or a hair dryer on low and watch the drift in μV/K\mu\text{V/K}. With a CMOS op-amp the RsR_s step is unmeasurably small; with a bipolar one it gives IB+I_{B+} to about ±2 %\pm 2\ \%.

Hazards and safe setup. Low-voltage current-limited supply. A hair dryer on low only; keep it away from the bench supply and do not heat the board above hand-warm.

Pitfalls

  • Multiplying VOSV_{OS} by the signal gain. It is multiplied by the noise gain; an inverting amplifier of gain −1-1 multiplies VOSV_{OS} by 2.
  • Adding RpR_p to a CMOS op-amp circuit. No benefit, more noise.
  • Trusting "rail-to-rail" at full load. Read the output-headroom curve at your load current.
  • Leaving out the input common-mode range in single-supply designs. An input at 0 V0\ \text{V} is outside many op-amps' range on a single supply.
  • Ignoring PSRR at high frequency. Switching-regulator ripple goes straight through; filter the supply.

Practice

  1. An inverting amplifier has R1=10 kΩR_1 = 10\ \text{k}\Omega, Rf=470 kΩR_f = 470\ \text{k}\Omega and an op-amp with VOS=3 mVV_{OS} = 3\ \text{mV}. What is the output offset?
  2. What compensation resistor goes in the ++ input of that amplifier, and what bias-current error remains with IOS=20 nAI_{OS} = 20\ \text{nA}?
  3. An op-amp has PSRR=80 dB\text{PSRR} = 80\ \text{dB}. How much input-referred error does 50 mV50\ \text{mV} of supply ripple cause?
Answer
  1. Noise gain 1+47=481 + 47 = 48; 48⋅3 mV=144 mV48 \cdot 3\ \text{mV} = 144\ \text{mV}.
  2. Rp=10∥470=9.79 kΩR_p = 10 \parallel 470 = 9.79\ \text{k}\Omega (E24 10 kΩ10\ \text{k}\Omega); the remaining error is about IOSRf=20 nA⋅470 kΩ=9.4 mVI_{OS} R_f = 20\ \text{nA} \cdot 470\ \text{k}\Omega = 9.4\ \text{mV}.
  3. 1080/20=10410^{80/20} = 10^4; 50 mV/104=5 μV50\ \text{mV}/10^4 = 5\ \mu\text{V} (at frequencies where the PSRR still is 80 dB80\ \text{dB}).

Test yourself

An inverting amplifier of gain −1-1 uses an op-amp with VOS=1 mVV_{OS} = 1\ \text{mV}. The output offset is…

  1. 0 V0\ \text{V}
  2. 1 mV1\ \text{mV}
  3. 2 mV2\ \text{mV}
  4. −1 mV-1\ \text{mV}

The bias-current compensation resistor in the non-inverting input should equal…

  1. RfR_f
  2. R1R_1
  3. R1∥RfR_1 \parallel R_f
  4. R1+RfR_1 + R_f

A CMRR of 100 dB100\ \text{dB} means a 1 V1\ \text{V} change of common-mode voltage acts like an input offset of…

  1. 1 mV1\ \text{mV}
  2. 100 μV100\ \mu\text{V}
  3. 10 μV10\ \mu\text{V}
  4. 1 μV1\ \mu\text{V}

Why does a single-supply AC amplifier usually need a mid-supply reference?

  1. To lower the noise
  2. So the signal can swing both ways around a point between 0 and VCCV_{CC}
  3. To raise the gain
  4. To cancel bias currents