Operational Amplifiers Calculator

−+ Rin Rf Vin summing node Vout
The inverting amplifier and its summing node: this is where the op amp holds the voltage at zero, and where all the formulas on this page originate.

Introduction

Op-amp formulas are among the simplest in electronics: take a resistor ratio and you are done. That apparent simplicity is exactly what makes them dangerous, because the circuit you build almost never does exactly what the ratio promises. The reason is not in the formula, but in everything the formula leaves out.

This page calculates the classic configurations, but each time it keeps two additional quantities alongside gain. The first is bandwidth, which is not determined by signal gain but by noise gain \(1+R_f/R_1\): an inverting amplifier with a gain of −1 has half the op amp’s bandwidth, not all of it, and a three-input summing amplifier has even less despite a signal gain of one. The second is slew rate, which determines how far you can go with large signals: with a 741 and a 10 V peak output, you are limited to 8 kHz, roughly one hundred times below its megahertz-scale small-signal bandwidth.

The third topic appears in the differential-amplifier card, and it is my favorite: the CMRR of that circuit is not set by the op amp, but by mismatch among the four resistors. With 1% resistors you will not get much beyond roughly 50 dB, even if the op-amp datasheet specifies 100 dB. This is where the practical value of buying 0.1% E96 resistors becomes clear.

QuantityRelationshipWhy it matters
Noise gain\( N_G = 1+\dfrac{R_f}{R_1} \)It sets bandwidth and errors, not signal gain
−3 dB bandwidth\( f_{-3\,\mathrm{dB}} = \dfrac{GBW}{N_G} \)Constant gain-bandwidth product
Slew-rate limit\( f_{\max} = \dfrac{SR}{2\pi V_p} \)Large-signal constraint, independent of small-signal bandwidth
CMRR from mismatch\( \mathrm{CMRR} \simeq \dfrac{1+R_2/R_1}{4t} \)With t = tolerance; almost always worse than the op amp itself
DC error\( V_{\mathrm{err}} = V_{\mathrm{os}}N_G + I_b R_f \)Increases with noise gain and resistor values

Global parameters and op amp

Card 1 — Inverting amplifier

−+ RinRf Vin Vout
The signal enters the summing node through Rin: the input impedance is Rin and nothing else.
TheoreticalE24E96

The summing node is at virtual ground: the op amp does whatever is necessary to keep it there, so the input impedance of the inverting amplifier is exactly Rin, not a high value. This is the first cost of the configuration: if the source has its own output impedance, that impedance becomes part of the gain calculation.

The parameter to watch is noise gain. An inverting amplifier with a gain of −1 has NG = 2, so it has half the bandwidth: with a TL072 that means 1.5 MHz, not 3 MHz. Noise gain is also what multiplies the input offset voltage, as shown in the last row.

The compensation resistor at the non-inverting input is Rin∥Rf and makes the bias-current voltage drops at the two inputs equal, so the effect of Ib is canceled and only the effect of Ios, which is typically about ten times smaller, remains. With a JFET input it is unnecessary: Ib is already in the picoampere range.

Card 2 — Non-inverting amplifier and voltage follower

−+ RfR1 Vin Vout
The signal enters the + input, and feedback returns to the − input.
−+ Vin Vout
Full feedback: unity gain and full bandwidth.

Here noise gain equals signal gain, so bandwidth and errors scale directly with the gain you request. In return, the input impedance is that of the op amp itself, effectively extremely high: this is the configuration to use when the source must not be loaded.

The gain cannot fall below one: Rf = 0 gives an exact voltage follower. It provides no voltage gain, and that is precisely why it is useful: it converts a high source impedance into a low output impedance, provides the full op-amp bandwidth, and has a DC error equal only to Vos.

Be careful when using a voltage follower with an op amp that is not unity-gain compensated: some devices, known as decompensated, are stable only above a specified minimum gain and can oscillate at unity gain.

Card 3 — Summing amplifier

−+ R1R2R3 Rf V1V2V3 Vout
The three resistors converge at the summing node, shown in orange. It is held at virtual ground, so the inputs do not interact with one another.
InputVoltageRWeightContribution

The summing amplifier is an inverting amplifier with several resistors converging on the same summing node. Because that node is at virtual ground, the inputs do not interact with one another: each input is weighted by Rf/Ri , and that is why the circuit works as a mixer.

What is surprising is the bandwidth. Noise gain is not the largest individual weight, but 1+Rf/(R1∥R2∥R3): three 100 kΩ inputs with Rf of 100 kΩ give a gain magnitude of 1 for each input and a noise gain of 4. The individual signal gain is unity, yet the bandwidth is reduced to one quarter and the offset error is multiplied by four. Adding inputs has a cost even when each input gain remains one.

Card 4 — Differential amplifier and real CMRR

−+ R1R2 R3R4 V1V2 Vout
The differential gain is R2/R1 only if R4/R3 has exactly the same ratio. That word “exactly” is the reason for this entire card.

On paper this circuit subtracts two voltages and amplifies their difference. In practice, its subtraction is only as good as the matching of the four resistors. The relation \(\mathrm{CMRR}\simeq\frac{1+R_2/R_1}{4t}\) reveals an unpleasant fact: with 1% resistors you are around 48 dB, so a 5 V common-mode voltage leaves about twenty millivolts of output error, even though the op amp itself specifies 86 dB.

The “required tolerance” field performs the inverse calculation: enter the CMRR you want and it tells you what resistor tolerance is required. For 80 dB at a gain of 10, about 0.03% matching is needed. That is not normally obtained with four unrelated discrete resistors; a monolithic resistor network is the appropriate solution because the elements are fabricated together and track one another with temperature.

Also note that the input impedance is different at the two terminals and depends on the source conditions. This is the other structural limitation of this topology and the reason the next card exists.

Card 5 — Instrumentation amplifier

+− −+ −+ Rg R1R1 R2R2 R3R3 V1V2 Vout
The signals enter the non-inverting inputs: the input impedance is extremely high and equal on both sides. Rg sets the gain of the first stage and does not enter the CMRR matching balance, which depends only on the four resistors in the second stage.

Three op amps: two non-inverting input stages with gain, followed by the differential amplifier from Card 4. This solves both limitations described above. The input impedance becomes extremely high and equal at both inputs because the signals are applied directly to the non-inverting terminals.

More importantly, the CMRR improves by the gain of the first stage: that stage amplifies the differential signal by \(1+2R_1/R_g\) while the common-mode gain remains exactly one. Every decibel of first-stage gain therefore adds one decibel of CMRR. With a first-stage gain of 50, the 1% differential stage that provided about 48 dB on its own now reaches roughly 82 dB.

Gain is adjusted with a single resistor, Rg, which does not affect the CMRR resistor matching: it can therefore be adjusted independently. The four resistors in the second stage, however, must remain closely matched, and that is where precision components matter.

Card 6 — Integrator and differentiator

R Rf C Vin Vout
Integrator: C is in the feedback path, with Rf in parallel to provide a DC feedback path.
C Rs R Vin Vout
Differentiator: C is at the input, with Rs in series to limit high-frequency gain and prevent oscillation.

An ideal integrator has infinite DC gain, which means that the op amp’s offset voltage—even just a few millivolts—is integrated without limit until the output reaches a rail. On the bench this can happen within seconds. The Rf in parallel with the capacitor closes the DC feedback path and limits the gain to Rf/R: below the corresponding frequency the circuit stops acting as an integrator and becomes an ordinary inverting amplifier, a tradeoff that is usually well worth making.

The differentiator has the complementary problem: its gain increases with frequency, so it amplifies high-frequency noise and, worse, the pole formed in combination with the op amp’s finite bandwidth can make the circuit unstable. The Rs in series with the capacitor limits the high-frequency gain and restores a safer phase margin.

Rule of thumb: choose Rs so that the limiting frequency is about one decade above the useful operating band, while still remaining below the region where the op amp no longer has sufficient loop gain.

Card 7 — Large-signal limits

— requested waveform – – actual output above f_max
Beyond the slew-rate limit, the output can no longer follow the requested slope and the sine wave becomes triangular: the distortion increases abruptly once the required slope exceeds the available slew rate.

The −3 dB bandwidth is a small-signal limit: it applies as long as the output amplitude is low enough not to demand more rate of change than the op amp can provide. Slew rate is a large-signal limit, and the two constraints are fundamentally different.

The calculation is straightforward: a sine wave with peak amplitude Vp at frequency f has a maximum slope of 2πfVp, and if that slope exceeds the slew rate the output becomes triangular. A 741 has roughly 1 MHz of small-signal bandwidth and about 0.5 V/µs of slew rate: at a 10 V peak amplitude the slew-rate limit is about 8 kHz. This is not a contradiction in the datasheet; it is why slew rate and small-signal bandwidth must be considered separately.

The last line is the one that is often forgotten: output current. A general-purpose op amp may provide only about 20–25 mA, so 10 V across a 200 Ω load is not achievable regardless of bandwidth.

Card 8 — Offset and bias currents

At DC, an op amp does not produce exactly zero output when its input differential voltage is zero, and two main error sources are responsible. The input offset voltage is multiplied by the noise gain, just like an input-referred signal: with NG = 101 and Vos = 3 mV, the output error is about 300 mV, already around two percent of a 15 V supply magnitude.

Bias current, on the other hand, flows through the resistors and creates voltage drops. This is why high-DC-gain amplifiers using bipolar-input op amps are generally not built with unnecessarily large feedback resistances. The message below the card indicates which error source dominates, which is the key information needed to decide whether to change the topology or the op amp.

With the compensation resistor in the proper location, the error caused by Ib is reduced to the contribution from Ios, typically much smaller. With a JFET or CMOS input, the bias-current problem is usually negligible because Ib is in the picoampere range; at that point Vos, whose value is often worse in those same device families.

Reference tables

Op ampInputGBWSlew rateVos typ.Ib typ.CMRR
Resistor toleranceMaximum CMRR with Ad = 10
5 %≈ 35 dB
1 %≈ 49 dB
0.1 %≈ 69 dB
0.01 %≈ 89 dB

The preset values are typical datasheet values, not guaranteed limits: Vos and Ib in particular can vary significantly from device to device and with temperature, and GBW can depend on supply conditions. For a design that must meet its specifications under all conditions, use guaranteed limits rather than typical values.

The CMRR table applies to the four-resistor differential amplifier in Card 4, assuming all four resistors have the same tolerance and worst-case mismatch. It is an upper bound: it indicates the maximum that can be achieved, not the value you are guaranteed to obtain.